Re: [aroma.affymetrix] How to: Create a CDF file from Bioconductor Platform Design (PD) Info package is miserably failing

2015-08-17 Thread Guillaume Devailly
Many thanks for the quick fix and the explanations.
Guillaume

-- 
-- 
When reporting problems on aroma.affymetrix, make sure 1) to run the latest 
version of the package, 2) to report the output of sessionInfo() and 
traceback(), and 3) to post a complete code example.


You received this message because you are subscribed to the Google Groups 
aroma.affymetrix group with website http://www.aroma-project.org/.
To post to this group, send email to aroma-affymetrix@googlegroups.com
To unsubscribe and other options, go to http://www.aroma-project.org/forum/

--- 
You received this message because you are subscribed to the Google Groups 
aroma.affymetrix group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to aroma-affymetrix+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [aroma.affymetrix] How to: Create a CDF file from Bioconductor Platform Design (PD) Info package is miserably failing

2015-08-14 Thread Henrik Bengtsson
Hi,

thank you.  I can reproduce this.  Explanation and fix below.

On Fri, Aug 14, 2015 at 5:27 PM, Guillaume Devailly gdevai...@gmail.com wrote:
 Hi,

 I was trying to run this :
 http://www.aroma-project.org/howtos/createCdfFromBioconductorPlatformDesignInfo/
 to create a mighty cdf file for HuGene-2_0-st affymetrix array from this
 bioconductor annotation package.

 When running the example code (after installing the appropriate packages) :

 library(aroma.affymetrix)
 library(pd.hugene.1.0.st.v1)
 pathname - writeCdf(pd.hugene.1.0.st.v1, tags =
 pd.hugene.1.0.st.v1,HB20110111, overwrite = TRUE)

 I obtained this error:
 pathname - writeCdf(pd.hugene.1.0.st.v1,
 tags=pd.hugene.1.0.st.v1,HB20110111, overwrite=TRUE)
 Loading required namespace: pdInfoBuilder
 Generating CDF file from Platform Design (PD) package...
  Platform Design (PD) package: pd.hugene.1.0.st.v1
  Output path: annotationData/chipTypes/HuGene-1_0-st-v1
  Filename: HuGene-1_0-st-v1,pd.hugene.1.0.st.v1,HB20110111.cdf
  Pathname to generated CDF:
 annotationData/chipTypes/HuGene-1_0-st-v1/HuGene-1_0-st-v1,pd.hugene.1.0.st.v1,HB20110111.cdf
  Chip type: HuGene-1_0-st-v1
  Tags: pd.hugene.1.0.st.v1,HB20110111
  Chip type dimensions: 1050x1050
  Total number of cells (probes): 1102500
  Querying Platform Design database...
   Units by: transcript
   Names by: fsetid
   Available database tables:
   [1] chrom_dict core_mps   featureSet level_dict pmfeature
   [6] table_info type_dict
   SQL query:

 SELECT DISTINCT
 --  fid,
   meta_fsetid AS probeset_id,
   atom,
   x,
   y
 FROM pmfeature
 INNER JOIN core_mps USING(fsetid)
 ORDER BY probeset_id, atom

   'data.frame': 861493 obs. of  4 variables:
$ probeset_id: int  7892501 7892501 7892501 7892501 7892502 7892502
 7892502 7892502 7892503 7892503 ...
$ atom   : int  1 2 3 5 7 10 11 12 13 14 ...
$ x  : int  870 28 638 888 108 411 918 958 928 495 ...
$ y  : int  110 899 469 863 984 622 657 949 361 447 ...
   'data.frame': 861493 obs. of  4 variables:
$ probeset_id: int  7892501 7892501 7892501 7892501 7892502 7892502
 7892502 7892502 7892503 7892503 ...
$ atom   : int  1 2 3 5 7 10 11 12 13 14 ...
$ x  : int  870 28 638 888 108 411 918 958 928 495 ...
$ y  : int  110 899 469 863 984 622 657 949 361 447 ...
   Number of cells (probes) in PD database: 861493 (78.14%) of 1102500
  Querying Platform Design database...done
  Number of units: 33297
  Unit names: 7892501, 7892502, 7892503, ..., 8180418
  Average number of cells per units: 25.87
  List of 3
   $ 7892501:'data.frame':   4 obs. of  4 variables:
..$ probeset_id: int [1:4] 7892501 7892501 7892501 7892501
..$ atom   : int [1:4] 1 2 3 5
..$ x  : int [1:4] 870 28 638 888
..$ y  : int [1:4] 110 899 469 863
   $ 7892502:'data.frame':   4 obs. of  4 variables:
..$ probeset_id: int [1:4] 7892502 7892502 7892502 7892502
..$ atom   : int [1:4] 7 10 11 12
..$ x  : int [1:4] 108 411 918 958
..$ y  : int [1:4] 984 622 657 949
   $ 7892503:'data.frame':   4 obs. of  4 variables:
..$ probeset_id: int [1:4] 7892503 7892503 7892503 7892503
..$ atom   : int [1:4] 13 14 17 18
..$ x  : int [1:4] 928 495 316 840
..$ y  : int [1:4] 361 447 686 698
 Error in affxparser::writeCdf(...) :
   unused argument (pathname =
 annotationData/chipTypes/HuGene-1_0-st-v1/HuGene-1_0-st-v1,pd.hugene.1.0.st.v1,HB20110111.cdf)


 I am a simple R user and not an advanced package-maker wizard, so what I
 will say next is likely to be absurd, but:

 1) AffyGenePDInfo.writeCdf.R source code:
 setMethodS3(writeCdf, AffyGenePDInfo, function(this, tags=c(*),
 unitsBy=c(transcript, exon), namesBy=c(fsetid, id), path=NULL,
 overwrite=FALSE, verbose=TRUE, ...) {
 [...]
   # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   # Writing CDF file
   # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   pathname - .writeCdf(ffs, pathname=pathname, overwrite=overwrite,
 verbose=less(verbose));
 [...]
 }

 setMethodS3(writeCdf, PDInfoList, function(ffs, pathname,
 overwrite=FALSE, ..., verbose=TRUE) {
 [...]
  pathnameT - pushTemporaryFile(pathname, verbose=verbose);

   .writeCdf(pathnameT, cdfheader=cdfHeader, cdf=cdfList,
   cdfqc=NULL, verbose=verbose, overwrite=overwrite);
 [...]
 }
 I am totaly confused by what is this .writeCdf function. Is it the writeCdf
 function from affxparser package?

 2) affxparser::writeCdf first parameter is fname and not pathname. Hence the
 error?
 writeCdf(fname, cdfheader, cdf, cdfqc, overwrite=FALSE, verbose=0)

You did a pretty good job nailing this one down.  The .writeCdf() is a
light-weight wrapper for calling affxparser::writeCdf() with the
feature of loading and the affxparser package. It's a trick to please
R CMD check and