trying to export DNA sequences into excel so that there are three nucleotides per column
I have a sequence of DNA randomised in 15 amino acid positions. we have amplified the DNA and sequenced and aligned it using galaxy and have bamfiles . what we would like to do now is to break up the aligned DNA into three so that it is sorted in codons and export into excel as three nucleotides into a column. Is this possible for each sequence?
• 2,151 views
•
link
1 answer
Please provide example input and expected output.
Here is an example using R:
x <- "12345678"
n <- 3
substring(x, seq(1, nchar(x), n), seq(n, nchar(x) + n - 1, n))
# [1] "123" "456" "78"
More solutions are at:
• 0 views
•
link
Log in to answer this question.
That one actually inspired me in the past to change my profile picture :)