R unused arguments, Biostrings
0
0
Entering edit mode
3.0 years ago

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?

R Biostrings unused argument • 1.7k views
ADD COMMENT
2
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1715 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6