zavolanlab/MIRZAG

rg_calculate_MIRZA.py crashes in snakemake version when custom tree is provided

fgypas opened this issue · 3 comments

Traceback (most recent call last):
File "../../docker/scripts/rg_calculate_MIRZA.py", line 786, in
main(options)
File "../../docker/scripts/rg_calculate_MIRZA.py", line 192, in main
mrna_len=options.contextLen)
File "../../docker/scripts/rg_calculate_MIRZA.py", line 520, in calculate_conservation
min_score.retain_taxa_with_labels([ref_org])
File "/usr/local/lib/python2.7/site-packages/dendropy/datamodel/treemodel.py", line 5390, in retain_taxa_with_labels
suppress_unifurcations=suppress_unifurcations)
File "/usr/local/lib/python2.7/site-packages/dendropy/datamodel/treemodel.py", line 5377, in retain_taxa
suppress_unifurcations=suppress_unifurcations)
File "/usr/local/lib/python2.7/site-packages/dendropy/datamodel/treemodel.py", line 5346, in prune_taxa
suppress_unifurcations=suppress_unifurcations)
File "/usr/local/lib/python2.7/site-packages/dendropy/datamodel/treemodel.py", line 5307, in prune_leaves_without_taxa
nd.edge.tail_node.remove_child(nd)
AttributeError: 'NoneType' object has no attribute 'remove_child'

The problem is that the organism that I currently use is not hg19 but hg38.

parser.add_argument('--reforg',
                     dest='reforg',
                     action="store",
                     default="hg19",
                     help="Reference organism to which alignments are performed: default: hg19")

So i just have to expose this in the config.

Indeed this fixes the issue.

fixed in 136ad38