Hello, biostars! I have two fasta files for two different genes and want to create one data matrix. Is there any function in R for that? F.ex. if I have 2 DNAbin objects for that genes. Id numbers are identical in both files. I have the first file:
>sp1
aacc
>sp2
ggtt
the second file:
>sp1
ggaa
>sp2
ttgg
I want:
>sp1
aaccggaa
>sp2
ggttttgg
Python is also OK, but i'm interested in R.
Could you comment on the rationale behind what you're trying to do?
In few words: concatenated sequence matrix -> alignment -> phylogenetic tree
Is it some kind of homework question. I answered the same question 4-5 days back. See ehre: C: Combining dna sequences files into one
No, it's for my lab work. Your answer is also helpful, thanks.