I'd like to run OrthoFinder with nucleotide input instead of protein input, but the genomes I'm working with are from an old version, then Genbank doesn't allow me to download de CDS fasta file directly from the site. So I downloaded the gbk file and I'm trying, without success, to extract all CDS from it.
If someone could help me I'd appreciate it.
from Bio import SeqIO
record = SeqIO.parse("./NC_018019.2-complete.gb", "genbank")
record.features =[f for f in record.features if f.type =="CDS"]
SeqIO.write(cds, 'NC_01809.2_V2_nucleotide.fasta', 'fasta')
and i've the following error:
Traceback (most recent call last): File "/home/enrico/Documentos/materialcp162/dados/CDSs/nucleotideos/./getcds.py", line 7, in<module>
record.features =[f for f in record.features if f.type =="CDS"]
AttributeError: 'GenBankIterator' object has no attribute 'features'
Many thanks! It worked!