ClustalOmegaCommandline issue (alignment issue)
1
0
Entering edit mode
6.6 years ago
benjamin ▴ 10

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 • 1.3k views
ADD COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode
6.6 years ago
benjamin ▴ 10

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 COMMENT

Login before adding your answer.

Traffic: 2262 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