Clustal Omega Output Not Correct
1
0
Entering edit mode
2.4 years ago
Grace • 0

Hello,

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: Alignment File Fasta Format

clustalomega biopython python • 1.4k views
ADD COMMENT
1
Entering edit mode
2.4 years ago
Joe 21k

Just specifying an extension isn't the same as telling clustal what output format you want. Extensions are arbitrary in Unix and just a convention.

You need to specify the outfmt option, as per here: https://biopython.org/docs/1.75/api/Bio.Align.Applications.html?highlight=clustalo#Bio.Align.Applications.ClustalOmegaCommandline

ADD COMMENT
0
Entering edit mode

Thank you for responding. I did try this, but it didn't seem to do anything. Thank you for your help.

ADD REPLY
0
Entering edit mode

What version of Biopython do you have?

ADD REPLY
0
Entering edit mode

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 clustalo command should do with something like you are trying with the addition of outfmt= "clu" in the arguments provided to ClustalOmegaCommandline, which results in --outfmt clu as 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.

ADD REPLY

Login before adding your answer.

Traffic: 1702 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6