1

I am trying to do some Bioconductor exercises on R studio cloud. Running the first two codes (#1,#2) have been fine, but the last code(#3) gives the error message. Please can anyone help?

#1 Transcribe dna_seq into an RNAString object and print it
 dna_seq <- subseq(unlist(zikaVirus), end = 21)
 dna_seq
  21-letter "DNAString" instance
seq: AGTTGTTGATCTGTGTGAGTC



#2 Transcribe dna_seq into an RNAString object and print it
 rna_seq <- RNAString(dna_seq) 
 rna_seq
  21-letter "RNAString" instance
seq: AGUUGUUGAUCUGUGUGAGUC

#3 Translate rna_seq into an AAString object and print it
aa_seq <- translate(rna_seq)
aa_seq

 aa_seq <- translate(rna_seq)

Error in match(x, table, nomatch = 0L) : 'match' requires vector arguments aa_seq Error: object 'aa_seq' not found

NelsonGon
  • 13,015
  • 7
  • 27
  • 57
Bmb
  • 21
  • 4
  • 1
    Welcome to Stack Overflow. Please see the guidelines on how to make a minimal, reproducible example ([here](https://stackoverflow.com/help/minimal-reproducible-example)) and try to edit your question accordingly. As is, it's difficult to help you. – ulfelder Feb 03 '20 at 12:15
  • "exercises on R studio cloud" - please provide the link. List all the packages loaded in R. – zx8754 Feb 05 '20 at 07:16
  • @zx8754. Thank you. I managed to solve the problem: I think there was a clash with the translate() function because it is used by both the seqinr and Biostring packages(I loaded both). I had to unload seqinr, because the exercises I was doing were based on Biostrings. – Bmb Feb 11 '20 at 10:14
  • Post your comment as an answer below. https://stackoverflow.com/help/self-answer – zx8754 Feb 11 '20 at 10:22

1 Answers1

1

Thank you. I managed to solve the problem: I think there was a clash with the translate() function because it is used by both the seqinr and Biostring packages(I loaded both). I had to unload seqinr, because the exercises I was doing were based on the Biostring package.

Bmb
  • 21
  • 4
  • https://stackoverflow.com/questions/5564564/r-2-functions-with-the-same-name-in-2-different-packages – JamesR Aug 18 '23 at 21:13