CompSynBioLab-KoreaUniv / FunGAP

FunGAP: fungal Genome Annotation Pipeline
109 stars 33 forks source link

generate_genbank.py #70

Closed sajjadasaf closed 2 years ago

sajjadasaf commented 3 years ago

Hello, I tried to convert gff file to gbk file but it shows the following error. Could you kindly suggest any solution. ThinkStation-P910:~/Desktop/16s$ python generate_genbank.py -f BSL10.scaffolds.fna -g BSL10.gff3 -a BSL10filter.faa -o BSL10 Traceback (most recent call last): File "generate_genbank.py", line 262, in main() File "generate_genbank.py", line 62, in main generate_genbank( File "generate_genbank.py", line 258, in generate_genbank SeqIO.write(my_seq_records, outfile, 'genbank') File "/home/sajjad/.local/lib/python3.8/site-packages/Bio/SeqIO/init.py", line 531, in write count = writer_class(handle).write_file(sequences) File "/home/sajjad/.local/lib/python3.8/site-packages/Bio/SeqIO/Interfaces.py", line 235, in write_file count = self.write_records(records, maxcount) File "/home/sajjad/.local/lib/python3.8/site-packages/Bio/SeqIO/Interfaces.py", line 209, in write_records self.write_record(record) File "/home/sajjad/.local/lib/python3.8/site-packages/Bio/SeqIO/InsdcIO.py", line 1005, in write_record self._write_the_first_line(record) File "/home/sajjad/.local/lib/python3.8/site-packages/Bio/SeqIO/InsdcIO.py", line 757, in _write_the_first_line raise ValueError("Need a Nucleotide or Protein alphabet") ValueError: Need a Nucleotide or Protein alphabet

mbnmbn00 commented 3 years ago

Hello,

1) I have updated the script to make it faster.

cd $FUNGAP_DIR  # your FunGap directory
git pull

2) I think you are using Biopython v1.77

> python
Python 3.9.4 | packaged by conda-forge | (default, May 10 2021, 22:13:33) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import Bio
>>> Bio.__version__
'1.79'

You may upgrade your Biopython.

conda update conda
conda create -y -n py39 python biopython=1.79 -c bioconda
conda activate py39
# Then, run the same command

Let me know how it goes. Thanks!!