This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How can I extract position information from multiple alignment format?

Hi

I have generated simple multiple alignment files using MAFFT.

mafft --clustalout mafft_input.txt > mafft_output.txt

And below is the output file

Screen-Shot-2020-02-13-at-12-01-12-PM

Is there anyway I can get position information of matching or deleted region?

Thanks in advance.

clustal mafft multiple-alignment

I don't think MAFFT works well for pairwise alignment. I think you can try local or global alignment tools or blast. And if you have a set of reads and a reference you can try bowtie2.

But if you want to parse your current output hopefully there's a tool oit there but if you want to write your own script a messy approach is that you can concatenate the second columns of lines that start with reference and name it str1 and do the same for lines that start with read and name it str2 and then compare these two strings. At each position check if the character is - or atcg,...

Thanks for your suggestion. I tried bowtie2 and bwa but both of them couldn't identify the gap even with 0 gap opening and gap penalty - they instead clipped the sequence. And then I also tried blastn but it gave 2 results matching only 5' or 3'.

Yes, that's exactly what I'm looking for. I'll take a look for biopython. Thanks for the suggestion.

0 answers

No answers yet.

Log in to answer this question.