I am having an issue with my biopython program. My project is due soon and I can't figure out what's going on.
I am running this code based on a tutorial, and I'm new to python. Here is my code:
from Bio import SeqIO from Bio.Align.Applications import ClustalOmegaCommandline clustalomega_cline = ClustalOmegaCommandline(infile="hla.fasta", outfile="alignment.aln", verbose=True, auto=True)
This gives a command that I can run and create the alignment. This works fine.
The issue here is that, from my research, I've read that Clustal Omega outputs information on which portions of the sequences are conserved and variable based on symbols (like "*" and ":", etc). My output file is just in fasta format, even though I specified "aln".
What am I doing wrong?
Here is some of the alignment.aln file:
Thank you for responding. I did try this, but it didn't seem to do anything. Thank you for your help.
What version of Biopython do you have?
If it didn't do 'anything', something is off. It would be nice to see what you actually changed and what did happen in response?
It should show an alignment with the Clustal style consensus symbols. The notebook I link to below shows what running biopython (version 1.79) to generate the command and then running the generated
clustalocommand should do with something like you are trying with the addition of
outfmt= "clu"in the arguments provided to
ClustalOmegaCommandline, which results in
--outfmt cluas part of the resulting command:
A Jupyter notebook with related code run is here.
Click here to launch that notebook in an active, temporary Jupyter session served via MyBinder.org with the environment specified here.