Qing Jing wrote:
> 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
[This is a copy/paste of the answer I've already sent to the R-help
list]
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:
> 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".
- To get the mapping between the DNA alphabet and the set of
ambiguities
associated to each "extended" letter:
> 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"
- For more details, see:
> ?DNAString
Cheers,
H.
Hi Qing,
Qing Jing wrote:
>
>
>
>
>
> Dear List??
>
>
>
>
> 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
The Biostrings package has been refactored quite a bit, and no longer
uses this class (a Google for 'BioPatternAlphabet' came up with a help
page for version 1.4.0, which was probably designed for BioC
1.7/R-2.2.1
or earlier).
There are four vignettes that come with the package. I am sure that
reading those should help shed some light on how the package works
now.
Best,
Jim
>
>
>
>
> 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
>
>
>
> [[alternative HTML version deleted]]
>
>
>
> --------------------------------------------------------------------
----
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
http://news.gmane.org/gmane.science.biology.informatics.conductor
--
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623
**********************************************************
Electronic Mail is not secure, may not be read every day, and should
not be used for urgent or sensitive issues.