[R] Biostrings

Herve Pages hpages at fhcrc.org
Mon Jan 29 20:47:01 CET 2007

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:

  - To create a DNAString object, just do:

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

  - To get the DNA alphabet, call alphabet() on a DNAString object:

      > 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:

       [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".

  - To get the mapping between the DNA alphabet and the set of ambiguities
    associated to each "extended" letter:

           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"

  - For more details, see:

      > ?DNAString



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 at 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.

More information about the R-help mailing list