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

ValueError("missing molecule_type in annotations") #2

Open
ramadatta opened this issue Jan 3, 2022 · 1 comment
Open

ValueError("missing molecule_type in annotations") #2

ramadatta opened this issue Jan 3, 2022 · 1 comment

Comments

@ramadatta
Copy link

Hi,

Thanks for the nice tool. I am using a gbk file generated by prokka tool. But I run into following error:

locus2genoplotr -l GMCHABGO_03197 -r renamed_C01871_unicycler.gbk -o single_plot -v -rs 45000 
/home/prakki/anaconda3/envs/locus2genoplotr/lib/python3.9/site-packages/Bio/GenBank/Scanner.py:1554: BiopythonParserWarning: Malformed LOCUS line found - is this correct?
:'LOCUS       C01871_unicycler.fasta_1_length=69062\t6906207 bp   DNA linear\n'
  warnings.warn(
/home/prakki/anaconda3/envs/locus2genoplotr/lib/python3.9/site-packages/Bio/GenBank/Scanner.py:1554: BiopythonParserWarning: Malformed LOCUS line found - is this correct?
:'LOCUS       C01871_unicycler.fasta_2_length=39694\t39694 bp   DNA linear\n'
  warnings.warn(
extraction from 3429462 to 3490275
match, True
/home/prakki/anaconda3/envs/locus2genoplotr/lib/python3.9/site-packages/Bio/SeqIO/InsdcIO.py:726: BiopythonWarning: Increasing length of locus line to allow long name. This will result in fields that are not in usual positions.
  warnings.warn(
Traceback (most recent call last):
  File "/home/prakki/anaconda3/envs/locus2genoplotr/bin/locus2genoplotr", line 8, in <module>
    sys.exit(main())
  File "/home/prakki/anaconda3/envs/locus2genoplotr/lib/python3.9/site-packages/locus2genoplotr/__init__.py", line 62, in main
    gbk_list = L.write_genbank_subrecords([L.ref_sub_record])
  File "/home/prakki/anaconda3/envs/locus2genoplotr/lib/python3.9/site-packages/locus2genoplotr/locus2genoplotr.py", line 273, in write_genbank_subrecords
    SeqIO.write(record, fastastr, 'genbank')
  File "/home/prakki/anaconda3/envs/locus2genoplotr/lib/python3.9/site-packages/Bio/SeqIO/__init__.py", line 524, in write
    count = writer_class(handle).write_file(sequences)
  File "/home/prakki/anaconda3/envs/locus2genoplotr/lib/python3.9/site-packages/Bio/SeqIO/Interfaces.py", line 234, in write_file
    count = self.write_records(records, maxcount)
  File "/home/prakki/anaconda3/envs/locus2genoplotr/lib/python3.9/site-packages/Bio/SeqIO/Interfaces.py", line 208, in write_records
    self.write_record(record)
  File "/home/prakki/anaconda3/envs/locus2genoplotr/lib/python3.9/site-packages/Bio/SeqIO/InsdcIO.py", line 994, in write_record
    self._write_the_first_line(record)
  File "/home/prakki/anaconda3/envs/locus2genoplotr/lib/python3.9/site-packages/Bio/SeqIO/InsdcIO.py", line 749, in _write_the_first_line
    raise ValueError("missing molecule_type in annotations")
ValueError: missing molecule_type in annotations

can help how this can be resolved.

@tpillone
Copy link
Contributor

tpillone commented May 3, 2022

Hi @ramadatta,

This problem is caused by the latest versions of biopython, you can solve it by downgrading biopython to version 1.77

conda activate locus2genoplotr
conda install biopython=1.77

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

2 participants