Question: ClustalOmegaCommandline issue (alignment issue)
0
gravatar for benjamin
22 months ago by
benjamin0
benjamin0 wrote:

Hi all,

I'm actually using the ClustalOmegaCommandline package and everything is working except that the aligned sequence output is completly wrong. Indeed, when I run the programme on python3 I get an alignment such this one:

ok SingleLetterAlphabet() alignment with 2 rows and 1625 columns CEHNTAGRDCEKCLDFYNDAPWGRASPTNVHECKACNCNGFSNK...--- pro1 MGGKIAAILLFAFFTSGSRSEPDFVDGQFNKINKNRVEVKCYDD...LEP pro2

And I know that it should not be aligned like that; the above sequence should be aligned further in the frame (in other word we sould not see the AA in the display, but only "-")

Here is my code:

from Bio.Align.Applications import ClustalOmegaCommandline

in_file = "/Users/etudiant/Desktop/Horizon_project/busco/Divergence/prot_ali" out_file = "/Users/etudiant/Desktop/Horizon_project/busco/Divergence/output_alignment.fasta"

def align_v1 (Fasta):

clustal_cline=ClustalOmegaCommandline(infile=Fasta, outfile=out_file)
stdout, stderr = clustal_cline()

MultipleSeqAlignment = AlignIO.read(out_file, "fasta") 
print ("ok",MultipleSeqAlignment)

align_v1(in_file)

Does anybody has a solution for me?

thanks

alignment • 385 views
ADD COMMENTlink modified 22 months ago • written 22 months ago by benjamin0

Without seeing the sequences, it's hard to say anything. Have you tried aligning them using something else, e.g. web-based clustal omega or the command line tool directly ? One possibility is that your python wrapper doesn't actually do anything, possibly because it doesn't find/run clustalo (the Clustal Omega program) so check that you have clustalo installed and findable by your python script.

ADD REPLYlink written 22 months ago by Jean-Karim Heriche21k

benjamin.guinet : Please don't delete posts when they have at least one comment/answer. If you found a solution on your own post it as an answer so it can be useful to others in future.

ADD REPLYlink written 22 months ago by genomax78k
0
gravatar for benjamin
22 months ago by
benjamin0
benjamin0 wrote:

Hi, finnaly I resolved my problem. I used the wrong format (my file was not in fasta format) and the alphabet was wrong as well, I had to add alphabet=IUPACProtein from Bio.Alphabet.

Thanks all for your help.

ADD COMMENTlink written 22 months ago by benjamin0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1673 users visited in the last hour