Commit d35d737f authored by Blaise Li's avatar Blaise Li
Browse files

Trying to fix max_len determination.

parent d8f9386c
......@@ -4221,7 +4221,7 @@ rule plot_size_distribution:
def get_type_max_len(wildcards):
"""Returns the maximum length for a "pi", "si", or "mi" read type.
Otherwise returns 0."""
Otherwise returns MAX_LEN."""
read_type = wildcards.read_type
try:
# ex: "18-26"
......@@ -4231,9 +4231,13 @@ def get_type_max_len(wildcards):
# ex: siuRNA
return read_type_max_len[read_type[:2]]
except KeyError:
# ex: nomap_siRNA
general_type = read_type.split("_")[1]
return read_type_max_len.get(general_type[:2], int(MAX_LEN))
try:
# ex: tRFRNA
return read_type_max_len[read_type[:-3]]
except KeyError:
# ex: nomap_siRNA
general_type = read_type.split("_")[1]
return read_type_max_len.get(general_type[:2], int(MAX_LEN))
rule compute_base_composition_along:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment