Hi there,
I need to figure out if my sequences have been codon optimized. I learned about the Biopython CodonUsage module and tried to get it running. When I run my code:
from Bio import SeqIO
from Bio.SeqUtils import CodonUsage
from Bio.SeqUtils.CodonUsage import CodonAdaptationIndex
Sequence = SeqIO.read("my_seq.fasta", format="fasta")
Seq_Cai = CodonUsage.CodonAdaptationIndex()
Seq_Cai.cai_for_gene(Sequence)
print(SeqCai)
I receive an error: "AttributeError: 'SeqRecord' object has no attribute 'islower' ". I looked that error up but cannot find a solution. Please forgive me if that question is stupid, I started coding a few days ago. Your help is very much appreciated!
Thanks, Philipp