[BioC] Second pass at gcrma error

James W. MacDonald jmacdon at med.umich.edu
Mon Dec 17 19:08:33 CET 2007


Hi Dave,

Dave Jacoby wrote:
> I've struggled with makeProbePackage for a while now, working with my
> Probe, and getting nothing.
> Any attempt to use the probe packages I made would end up with
> //"Computing affinitiesError: length(prlen) == 1 is not TRUE".
> 
> //That would be using this as a script:
> 
> ---------------------8<-----------------------------------------
> library(matchprobes)
> 
> filename <- system.file( "extdata" , "AFLAVUSa520391F_probeseqs.txt" )
> outdir   <- '.'
> species  <- 'Aspergillus_flavus'
> me       <- "Dave Jacoby <jacoby at purdue.edu>"
> makeProbePackage( "AFLAVUSa520391F" ,
>                   datafile   = filename ,
>                   outdir     = outdir ,
>                   species    = species ,
>                   maintainer = me ,
>                   version    = '0.0.1' ,
>                   force      = TRUE )
> ---------------------8<-----------------------------------------
> 
> But there's a one-line fix that I've found. Replacing
> 
>     filename <- system.file( "extdata" , "AFLAVUSa520391F_probeseqs.txt" )
> 
> with
> 
>     filename <- list.files( pattern = "probeseqs.txt" )
> 
> gave me a working probe package for the first time. I hope this helps
> somebody.

Yes. That is a problem with blindly following the example from a help 
page without understanding what it does.

Since the example is expected to run and the only way for that to be 
true is to supply the example with a probe_tab file, there is a small 
file in the package itself that is used for that purpose. By calling 
system.file() the example will be able to find that file without having 
to explicitly state where it might be (which will vary depending on the 
OS and any personal libraries that may exist).

The canonical way to call makeProbePackage() doesn't even involve the 
datafile argument (which you can see isn't listed in the arguments 
section of the help page). All you need is something like:

makeProbePackage("AFLAVUSa520391F", species="Aspergillus_flavus", 
version="0.01", maintainer="Dave Jacoby <jacoby at purdue.edu>", 
force=TRUE, check=FALSE, build=FALSE)

This is the downside of having a workable example for a function that 
requires external data -- for the example to work you often need to 
utilize extra gymnastics that the end user won't need and arguably 
shouldn't emulate.

Best,

Jim


> 

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



More information about the Bioconductor mailing list