This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Generate consensus sequence without considering gaps

Hello.

I have a file with aligned amino acids like below. Each sequence is a fragment of the same protein, therefore, they are identical in some regions.

>seq1
-APQALVARPHVTAPSARRSSRPLLMR---
>seq2
-----LVARPHVTAPSARRSSRPLLMRAAG
>seq3
--PQALVARPHVTAPSARRSSRPLLMRA--
>seq4
SAPQALVARPHVTAPSARRSSRPLL-----

I would like to merge all sequences in one, generating a larger one.

I have tried to use seqinr::consensus in R, but as the gaps ("-") are more frequent than the aminoacids, I don't get the complete protein:

> consensus
--PQALVARPHVTAPSARRSSRPLLMR---

Can anyone help me with this issue, please?

seqinr r consensus fasta

1 answer

Use the EMBOSS suite of tools, I think EMBOSS Cons will do this with lots of options. https://www.bioinformatics.nl/cgi-bin/emboss/help/cons

Log in to answer this question.