Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'animal_mt' #16

Closed
sihellem opened this issue Jul 2, 2019 · 5 comments
Closed

KeyError: 'animal_mt' #16

sihellem opened this issue Jul 2, 2019 · 5 comments

Comments

@sihellem
Copy link

sihellem commented Jul 2, 2019

Hi, @Kinggerm,

I am trying to assemble the mitochondrion from my termite using the following code:

get_organelle_from_reads.py -1 CIVT039_S65_R1_001_val_1.fq.gz -2 CIVT039_S65_R2_001_val_2.fq.gz -o CIVT039 -s Astalotermes_genome.fasta.txt --genes Astalotermes_gene_features_sequence.txt -R 3 -k 21,45,65,85,105 -F animal_mt

Using this configuration:

GetOrganelle v1.6.2

get_organelle_from_reads.py assembles organelle genomes from genome skimming data.
Find updates in https://github.com/Kinggerm/GetOrganelle and see README.md for more information.

Python 3.7.1 (default, Dec 14 2018, 19:28:38) [GCC 7.3.0]
Python libs: numpy 1.16.4; sympy 1.4; scipy 1.3.0
Dependencies: Bowtie2 2.3.5.1; SPAdes 3.13.0; Blast 2.2.30

However, after the assembly step using SPAdes and the slimming of assembly graphs, I get the following:

2019-07-02 14:51:57,241 - INFO: Extracting animal_mt from the assemblies ...
2019-07-02 14:51:57,243 - INFO: Disentangling CIVT039_S65_R1_001_val_1_output/filtered_spades/K105/assembly_graph.fastg.extend-Astalotermes_gene_features_sequence.txt.fastg as a circular genome ...
2019-07-02 14:51:57,249 - ERROR:
Traceback (most recent call last):
File "/home/users/s/i/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/EGG-INFO/scripts/get_organelle_from_reads.py", line 3340, in extract_organelle_genome
temp_graph=graph_temp_file)
File "/home/users/s/i/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/EGG-INFO/scripts/get_organelle_from_reads.py", line 3302, in disentangle_assembly
acyclic_allowed_in=here_acyclic_allowed, verbose_in=here_verbose, in_temp_graph=temp_graph)
File "/home/ulb/ebe/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/GetOrganelleLib/pipe_control_func.py", line 85, in func_modified
r = func(*args, **kwargs)
File "/home/users/s/i/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/EGG-INFO/scripts/get_organelle_from_reads.py", line 3189, in disentangle_inside
temp_graph=in_temp_graph)
File "/home/ulb/ebe/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/GetOrganelleLib/assembly_parser.py", line 1769, in find_target_graph
self.parse_tab_file(tab_file, mode=mode, type_factor=type_factor, log_handler=log_handler)
File "/home/ulb/ebe/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/GetOrganelleLib/assembly_parser.py", line 1250, in parse_tab_file
if len(self.tagged_vertices[mode]) == 0:
KeyError: 'animal_mt'
2019-07-02 14:51:57,254 - ERROR:
Traceback (most recent call last):
File "/home/users/s/i/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/EGG-INFO/scripts/get_organelle_from_reads.py", line 3340, in extract_organelle_genome
temp_graph=graph_temp_file)
File "/home/users/s/i/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/EGG-INFO/scripts/get_organelle_from_reads.py", line 3302, in disentangle_assembly
acyclic_allowed_in=here_acyclic_allowed, verbose_in=here_verbose, in_temp_graph=temp_graph)
File "/home/ulb/ebe/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/GetOrganelleLib/pipe_control_func.py", line 85, in func_modified
r = func(*args, **kwargs)
File "/home/users/s/i/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/EGG-INFO/scripts/get_organelle_from_reads.py", line 3189, in disentangle_inside
temp_graph=in_temp_graph)
File "/home/ulb/ebe/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/GetOrganelleLib/assembly_parser.py", line 1769, in find_target_graph
self.parse_tab_file(tab_file, mode=mode, type_factor=type_factor, log_handler=log_handler)
File "/home/ulb/ebe/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/GetOrganelleLib/assembly_parser.py", line 1250, in parse_tab_file
if len(self.tagged_vertices[mode]) == 0:
KeyError: 'animal_mt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/users/s/i/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/EGG-INFO/scripts/get_organelle_from_reads.py", line 3803, in main
options=options)
File "/home/users/s/i/sihellem/miniconda3/lib/python3.7/site-packages/GetOrganelle-1.6.2-py3.7.egg/EGG-INFO/scripts/get_organelle_from_reads.py", line 3353, in extract_organelle_genome
sys.exit()
SystemExit

Total cost 317.57 s
Please email jinjianjun@mail.kib.ac.cn or phylojin@163.com if you find bugs!
Please provide me with the get_org.log.txt file!

Do you have any idea of what's happening here?

Thanks a lot in advance!

@Kinggerm
Copy link
Owner

Kinggerm commented Jul 2, 2019

Thanks for pointing out this bug. I will fix this very soon.
Currently, you could rename Astalotermes_gene_features_sequence.txt to animal_mt.fasta and make it work (if you use --continue option to resume, you should firstly remove *csv files previously produced). I would let you know once I fixed this, after which there is no need to do this pre-renaming.
Sorry for the inconvenience and thanks again for letting me know!

Best,
Jianjun

@sihellem
Copy link
Author

sihellem commented Jul 3, 2019

Hello Jianjun,

Thanks, it did work indeed!

Cheers,
Simon

@Kinggerm
Copy link
Owner

Kinggerm commented Jul 3, 2019

Fix it in 1.6.2a. No need to rename anymore.
But I am in the field these days and only get a small dataset to test. Let me know if it doesn't work for you.

Cheers,
Jianjun

@duanyuj
Copy link

duanyuj commented Jul 19, 2019

Dear Jianjun,

I have a little question, what exactly does -- genes mean, while you enter a command.

I can't find an explanation in the help.

Looking forward to your help.

Thanks.

@Kinggerm
Copy link
Owner

Kinggerm commented Jul 19, 2019

Dear Jianjun,

I have a little question, what exactly does -- genes mean, while you enter a command.

I can't find an explanation in the help.

Looking forward to your help.

Thanks.

You can type get_organelle_from_reads.py --help rather than get_organelle_from_reads.py -h to get a verbose version of all options, where you can find illustration of --genes as follows:

--genes=GENES_FASTA
                   Followed with a customized database (a fasta file or
                   the base name of a blast database) containing or made
                   of ONE set of protein coding genes and ribosomal RNAs
                   extracted from ONE reference genome that you want to
                   assemble. Should be a list of databases split by
                   comma(s) on a multi-organelle mode, with the same list
                   length to organelle_type (followed by '-F'). This is
                   optional for any organelle mentioned in '-F' but
                   required for 'anonym'. By default, certain database(s)
                   in /Users/Kinggerm/.pyenv/versions/anaconda3-5.3.1/lib
                   /python3.7/site-packages/GetOrganelleLib/LabelDatabase
                   would be used contingent on the organelle types chosen
                   (-F). The default value no longer holds when '--genes'
                   or '--ex-genes' is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants