Biostar Beta. Not for public use.
Question: R unused arguments, Biostrings
0
Entering edit mode

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?

ADD COMMENTlink 16 months ago gingergeiger22 • 0 • updated 16 months ago Vijay Lakhujani 4.1k
Entering edit mode
2

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.

ADD REPLYlink 16 months ago
rizoic
• 190
Entering edit mode
0

check which namespace the 'translate' function is defined in with find("translate"). It's likely you've imported a package that contains a translate function (other than Biostrings) that has a different set of parameters (eg Hmisc / AnnotationFuncs).

ADD REPLYlink 16 months ago
russhh
♦ 4.4k
Entering edit mode
0

Thanks for the tip, I tried this, and it returns Biostrings.

ADD REPLYlink 16 months ago
gingergeiger22
• 0
Entering edit mode
0

The Biostrings::translate worked. Thank you both!!

ADD REPLYlink 16 months ago
gingergeiger22
• 0

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.0