Entering edit mode
6.1 years ago
gingergeiger22
•
0
HI,
I'm trying to convert my nucleotide set in the nt.DNAString
column to an AA
sequence. I have:
library(Biostrings)
sample1$nt.DNAString <- DNAStringSet(sample1$seq.nt)
sample1$Seq.AA <- translate(sample1$nt.DNAString, genetic.code = GENETIC_CODE)
sample1$p226 <- paste(subseq(sample1_R1$Seq.AA, 5,5))
sample1$p227 <- paste(subseq(sample1_R1$Seq.AA, 6,6))
I keep getting this error:
Error in translate(sample1$nt.DNAString, genetic.code = "GENETIC_CODE", :
unused arguments (genetic.code = "GENETIC_CODE", if.fuzzy.codon = "error")
I thought the DNAStringSet
solved the vector issue with the data?
You can use the code option in the formatting box to format your code for easier readability. One of the possibilities is that you have loaded another library which also has a translate function and that is the function being called. You can try being explicit with
Biostrings::translate()
and check again.check which namespace the 'translate' function is defined in with
find("translate")
. It's likely you've imported a package that contains atranslate
function (other than Biostrings) that has a different set of parameters (eg Hmisc / AnnotationFuncs).Thanks for the tip, I tried this, and it returns Biostrings.
The Biostrings::translate worked. Thank you both!!