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
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.
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.