ababaian / LIONS

LIONS is a bioinformatic analysis pipeline which brings together a few pieces of software and some home-brewed scripts to annotate a paired-end RNAseq library to detect TE-intiated transcripts
GNU General Public License v3.0
27 stars 13 forks source link

Not checking exonTree chromosomes #10

Closed benbfly closed 4 years ago

benbfly commented 5 years ago

This line seems to fail ungracefully in certain conditions:

LIONS/scripts/ChimericReadTool/chimericReadSearch.py line 109 exon_results1 = exonTrees[str(chr)].findRange([start1,end1])

I am running with a small number of reads, and this line errors because the read is from a chromosome with no exonTree entry. (because the chromosome doesn't exist in "assembly_exons" file)

Error below: Processing all reads Traceback (most recent call last): File "/LIONS-docker/scripts/ChimericReadTool/chimericReadSearch.py", line 728, in <module> results = processReads(samfile_path, exonTrees, repeatTrees, chimericBedFile) File "/LIONS-docker/scripts/ChimericReadTool/chimericReadSearch.py", line 109, in processReads exon_results1 = exonTrees[str(chr)].findRange([start1,end1]) KeyError: '10' read search complete.

ababaian commented 5 years ago

I've ran into this once before and ungracefully used another reference genome with only the chromosome containing reads when I was running a pilot experiment. I then forgot about it, but I'll set this is a high priority and look to implement a proper work-around. I'm a little bit swamped at the moment but should get back to development fairly soon.


Edit: Possible fix for this error from Richard

It looks like RegionsCoverageFromWigCalculator.jar is looking for exonTrees that don't exist, could you try changing line 88 of scripts/ChimericReadTool/chimericReadSearch.py from 

    if (chr not in str(valid)):
 to:
    if (chr not in str(valid)) or (chr not in str(exonTrees.keys()):

and let me know how that works for you.
biscuit13161 commented 5 years ago

Hi Ben,

Can you confirm whether the suggested fix helped this issue? ..or does it need further work?

Thanks Richard