Entering edit mode
9.6 years ago
sumithrasank75
▴
140
I want to align two sequnces in bipython using needleman wunsch algorithm
file1.faa
:
>seq_1
gagtcccagctgtgcctgactaaccgtgtttctcttgtatctaggagtgctcccaccccagcccgttgctgcccagctgtttaattgagttgtcatatgttaataacggtatattggaacactgtataacaccaacacactcgagtctttcaagactgcagataagaagctccttttggaacaagcagcaaatgaggttagctg
file2.faa
:
>seq_2
GAGTCCCAGCTGTGCCTGACTAACCGTGTTTCTCTTGTATCTAGGAGTGCTCCCACCCCAGCCCGTTGCTGCCCAGCTGTTTAATTGAGTTGTCATATGTTAATAACGGTATTGGAACACTGTATAACACCAACACACTCGAGTCTTTCAAGACTGCAGATAAGAAGCTCCTTTTGGAACAAGCAGCAAATGAGGTTAGCTGAGATCGGAAGAGCACACGTCTGAACTCCAGTCACTAGCGTTCTCATCT
I have tried
from Bio.Emboss.Applications import NeedleCommandline
from Bio import AlignIO
needle_cline = NeedleCommandline(asequence="file1.faa", bsequence="file2.faa",gapopen=10, gapextend=0.5, outfile="needle.txt")
But the output file needle.txt
does not get written. Can you help?
I did the above but I get an error
I have installed emboss, so I guess it is a path problem. Can you suggest a fix?
If you are using a Linux operating system, you can append the EMBOSS executables to your path by creating a file entitled EMBOSS.sh (name doesn't matter, but it has to be .sh) in
/etc/profile.d/
Make the contents of the file the following:
Then save the file and restart the terminal you are using python from. For other operating systems I unfortunately don't know how to append things to the PATH, but is should be easy to find out by a simple google search.