neksa / mutagene

Python library and package for mutational analysis
https://www.ncbi.nlm.nih.gov/projects/mutagene/
Other
3 stars 3 forks source link

KeyError: 'GCTGA' #64

Closed yunhuip closed 3 years ago

yunhuip commented 3 years ago

I performed ranking for about 100 MAF files but had the following Key errors for several of them. Do you have any ideas about this error? Thanks!

mutagene rank -i maf -g hg38 -o ranking.txt -p sample.profile

Traceback (most recent call last):
File "/usr/local/Anaconda/envs/py3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/local/Anaconda/envs/py3.7/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/pengy10/.local/lib/python3.7/site-packages/mutagene/main.py", line 113, in MutaGeneApp() File "/home/pengy10/.local/lib/python3.7/site-packages/mutagene/main.py", line 104, in init parser_class.callback(args) File "/home/pengy10/.local/lib/python3.7/site-packages/mutagene/cli/rank_menu.py", line 75, in callback protein_mutations, processing_stats = read_protein_mutations_MAF(args.infile, args.genome) File "/home/pengy10/.local/lib/python3.7/site-packages/mutagene/io/protein_mutations_MAF.py", line 239, in read_protein_mutations_MAF flat_mutations[(gene, protein_mutation)]['seq5'][props['seq5']] += 1 KeyError: 'GCTGA'

neksa commented 3 years ago

Yeah It’s definitely a bug with pentanucleotide counting. Weird because it has to be a defaultdict() and that it only occurs for some or the samples. What’s the input file?

Best, Alex

On Feb 3, 2021, at 10:48 PM, yunhuip notifications@github.com wrote:  I performed ranking for about 100 MAF files but had the following Key errors for several of them. Do you have any ideas about this error? Thanks!

mutagene rank -i maf -g hg38 -o ranking.txt -p sample.profile

Traceback (most recent call last): File "/usr/local/Anaconda/envs/py3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/local/Anaconda/envs/py3.7/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/pengy10/.local/lib/python3.7/site-packages/mutagene/main.py", line 113, in MutaGeneApp() File "/home/pengy10/.local/lib/python3.7/site-packages/mutagene/main.py", line 104, in init parser_class.callback(args) File "/home/pengy10/.local/lib/python3.7/site-packages/mutagene/cli/rank_menu.py", line 75, in callback protein_mutations, processing_stats = read_protein_mutations_MAF(args.infile, args.genome) File "/home/pengy10/.local/lib/python3.7/site-packages/mutagene/io/protein_mutations_MAF.py", line 239, in read_protein_mutations_MAF flat_mutations[(gene, protein_mutation)]['seq5'][props['seq5']] += 1 KeyError: 'GCTGA'

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

yunhuip commented 3 years ago

I have sent one sample file to you. Thanks! Yunhui

yunhuip commented 3 years ago

Hi Alex, Do you have any updates on this issue? Thank you!

neksa commented 3 years ago

Fixed in the new release 0.9.1.0