This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Multiple Sequence Alignments In R

Hi,

Is there a native R package that does Multiple Sequence Alignments In R?

I am looking for something like pairwiseAlignment in Bioconductor which does not need installation of other softwares (e.g., CLUSTW and MUSCLE) to run.

Thanks

alignment r

1 answer

There is an R package muscle and I don't think it requires MUSCLE to be installed. Just to get you started:

> library(muscle)
> muscle(seqs = 'multi_sample.fa')

I tried and I get this error:
Error in rep(" ", jl) : invalid 'times' argument

what does it mean?

Is there any way you can share the link to your multi-fasta file?

Thanks for the comment. It is a small file so I just copy pasted it:

>tr|A5H237|A5H237_ELAGV Class I KNOX-like 1 protein OS=Elaeis guineensis var. tenera GN=KNOX1 PE=2 SV=1
MVSQYTSRTDRQIAREMEGRGGSGGGGDNSGLMGGFSDGSGSLSPLMIMPLMASRPVLPP
TPHMSNNGLFLPPPLSNAAGEDYDNSVIKAKIMAHPQYPRLLSAYVNCHKVGAPPEVVAR
LEEACATSLMMGRASSSSAAGDGGSGGGGGEDPALDQFMEAYCEMLTKYEQELSKPFKEA
MLFLSRIDAQFKSLSLSTPPPPQVYGEQLERNGSSEEEFGASENYVDPQAEDRELKGQLL
RKYSGYLSSLKQEFLKKRKKGKLPKEARQQLLDWWNRHYKWPYPSEAQKLALAQSTGLDQ
KQINNWFINQRKRHWKPSEEMQFVVMDTAHPHYFMDNSLGNPFPLDCAPALL
>tr|Q5GAB7|Q5GAB7_9TRAC KNOTTED1-like protein OS=Selaginella kraussiana GN=KNOX1 PE=2 SV=1
MELRGRRSTSQSPASTQDSTEVSMEQHLPPPRHPHPQQHEMGAMMVLMEESSNAHHHHLG
STSSMPPHQEQQQNPYRPSAAGEHQQQFFLPGMIKEESSPHHQQQQQNFLLPSSVFSMEN
ICWPTNDQADLMESMSPESADLCRNLSSQLEHFRKEIGTYHGAESSSQQHHLVSSASGSS
SGSYGVDKSLSVVPAVSLASDLLGSTSSQSSESEMLRAAIVSHPHYPELVVAHMNCHKVA
ASPEVVSQIDEIIQNFKDFQPPVAASLGANPELDQFMVAYYSMLLKCEKEVRKTFKEAVA
FCKKLDQQFQVITNGSASSVTSVESDDRNEAYDSSEDEDSGAEVEIEVDPMAKDKELKEQ
LMRKYSGYISSLKHEFLKKKKKGKLPKDSRQILLNWWSVHYKWPYPSESEKASLAESTGL
DQKQINNWFINQRKRHWKPSDELTALSGQPSQSTEASSGS
>tr|I6LJ15|I6LJ15_9LAMI KNOX1 (Fragment) OS=Streptocarpus glandulosissimus GN=KNOX1 PE=2 SV=1
AYLDCQKVGAPPEVVARLTAIRHEFEARQRAGGAAARDVSKDPELDQFMEAYYDMLVKYR
EELSRPLQEAMEFMRRIESQLNMITNCPVRILNSEEKCEGVVSSEEDQENSGGETELAEI
DPRAEDKELKNHLLRKYSGYLSSLKQELSKKKKKGKLPKDARQKLLSWWELHYKWPYPSE
SEKVALAESTGLDQKQIYNWFINQRKRHWEPSEDMQFMVM

I changed the names of your sequences to something short, and it is working fine.

Thanks. Any idea what was the problem?

Honestly I don't know. I tried to figure it out by removing the special characters like '|', '=', '-' and '_' but it doesn't seem to affect it. However, when I rename the sequences to something short, it works. Did you try renaming your sequences and re-running the command?

Yep, I changed it and it works. I just wonder what is the reason :-)

Log in to answer this question.