Error with oligo: environmentIsLocked
Entering edit mode
Claudia ▴ 10
Last seen 7.1 years ago

Dear all.

When trying to read my cel files (Affymetric Hugene 1.0 ST array) with the oligo package, if I add the phenoData I receive this error:

> phenoData <- read.table("pheno.txt", sep="\t", header=TRUE)
> <- read.celfiles(filenames=list.celfiles(), phenoData=phenoData)

Error in environmentIsLocked(object) : not an environment

phenoData contains a list of all the cel files with the same names and in the same order.

If I just read the cel files, without adding the phenodata, I don't receive the error. Do you have any idea on what I am doing wrong and how can I add my phenotype?

Also, if I try to use genefilter, I receive this error:

​> eset <- rma(
> esetf<-nsFilter(eset)

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘columns’ for signature ‘"AffyGenePDInfo"’

Thanks a lot for your help.



Output of sessionInfo()

R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods  
[9] base     

other attached packages:
 [1] genefilter_1.50.0 RSQLite_1.0.0             
 [4] DBI_0.3.1                  oligo_1.32.0               Biostrings_2.36.1         
 [7] XVector_0.8.0              IRanges_2.2.5              S4Vectors_0.6.1           
[10] Biobase_2.28.0             oligoClasses_1.30.0        BiocGenerics_0.14.0       

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.30.1  affxparser_1.40.0     GenomicRanges_1.20.5 
 [4] splines_3.2.1         zlibbioc_1.14.0       bit_1.1-12           
 [7] xtable_1.7-4          foreach_1.4.2         GenomeInfoDb_1.4.1   
[10] tools_3.2.1           ff_2.2-13             iterators_1.0.7      
[13] survival_2.38-1       preprocessCore_1.30.0 affyio_1.36.0        
[16] codetools_0.2-14      BiocInstaller_1.18.4  XML_3.98-1.3         
[19] annotate_1.46.1      

oligo bioconductor genefilter • 2.7k views
Entering edit mode
Last seen 7 hours ago
United States

You will usually have better luck adding the phenoData object after you read in the data. Also note that read.table() doesn't generate something that can be directly used in the phenoData slot. You have to generate an AnnotatedDataFrame, which is a relatively complicated object. You can see an example on the help page: ?AnnotatedDataFrame-class

 df <- data.frame(x=1:6,
                      y=rep(c("Low", "High"),3),
                      row.names=paste("Sample", 1:6, sep="_"))
     metaData <-
                    "Factor levels",
     AnnotatedDataFrame(data=df, varMetadata=metaData)

Note that the row.names of the data.frame that you use for the 'data' argument has to have row.names that are identical to the sampleNames of your GeneFeatureSet, or it won't work. So I would in general do something like <- read.celfiles(filenames=list.celfiles())

phenoData <- read.table("pheno.txt", sep="\t", header=TRUE)

row.names(phenoData) <- sampleNames(

pd <- AnnotatedDataFrame(data= pd)

phenoData( <- pd

And if you have a mismatch in your phenoData, you will get an error at this last step.

As for the question about using nsFilter(), that is because by default the annotation slot of the ExpressionSet contains the name of the pdInfoPackage used to do the mapping of probes to probesets, rather than the annotation package that maps probesets to genes. You can easily change that:

annotation(eset) <- "hugene10sttranscriptcluster.db"

and then nsFilter() should work.

Entering edit mode

Dear James,

once more, thank you so much for your time and precious help: everything works now .



Login before adding your answer.

Traffic: 343 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6