[BioC] DWD method for batch effect removal

Dan Tenenbaum dtenenba at fhcrc.org
Thu Aug 8 01:04:04 CEST 2013


On Wed, Aug 7, 2013 at 3:47 PM, Li Liu <liliu_1 at hotmail.com> wrote:
> Hi Dan,
>
> Thank you very much for the reply.
>
> I try to install the old version of DWD so I don't need to wait for
> tomorrow's new version. However I am not quite familiar the installation.
> After download should I put the compressed file "DWD_0.10.tar.gz" in a
> specific folder or I should unzipped it first?
>


Actually, I don't think installing this old tarball of DWD will work
for you as it is a source tarball and requires a C compiler and other
tools to be installed in a very specific way.

I recommend either (1) waiting till tomorrow, (2) installing the
latest version of inSilicoMerging via Subversion, or (3) making the
change yourself.

To do (2), you need Subversion installed, see
http://www.bioconductor.org/developers/how-to/source-control/
for more information.
You would do this:

svn co https://hedgehog.fhcrc.org/bioconductor/branches/RELEASE_2_12/madman/Rpacks/inSilicoMerging/
R CMD INSTALL inSilicoMerging

To do (3), download the package from
http://www.bioconductor.org/packages/release/bioc/src/contrib/inSilicoMerging_1.4.0.tar.gz

Then open a command shell and navigate to the directory where the file
was downloaded.
Then uncompress the file, the usual way is
tar zxf InsilicoMerging_1.4.0.tar.gz
but if you don't have the tar command installed, you'll need to figure
out another way to do this. There are graphical programs available for
windows that will do this.

You will end up with an
InsilicoMerging
directory.
Edit two files in that directory:

edit DESCRIPTION and change the line
Version: 1.4.0
to
Version: 1.4.1

and edit R/dwd.R and change line 9 from this:

  res = kdwd(x=t(exprs(eset)), y=batchInfo, scaled=FALSE);

to this:

  res = kdwd(x=t(exprs(eset)), y=as.factor(batchInfo), scaled=FALSE);


Then, still in the command window, do this:
R CMD INSTALL InSilicoMerging

If that all seems like too much work, I again recommend waiting until tomorrow.

Dan




> Here is what I got in R after download the file and run install.packages.
>
> Many thanks,
>
> Li
>
>
>> install.packages("DWD_0.10.tar.gz", repos=NULL, type="source")
> Warning in install.packages :
>   package 慏WD_0.10.tar.gz?is not available (for R version 3.0.1)
> Installing package into 慍:/Users/lucy/Documents/R/win-library/3.0?(as 憀ib?is
> unspecified)
> Warning: invalid package 'DWD_0.10.tar.gz'
> Error: ERROR: no packages specified
> Warning in install.packages :
>   running command '"C:/PROGRA~1/R/R-30~1.1/bin/x64/R" CMD INSTALL -l
> "C:\Users\lucy\Documents\R\win-library\3.0" "DWD_0.10.tar.gz"' had status 1
> Warning in install.packages :
>   installation of package 慏WD_0.10.tar.gz?had non-zero exit status
> Warning message:
> '.path.package' is deprecated.
> Use 'path.package' instead.
> See help("Deprecated")
>
>> sessionInfo()
> R version 3.0.1 (2013-05-16)
> Platform: x86_64-w64-mingw32/x64 (64-bit)
>
> locale:
> [1] LC_COLLATE=English_Canada.1252  LC_CTYPE=English_Canada.1252
> [3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
> [5] LC_TIME=English_Canada.1252
>
> attached base packages:
> [1] parallel  stats     graphics  grDevices utils     datasets  methods
> base
>
> other attached packages:
> [1] inSilicoMerging_1.4.0 DWD_0.11              Matrix_1.0-12
> [4] lattice_0.20-15       hgu133acdf_2.12.0     AnnotationDbi_1.22.6
> [7] affy_1.38.1           Biobase_2.20.1        BiocGenerics_0.6.0
>
> loaded via a namespace (and not attached):
>  [1] affyio_1.28.0         BiocInstaller_1.10.3  DBI_0.2-7
>  [4] grid_3.0.1            IRanges_1.18.2        preprocessCore_1.22.0
>  [7] RSQLite_0.11.4        stats4_3.0.1          tools_3.0.1
> [10] zlibbioc_1.6.0
>
>
>
>
>> Date: Wed, 7 Aug 2013 11:37:49 -0700
>> Subject: Re: [BioC] DWD method for batch effect removal
>> From: dtenenba at fhcrc.org
>> To: liliu_1 at hotmail.com
>> CC: bioconductor at r-project.org; jtaminau at vub.ac.be; smeganck at vub.ac.be
>
>>
>> On Wed, Aug 7, 2013 at 11:04 AM, Li Liu <liliu_1 at hotmail.com> wrote:
>> > HI,
>> >
>> > I am using inSilicoMerging package to remove batch effect. A few merging
>> > methods, such as COMBAT, BMC, GENENORM, work well for me, so I suppose my
>> > dataset has no problem. However, when I use the method DWD, there is an
>> > error
>> > Error in is.factor(x) : object 'ybuf' not found
>> > Is there anybody who can help this?
>> >
>>
>> Seems like the problem is upstream in the DWD package. I've sent an
>> email with a bug report to the DWD maintainer. The problem seems
>> easily fixable. A workaround is to install an older version of DWD
>> from here:
>>
>> http://cran.r-project.org/src/contrib/Archive/DWD/DWD_0.10.tar.gz
>>
>> After downloading, you can install on the command line with
>> R CMD INSTALL DWD_0.10.tar.gz
>> or within R:
>>
>> install.packages("DWD_0.10.tar.gz", repos=NULL, type="source")
>>
>> Dan
>>
>>
>>
>> > Thanks.
>> >
>> > Li
>> >
>> >
>> >
>> >> esets=list(eset1, eset2, eset3, eset4, eset5, eset6)
>> >
>> >> # Merge esets by different methods
>> >
>> >> library(inSilicoMerging)
>> > Loading required package: DWD
>> > Loading required package: Matrix
>> > Loading required package: lattice
>> >
>> >
>> >> eset_NONE=merge(esets, method='NONE')
>> > INSILICOMERGING: Run NONE...
>> >
>> >> eset_BMC=merge(esets, method='BMC')
>> > INSILICOMERGING: Run BMC...
>> >
>> >> eset_COMBAT=merge(esets, method='COMBAT')
>> > INSILICOMERGING: Run COMBAT...
>> > INSILICOMERGING: => Found 6 batches
>> > INSILICOMERGING: => Found 0 covariate(s)
>> >
>> >> eset_GENENORM=merge(esets, method='GENENORM')
>> > INSILICOMERGING: Run GENENORM...
>> >
>> >> eset_DWD=merge(esets, method='DWD')
>> > INSILICOMERGING: Run DWD...
>> > Error in is.factor(x) : object 'ybuf' not found
>> >
>> >> sessionInfo()
>> > R version 3.0.1 (2013-05-16)
>> > Platform: x86_64-w64-mingw32/x64 (64-bit)
>> >
>> > locale:
>> > [1] LC_COLLATE=English_Canada.1252 LC_CTYPE=English_Canada.1252
>> > [3] LC_MONETARY=English_Canada.1252 LC_NUMERIC=C
>> > [5] LC_TIME=English_Canada.1252
>> >
>> > attached base packages:
>> > [1] parallel stats graphics grDevices utils datasets methods base
>> >
>> > other attached packages:
>> > [1] inSilicoMerging_1.4.0 DWD_0.11 Matrix_1.0-12
>> > [4] lattice_0.20-15 hgu133acdf_2.12.0 AnnotationDbi_1.22.6
>> > [7] affy_1.38.1 Biobase_2.20.1 BiocGenerics_0.6.0
>> >
>> > loaded via a namespace (and not attached):
>> > [1] affyio_1.28.0 BiocInstaller_1.10.3 DBI_0.2-7
>> > [4] grid_3.0.1 IRanges_1.18.2 preprocessCore_1.22.0
>> > [7] RSQLite_0.11.4 stats4_3.0.1 tools_3.0.1
>> > [10] zlibbioc_1.6.0
>> >
>> > [[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



More information about the Bioconductor mailing list