[BioC] error running makeProbePackage

Zhang, Jian jianz at amgen.com
Wed May 16 23:10:12 CEST 2012


> traceback()
6: ls(thecdf)
5: ls(thecdf)
4: .lgExtraParanoia(pt, cdfname)
3: getProbeDataAffy(arraytype = "gngnf1ba", datafile = "C:/testAffyILM/GPL1074.probe_tab")
2: do.call(importfun, c(arraytype = arraytype, pkgname = pkgname,
       list(...)))
1: makeProbePackage(arraytype = "gngnf1ba", datafile = "C:/testAffyILM/GPL1074.probe_tab",
       outdir = "C:/testAffyILM", maintainer = "Jian Zhang <jianz at amgen.com>",
       version = "0.0.1", species = "Homo_sapiens", check = FALSE,
       force = TRUE)

> getProbeDataAffy
function (arraytype, datafile, pkgname = NULL, comparewithcdf = TRUE)
{
    require(affy) || stop("Could not load library affy.")
    if (missing(datafile)) {
        datafile <- paste(arraytype, "_probe_tab", sep = "")
    }
    else {
        if (is(datafile, "character")) {
            datafile <- file(datafile, "r")
            on.exit(close(datafile))
        }
    }
    arraytype = cleancdfname(arraytype, addcdf = FALSE)
    cdfname = cleancdfname(arraytype)
    if (is.null(pkgname))
        pkgname = paste(arraytype, "probe", sep = "")
    int <- integer(0)
    chr <- ""
    what = list(chr, int, int, int, chr, chr)
    if (inherits(datafile, "connection")) {
        head <- scan(datafile, sep = "\t", quiet = TRUE, multi.line = FALSE,
            nlines = 1, what = "character")
        dat <- scan(datafile, sep = "\t", quiet = TRUE, multi.line = FALSE,
            what = what)
    }
    else {
        head <- scan(datafile, sep = "\t", quiet = TRUE, multi.line = FALSE,
            nlines = 1, what = "character")
        dat <- scan(datafile, sep = "\t", quiet = TRUE, multi.line = FALSE,
            what = what, skip = 1)
    }
    if ((any(unlist(head) != c("Probe Set Name", "Probe X", "Probe Y",
        "Probe Interrogation Position", "Probe Sequence", "Target Strandedness"))) &&
        (any(unlist(head) != c("Probe Set ID", "probe x", "probe y",
            "probe interrogation position", "probe sequence",
            "target strandedness")))) {
        mess = paste("The data file", datafile, "does not have the expected column names",
            "in its header line. Please make sure it is the right data file. If you are",
            "positive, you may need to write a customized data import function",
            "to replace 'getProbeDataAffy'. You may use 'getProbeDataAffy' as a template.",
            "Please see the help files for the functions 'getProbeDataAffy' and",
            "'makeProbePackage', and the makeProbePackage vignette in package AnnotationDbi.\n")
        stop(mess)
    }
    for (i in which(sapply(what, class) == "numeric")) {
        z = which(is.na(dat[[i]]))
        if (length(z) > 0)
            stop(paste("Corrupted data file: found non-number in line ",
                z[1], " of column ", head[i], ": ", dat[z[1],
                  i]), sep = "")
    }
    pt = data.frame(sequence = I(dat[[5]]), x = dat[[2]], y = dat[[3]],
        Probe.Set.Name = I(dat[[1]]), Probe.Interrogation.Position = dat[[4]],
        Target.Strandedness = dat[[6]])
    class(pt) = c("probetable", class(pt))
    dataEnv = new.env(parent = emptyenv())
    assign(pkgname, pt, envir = dataEnv)
    datasource = "The probe sequence data was obtained from http://www.affymetrix.com."
    if (is.character(datafile))
        datasource = paste(datasource, " The file name was ",
            gsub("_", "\\\\_", datafile), ".", sep = "")
    symVal = list(ARRAYTYPE = arraytype, DATASOURCE = datasource,
        NROW = as.character(nrow(pt)), NCOL = as.character(ncol(pt)))
    if (comparewithcdf)
        .lgExtraParanoia(pt, cdfname)
    return(list(pkgname = pkgname, symVal = symVal, dataEnv = dataEnv))
}
<environment: namespace:AnnotationDbi>

Jian

-----Original Message-----
From: James W. MacDonald [mailto:jmacdon at uw.edu]
Sent: Wednesday, May 16, 2012 2:02 PM
To: Zhang, Jian
Cc: Bioconductor at r-project.org
Subject: Re: [BioC] error running makeProbePackage

OK, after running that, what do you get from

traceback()

and what do you get if you type

getProbeDataAffy

Paste both, please.

Best,

Jim



On 5/16/2012 4:42 PM, Zhang, Jian wrote:
>> makeProbePackage( arraytype="gngnf1ba",datafile="C:/testAffyILM/GPL1074.probe_tab",
> + outdir="C:/testAffyILM",maintainer ="Jian Zhang<jianz at amgen.com>", version ="0.0.1",
> + species="Homo_sapiens", check = FALSE, force=TRUE)
> Importing the data.
> Error in as.environment(pos) : using 'as.environment(NULL)' is defunct
>
> Jian
>
> -----Original Message-----
> From: James W. MacDonald [mailto:jmacdon at uw.edu]
> Sent: Wednesday, May 16, 2012 1:40 PM
> To: Zhang, Jian
> Cc: Bioconductor at r-project.org
> Subject: Re: [BioC] error running makeProbePackage
>
> OK, run the code that you were using to create the package, and then
> paste the output.
>
> Best,
>
> Jim
>
>
>
> On 5/16/2012 4:32 PM, Zhang, Jian wrote:
>> Here you go:
>>
>> R version 2.15.0 (2012-03-30)
>> Platform: i386-pc-mingw32/i386 (32-bit)
>>
>> locale:
>> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252
>> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>> [5] LC_TIME=English_United States.1252
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] gngnf1bacdf_1.14.0   affy_1.34.0          AnnotationDbi_1.18.0 Biobase_2.16.0       BiocGenerics_0.2.0
>>
>> loaded via a namespace (and not attached):
>> [1] affyio_1.24.0         BiocInstaller_1.4.4   DBI_0.2-5             IRanges_1.14.3
>> [5] preprocessCore_1.18.0 RSQLite_0.11.1        stats4_2.15.0         tools_2.15.0
>> [9] zlibbioc_1.2.0
>>
>> Jian
>> -----Original Message-----
>> From: James W. MacDonald [mailto:jmacdon at uw.edu]
>> Sent: Wednesday, May 16, 2012 1:30 PM
>> To: Zhang, Jian
>> Cc: Bioconductor at r-project.org
>> Subject: Re: [BioC] error running makeProbePackage
>>
>> You forgot to
>>
>> library(AnnotationDbi)
>>
>> first.
>>
>> Jim
>>
>>
>>
>> On 5/16/2012 4:28 PM, Zhang, Jian wrote:
>>> Jim,
>>>
>>> Sorry about the mess up with the responses.  I did not mean to take it off the list,  just wasn't aware how to use the list.
>>> This was the first time I was using any list like this.  My sincere apologies.
>>>
>>> Here I try again for what you asked:
>>>
>>> R version 2.15.0 (2012-03-30)
>>> Platform: i386-pc-mingw32/i386 (32-bit)
>>>
>>> locale:
>>> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252
>>> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>>> [5] LC_TIME=English_United States.1252
>>>
>>> attached base packages:
>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>
>>> Jian
>>>
>>> -----Original Message-----
>>> From: James W. MacDonald [mailto:jmacdon at uw.edu]
>>> Sent: Wednesday, May 16, 2012 1:19 PM
>>> To: Zhang, Jian
>>> Cc: Bioconductor at r-project.org
>>> Subject: Re: [BioC] error running makeProbePackage
>>>
>>> Hi Jian,
>>>
>>> First off, please don't take things off-list. We like to think of the
>>> list archives as a searchable resource, and if you take things off-list
>>> it diminishes that goal.
>>>
>>>
>>> On 5/16/2012 4:13 PM, Zhang, Jian wrote:
>>>> Jim,
>>>>
>>>> Here is the output you asked:
>>>>
>>>> Error in `?`(sessionInfo(), AFAIK) :
>>> You misunderstand me. I don't want you to cut and paste things from my
>>> response. I want you to load AnnotationDbi into an R session, then type
>>>
>>> sessionInfo()
>>>
>>> at the R prompt, then paste what you get into your response. You should
>>> get something like this:
>>>
>>>     >    sessionInfo()
>>> R version 2.15.0 RC (2012-03-25 r58832)
>>> Platform: x86_64-unknown-linux-gnu (64-bit)
>>>
>>> locale:
>>>      [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>>>      [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>>>      [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>>>      [7] LC_PAPER=C                 LC_NAME=C
>>>      [9] LC_ADDRESS=C               LC_TELEPHONE=C
>>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>>>
>>> attached base packages:
>>> [1] tcltk     stats     graphics  grDevices utils     datasets  methods
>>> [8] base
>>>
>>> other attached packages:
>>>      [1] mogene10sttranscriptcluster.db_8.0.1 org.Mm.eg.db_2.7.1
>>>      [3] mogene10stv1probe_2.10.0             BiocInstaller_1.4.4
>>>      [5] maSigPro_1.28.0                      DynDoc_1.34.0
>>>      [7] widgetTools_1.34.0                   affycoretools_1.29.7
>>>      [9] KEGG.db_2.7.1                        GO.db_2.7.1
>>> [11] AnnotationDbi_1.19.0                 affy_1.35.1
>>> [13] Biobase_2.16.0                       BiocGenerics_0.2.0
>>> [15] pd.mogene.1.0.st.v1_3.6.0            RSQLite_0.11.1
>>> [17] DBI_0.2-5                            limma_3.12.0
>>> [19] oligo_1.20.3                         oligoClasses_1.18.0
>>>
>>> loaded via a namespace (and not attached):
>>>      [1] affxparser_1.28.0     affyio_1.24.0         annaffy_1.28.0
>>>      [4] annotate_1.34.0       biomaRt_2.12.0        Biostrings_2.24.1
>>>      [7] bit_1.1-8             Category_2.22.0       codetools_0.2-8
>>> [10] ff_2.2-7              foreach_1.4.0         gcrma_2.28.0
>>> [13] gdata_2.8.2           genefilter_1.38.0     GOstats_2.22.0
>>> [16] gplots_2.10.1         graph_1.34.0          grid_2.15.0
>>> [19] GSEABase_1.18.0       gtools_2.6.2          IRanges_1.14.3
>>> [22] iterators_1.0.6       lattice_0.20-6        Mfuzz_2.14.0
>>> [25] preprocessCore_1.18.0 RBGL_1.32.0           RCurl_1.91-1
>>> [28] splines_2.15.0        stats4_2.15.0         survival_2.36-14
>>> [31] tkWidgets_1.34.0      tools_2.15.0          XML_3.9-4
>>> [34] xtable_1.7-0          zlibbioc_1.2.0
>>>
>>> Best,
>>>
>>> Jim
>>>
>>>
>>>>       c("no documentation of type 'list(platform = \"i386-pc-mingw32\", arch = \"i386\", os = \"mingw32\", system = \"i386, mingw32\", status = \"\", major = \"2\", minor = \"15.0\", year = \"2012\", month = \"03\", day = \"30\", `svn rev` = \"58871\", language = \"R\", version.string = \"R version 2.15.0 (2012-03-30)\", nickname = \"\")' and topic 'AFAIK' (or error in processing help)", "no documentation of type 'i386-pc-mingw32/i386 (32-bit)' and topic 'AFAIK' (or error in processing help)", "no documentation of type 'LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252' and topic 'AFAIK' (or error in processing help)",
>>>> "no documentation of type 'c(\"stats\", \"graphics\", \"grDevices\", \"utils\", \"datasets\", \"methods\", \"base\")' and topic 'AFAIK' (or error in processing help)", "no documentation of type 'list(gngnf1bacdf = list(Package = \"gngnf1bacdf\", Title = \"g
>>>>
>>>> Jian
>>>>
>>>> -----Original Message-----
>>>> From: James W. MacDonald [mailto:jmacdon at uw.edu]
>>>> Sent: Wednesday, May 16, 2012 11:51 AM
>>>> To: Zhang, Jian
>>>> Cc: bioconductor at r-project.org
>>>> Subject: Re: [BioC] error running makeProbePackage
>>>>
>>>> Hi Jian,
>>>>
>>>> On 5/16/2012 2:27 PM, Zhang, Jian wrote:
>>>>> Hi,
>>>>>
>>>>> I try to use R-1.15.0 and Bionconductor 2.10 makeProbePackage() in AnnotationDbi to make probe package for a custom microarray.
>>>>> It worked on my Windows Vista machine,  but failed on my Windows 7 machine with the following message:
>>>>>
>>>>> Error in as.environment(pos) : using 'as.environment(NULL)' is defunct
>>>>>
>>>>> Does anyone have experience with this problem?  Any suggestion for solution is appreciated!
>>>> What is the output of sessionInfo()? AFAIK, as.environment(NULL) hasn't
>>>> been used in a core BioC package for years - R-core deprecated and
>>>> defuncteded (new word!) that paradigmatic use of as.environment before 2006!
>>>>
>>>> Best,
>>>>
>>>> Jim
>>>>
>>>>
>>>>> Jian Zhang
>>>>>
>>>>>
>>>>>           [[alternative HTML version deleted]]
>>>>>
>>>>> _______________________________________________
>>>>> Bioconductor mailing list
>>>>> Bioconductor at r-project.org
>>>>> 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
>>>> University of Washington
>>>> Environmental and Occupational Health Sciences
>>>> 4225 Roosevelt Way NE, # 100
>>>> Seattle WA 98105-6099
>>>>
>>> --
>>> James W. MacDonald, M.S.
>>> Biostatistician
>>> University of Washington
>>> Environmental and Occupational Health Sciences
>>> 4225 Roosevelt Way NE, # 100
>>> Seattle WA 98105-6099
>>>
>> --
>> James W. MacDonald, M.S.
>> Biostatistician
>> University of Washington
>> Environmental and Occupational Health Sciences
>> 4225 Roosevelt Way NE, # 100
>> Seattle WA 98105-6099
>>
> --
> James W. MacDonald, M.S.
> Biostatistician
> University of Washington
> Environmental and Occupational Health Sciences
> 4225 Roosevelt Way NE, # 100
> Seattle WA 98105-6099
>

--
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list