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

Can't produce a correct summary.txt when using annotation module. #24

Closed
sylviaviii opened this issue Oct 1, 2019 · 7 comments
Closed

Comments

@sylviaviii
Copy link

I was annotating for about 50 species with MitoZ. But there are about 10 species can't produce a correct summary.txt. The following is an error report. I think the main reason is "Name and length collide in the LOCUS line". Why this situation happened?

2019-10-01 10:29:06
/home/zf/install/miniconda3/envs/mitozEnv/bin/python3 /home/zf/install/version_2.3/release_MitoZ_v2.3/bin/common/genbank_gene_stat_v2.py 1_Poeciloneta_variegata_mitoscaf.fa.gbf 1_Poeciloneta_variegata.most_related_species.txt annotate > summary.txt

Traceback (most recent call last):
File "/home/zf/install/version_2.3/release_MitoZ_v2.3/bin/common/genbank_gene_stat_v2.py", line 238, in
main()
File "/home/zf/install/version_2.3/release_MitoZ_v2.3/bin/common/genbank_gene_stat_v2.py", line 202, in main
seqid_len_topology_relatedSP = get_seq_topology_and_related_sp(gbfile=gbfile, closely_related_sp_file=closely_related_sp_file)
File "/home/zf/install/version_2.3/release_MitoZ_v2.3/bin/common/genbank_gene_stat_v2.py", line 173, in get_seq_topology_and_related_sp
for rec in SeqIO.parse(gbfile, 'gb'):
File "/home/zf/install/miniconda3/envs/mitozEnv/lib/python3.6/site-packages/Bio/SeqIO/init.py", line 609, in parse
for r in i:
File "/home/zf/install/miniconda3/envs/mitozEnv/lib/python3.6/site-packages/Bio/GenBank/Scanner.py", line 480, in parse_records
record = self.parse(handle, do_features)
File "/home/zf/install/miniconda3/envs/mitozEnv/lib/python3.6/site-packages/Bio/GenBank/Scanner.py", line 464, in parse
if self.feed(handle, consumer, do_features):
File "/home/zf/install/miniconda3/envs/mitozEnv/lib/python3.6/site-packages/Bio/GenBank/Scanner.py", line 431, in feed
self._feed_first_line(consumer, self.line)
File "/home/zf/install/miniconda3/envs/mitozEnv/lib/python3.6/site-packages/Bio/GenBank/Scanner.py", line 1285, in _feed_first_line
'Name and length collide in the LOCUS line:\n' + line
AssertionError: Name and length collide in the LOCUS line:
LOCUS 1_Poeciloneta_variegata14332 bp DNA linear 01-OCT-2019

Error occured when running command:
/home/zf/install/miniconda3/envs/mitozEnv/bin/python3 /home/zf/install/version_2.3/release_MitoZ_v2.3/bin/common/genbank_gene_stat_v2.py 1_Poeciloneta_variegata_mitoscaf.fa.gbf 1_Poeciloneta_variegata.most_related_species.txt annotate > summary.txt

@linzhi2013
Copy link
Owner

Dear sylviaviii,

I think the reason is that the length of your sequence id is too long. which is not allowed by biopython. the maximum seqid length is 10 or 15 characters, as I remember.

Please shorten your seqid firstly.

Cheers
Guanliang

@sylviaviii
Copy link
Author

Dear Guanliang,

It is helpful with your answer. Thank you!

But these days we have the same situation with different error message. May I ask your favor to tell me how to deal with it? The following is an error report. My sequence are Refseq from NCBI, which are NC_037851.1 and NC_026081.1

2020-01-10 10:05:12
/home/zf/install/miniconda2/envs/mitoz/bin/python3 /home/zf/install/MitoZ_v2.4-alpha/bin/common/genbank_gene_stat_v2.py Crassostrea_belcheri_mitoscaf.fa.gbf Crassostrea_belcheri.most_related_species.txt annotate > summary.txt

Traceback (most recent call last):
File "/home/zf/install/MitoZ_v2.4-alpha/bin/common/genbank_gene_stat_v2.py", line 238, in
main()
File "/home/zf/install/MitoZ_v2.4-alpha/bin/common/genbank_gene_stat_v2.py", line 215, in main
gene_infor, gene_freq = gene_stat(gbfile)
File "/home/zf/install/MitoZ_v2.4-alpha/bin/common/genbank_gene_stat_v2.py", line 97, in gene_stat
print(ass_num, "Warning: NO gene or product tag! this gene is not output!\n")
NameError: name 'ass_num' is not defined
Error occured when running command:
/home/zf/install/miniconda2/envs/mitoz/bin/python3 /home/zf/install/MitoZ_v2.4-alpha/bin/common/genbank_gene_stat_v2.py Crassostrea_belcheri_mitoscaf.fa.gbf Crassostrea_belcheri.most_related_species.txt annotate > summary.txt

@linzhi2013
Copy link
Owner

Dear sylviaviii,

it is a bug here. and thank you very for reporting this bug.

Could you please replace the file genbank_gene_stat_v2.py in your machine to this
genbank_gene_stat_v2.py.zip

you should decompress it after downloading.

Hope this will help.

Cheers

@sylviaviii
Copy link
Author

sylviaviii commented Jan 10, 2020 via email

@linzhi2013
Copy link
Owner

I'm closing this. You can reopen it if the problem is still there.

@dleopold
Copy link

FYI - This bug is still present in the public docker images for versions 2.3 and 2.4_alpha.

@linzhi2013
Copy link
Owner

FYI - This bug is still present in the public docker images for versions 2.3 and 2.4_alpha.

I understand your question now. The docker image 2.3 was built years ago and hasn't been updated.

The problem will be solved in next formal version 3.5.

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