Re: [R] Biostrings

From: Herve Pages <hpages_at_fhcrc.org>
Date: Mon 29 Jan 2007 - 19:47:01 GMT

qing wrote:
>
>
> Dear All,
>
> I am a beginner in learning the package of Biostrings currently and for
> practice doing an example.
>
> library(Biostrings);
> dnaAlph<-new("BioPatternAlphabet",DNAAlphabet(),c(N="AGCT",
> + B="CGT",D="AGT",H="ACT",K="GT",M="AC",R="AG",S="CG",
> + V="ACG",W="AT",Y="CT"));
> Error in getClass(Class, where = topenv(parent.frame())) :
> "BioPatternAlphabet" is not a defined class

Hi Qing,

"BioPatternAlphabet" was a class defined in Biostrings 1 (Biostrings version 1.y.z). In Biostrings 2, the class system has changed and you don't need to create an instance of the DNA alphabet anymore:

      > mydna <- DNAString("AGG-HCNTT")
      > mydna
        9-letter "DNAString" object
      Value: AGG-HCNTT

      > alphabet(mydna)
       [1] "A" "C" "G" "T" "M" "R" "S" "V" "W" "Y" "H" "K" "D" "B" "N" "-"

    or, if you don't have a DNAString instance yet:

      > DNA_ALPHABET
       [1] "A" "C" "G" "T" "M" "R" "S" "V" "W" "Y" "H" "K" "D" "B" "N" "-"

    Note that the "DNA alphabet" is the "IUPAC Extended Genetic Alphabet".

      > IUPAC_CODE_MAP
           A      C      G      T      M      R      W      S      Y      K      V
         "A"    "C"    "G"    "T"   "AC"   "AG"   "AT"   "CG"   "CT"   "GT"  "ACG"
           H      D      B      N
       "ACT"  "AGT"  "CGT" "ACGT"

      > ?DNAString

Cheers,

H.

PS: As Ducan said, the Bioconductor mailing list is a more appropriate place to ask help about a Bioconductor package.

>
> I am running R 2.4.1, Wimdows XP, Biostrings_2.2.1
> Any help or suggestions that you can provide will be greatly appreciated.
>
> Qing
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Jan 30 06:52:18 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 29 Jan 2007 - 20:30:42 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.