Dear list,
I have a problem when I try to use the IlluminaHumanMethylation27k.db
(in marticular the method IlluminaHumanMethylation27kCHR) package from
a
package I am writing.
In a previous post I asked how to integrate the information about the
chromosomes in a MethyLumiM object. Tim (thanks for your help)
suggested
me this solution:
/fData(AML)$chrom<- as.factor(unlist(mget(featureNames(AML),
IlluminaHumanMethylation27kCHR)))/
It works perfectly if I use it from command line. But when I launch
the
same command from my package I have the following error:
*/Error in mget(featureNames(lumiMethy),
IlluminaHumanMethylation27kCHR) :
second argument must be an environment/*
/
/Inside the namespace of my package, I import the entire package
IlluminaHumanMethylation27k.db.
To solve the problem, I have already tried to use "as.environment()"
and
to require() the IlluminaHumanMethylation27k.db package inside mine. I
tried also to use the function "getAnnMap" specifying as type "env".
Nothing worked.
Any new suggestion is welcomed!!!
Many thanks!
Francesco
> sessionInfo()
R version 2.12.2 (2011-02-25)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] tcltk grid splines stats graphics grDevices
utils datasets methods base
other attached packages:
[1] IlluminaHumanMethylation27k.db_1.4.0
org.Hs.eg.db_2.4.6 AnnotationDbi_1.12.0
[4] HumMeth27QCReport_1.2.0
RSQLite_0.9-4 DBI_0.2-5
[7] WriteXLS_2.1.0
plotrix_3.0-9 gplots_2.8.0
[10] caTools_1.11
bitops_1.0-4.1 gdata_2.8.1
[13] gtools_2.6.2
Hmisc_3.8-3 survival_2.36-5
[16] amap_0.8-5
lumi_2.2.1 methylumi_1.6.1
[19] Biobase_2.10.0
loaded via a namespace (and not attached):
[1] affy_1.28.0 affyio_1.18.0 annotate_1.28.0
cluster_1.13.3 hdrcde_2.15 KernSmooth_2.23-4
[7] lattice_0.19-17 MASS_7.3-11 Matrix_0.999375-46
mgcv_1.7-3 nlme_3.1-98 preprocessCore_1.12.0
[13] xtable_1.5-6
--
*Francesco Mattia Mancuso*
- Bioinformatician at Bioinformatics Core Facility
- Bioinformatician at Proteomics Core Facility
CRG-Centre for Genomic Regulation
C/ Dr. Aiguader, 88
Edif. PRBB
08003 Barcelona, Spain
Telephone: +34 933160202
francesco.mancuso@crg.es <mailto:francesco.mancuso@crg.es>
www.crg.es <http: pasteur.crg.es="" portal="" page="" portal="" internet=""/>
[[alternative HTML version deleted]]
Thanks to Martin Morgan and Tim Triche I solved the problem.
The mget generic function is defined in AnnotationDbi. Simply, I was
not
importing this function into my package getting base::mget, which
doesn't know anything about the AnnotationDbi packages.
So adding in the DESCRIPTION file
* Imports: AnnotationDbi*
and in the NAMESPACE file
* importMethodsFrom(AnnotationDbi, mget)*
the package works fine.
Best,
Francesco
On 02/03/2011 11:03, Francesco Mancuso wrote:
> Dear list,
> I have a problem when I try to use the
IlluminaHumanMethylation27k.db
> (in marticular the method IlluminaHumanMethylation27kCHR) package
from
> a package I am writing.
>
> In a previous post I asked how to integrate the information about
the
> chromosomes in a MethyLumiM object. Tim (thanks for your help)
> suggested me this solution:
>
> /fData(AML)$chrom<- as.factor(unlist(mget(featureNames(AML),
> IlluminaHumanMethylation27kCHR)))/
>
> It works perfectly if I use it from command line. But when I launch
> the same command from my package I have the following error:
>
> */Error in mget(featureNames(lumiMethy),
> IlluminaHumanMethylation27kCHR) :
> second argument must be an environment/*
> /
> /Inside the namespace of my package, I import the entire package
> IlluminaHumanMethylation27k.db.
> To solve the problem, I have already tried to use "as.environment()"
> and to require() the IlluminaHumanMethylation27k.db package inside
> mine. I tried also to use the function "getAnnMap" specifying as
type
> "env". Nothing worked.
>
> Any new suggestion is welcomed!!!
>
> Many thanks!
> Francesco
>
>
> > sessionInfo()
> R version 2.12.2 (2011-02-25)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8
>
> attached base packages:
> [1] tcltk grid splines stats graphics grDevices
> utils datasets methods base
>
> other attached packages:
> [1] IlluminaHumanMethylation27k.db_1.4.0
> org.Hs.eg.db_2.4.6 AnnotationDbi_1.12.0
> [4] HumMeth27QCReport_1.2.0
> RSQLite_0.9-4 DBI_0.2-5
> [7] WriteXLS_2.1.0
> plotrix_3.0-9 gplots_2.8.0
> [10] caTools_1.11
> bitops_1.0-4.1 gdata_2.8.1
> [13] gtools_2.6.2
> Hmisc_3.8-3 survival_2.36-5
> [16] amap_0.8-5
> lumi_2.2.1 methylumi_1.6.1
> [19] Biobase_2.10.0
>
> loaded via a namespace (and not attached):
> [1] affy_1.28.0 affyio_1.18.0 annotate_1.28.0
> cluster_1.13.3 hdrcde_2.15 KernSmooth_2.23-4
> [7] lattice_0.19-17 MASS_7.3-11 Matrix_0.999375-46
> mgcv_1.7-3 nlme_3.1-98 preprocessCore_1.12.0
> [13] xtable_1.5-6
>
>
>
> --
>
> *Francesco Mattia Mancuso*
> - Bioinformatician at Bioinformatics Core Facility
> - Bioinformatician at Proteomics Core Facility
>
> CRG-Centre for Genomic Regulation
> C/ Dr. Aiguader, 88
> Edif. PRBB
> 08003 Barcelona, Spain
>
> Telephone: +34 933160202
> francesco.mancuso@crg.es <mailto:francesco.mancuso@crg.es>
> www.crg.es <http: pasteur.crg.es="" portal="" page="" portal="" internet=""/>
--
*Francesco Mattia Mancuso*
- Bioinformatician at Bioinformatics Core Facility
- Bioinformatician at Proteomics Core Facility
CRG-Centre for Genomic Regulation
C/ Dr. Aiguader, 88
Edif. PRBB
08003 Barcelona, Spain
Telephone: +34 933160202
francesco.mancuso@crg.es <mailto:francesco.mancuso@crg.es>
www.crg.es <http: pasteur.crg.es="" portal="" page="" portal="" internet=""/>
[[alternative HTML version deleted]]