error running ChAMP vignette example
0
0
Entering edit mode
@hamid-bolouri-4258
Last seen 4.1 years ago
United States

hi; I get:

Error in sort(abs(diff(genomdat)))[1:n.keep] :
  only 0's may be mixed with negative subscripts

running ChAMP's vignette example. Details below. Could anyone suggest a fix?

Thanks

Hamid

# code, stdout, traceback() and sessionInfo() follows:

library(ChAMP)

library(ChAMPdata)

data(testDataSet)
testDir=system.file("extdata",package="ChAMPdata")

setwd('~/DELVE')
champ.process(directory = testDir)


# stdout:
Creating results directory. Results will be saved in /home/hbolouri/DELVE/resultsChamp
Loading data from /home/hbolouri/R/x86_64-pc-linux-gnu-library/3.2/ChAMPdata/extdata
[read.450k.sheet] Found the following CSV files:
[1] "/home/hbolouri/R/x86_64-pc-linux-gnu-library/3.2/ChAMPdata/extdata/lung_test_set.csv"
The fraction of failed positions per sample:
          C1           C2           C3           C4           T1           T2
0.0013429122 0.0022162171 0.0003563249 0.0002842360 0.0003831007 0.0011946152
          T3           T4
0.0014953286 0.0015447610
Filtering probes with a detection p-value above 0.01 in one or more samples has removed 2728 probes from the analysis. If a large number of probes have been removed, ChAMP suggests you look at the failedSample.txt file to identify potentially bad samples.
Filtering probes with a beadcount <3 in at least 5% of samples, has removed 9291 from the analysis.
Filtering probes with SNPs as identified in Nordlund et al, has removed 28458 from the analysis.
Filtering probes that align to multiple locations as identified in Nordlund et al, has removed 8312 from the analysis.
Filtering probes on the X or Y chromosome has removed 10940 from the analysis.
The analysis will proceed with 425783 probes and 8 samples.
Normalizing data with BMIQ
[1] "Fitting EM beta mixture to type1 probes"


<... cut for brevity ...>


[1] "Done"
[1] "Start normalising type 2 probes"
[1] "Finished for sample T2"
[1] "Fitting EM beta mixture to type1 probes"
[1] Inf
[1] 0.004497065
[1] 0.005890687
[1] 0.006997514
[1] 0.007229228
[1] 0.007104267
[1] 0.006834788
[1] 0.006505625
[1] 0.006150329
[1] 0.005782323
[1] "Done"
[1] "Fitting EM beta mixture to type2 probes"
[1] Inf
[1] 0.003886825
[1] 0.002176173
[1] 0.001246952
[1] 0.0007162292
[1] "Done"
[1] "Start normalising type 2 probes"
[1] "Finished for sample T3"
[1] "Fitting EM beta mixture to type1 probes"
[1] Inf
[1] 0.005654059
[1] 0.00661127
[1] 0.007501922
[1] 0.007701311
[1] 0.00756876
[1] 0.007283871
[1] 0.006929394
[1] 0.006544487
[1] 0.006147473
[1] "Done"
[1] "Fitting EM beta mixture to type2 probes"
[1] Inf
[1] 0.009487672
[1] 0.005298187
[1] 0.003596222
[1] 0.002807332
[1] 0.00242466
[1] 0.00223684
[1] 0.002144155
[1] 0.002096286
[1] 0.002066967
[1] "Done"
[1] "Start normalising type 2 probes"
[1] "Finished for sample T4"
Performing SVD
[1] 4
[1] 0
[1] 4
     [,1]   [,2]
[1,] "TRUE" "Sample_Well"
[2,] "TRUE" "Sample_Group"
[3,] "TRUE" "Slide"
[4,] "TRUE" "Array"
Preparing files for ComBat
Your data is being logit transformed before batch correction
Beginning batch correction
Found 3 batches
Found 1  categorical covariate(s)
Standardizing Data across genes
Fitting L/S model and finding priors
Finding parametric adjustments
Adjusting the Data
Your data is being inverse logit transformed
Run Probe Lasso DMR Hunter
[1] "contrast C T"
You have found 89194 significant MVPs with a BH adjusted P-value below 0.05
You have found 2559 DMRs.
You have found 2559 significant DMRs with a dmr.p < 0.05.
Run champ.CNA
You have chosen Control as the reference and this does not exist in your sample sheet (column Sample_Group). The analysis will run with ChAMP blood controls.
champ.CNA is using the samples you have defined as champCtl as the reference for calculating copy number aberrations.
As you are using the ChAMP controls Combat cannot adjust for batch effects. Batch effects may affect your dataset.
Saving Copy Number information for each Sample
Error in sort(abs(diff(genomdat)))[1:n.keep] :
  only 0's may be mixed with negative subscripts

> traceback()
4: trimmed.variance(genomdat[ina], trim)
3: smooth.CNA(CNA.object)
2: champ.CNA(intensity = myLoad$intensity, pd = myLoad$pd, batchCorrect = batchCorrect,
       resultsDir = resultsDir, sampleCNA = sampleCNA, plotSample = plotSample,
       groupFreqPlots = groupFreqPlots, freqThreshold = freqThreshold)
1: champ.process(directory = testDir)

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS

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=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
 [1] IlluminaHumanMethylation450kmanifest_0.4.0
 [2] ChAMP_1.8.0
 [3] Illumina450ProbeVariants.db_1.6.0
 [4] minfi_1.16.0
 [5] bumphunter_1.10.0
 [6] locfit_1.5-9.1
 [7] iterators_1.0.8
 [8] foreach_1.4.3
 [9] Biostrings_2.38.2
[10] XVector_0.10.0
[11] SummarizedExperiment_1.0.1
[12] GenomicRanges_1.22.2
[13] GenomeInfoDb_1.6.1
[14] IRanges_2.4.6
[15] S4Vectors_0.8.5
[16] lattice_0.20-33
[17] Biobase_2.30.0
[18] BiocGenerics_0.16.1
[19] ChAMPdata_1.8.0
[20] BiocInstaller_1.20.1

loaded via a namespace (and not attached):
 [1] nor1mix_1.2-1           splines_3.2.2           ellipse_0.3-8
 [4] doRNG_1.6               Rsamtools_1.22.0        impute_1.44.0
 [7] RSQLite_1.0.0           limma_3.26.8            quadprog_1.5-5
[10] digest_0.6.9            RColorBrewer_1.1-2      colorspace_1.2-6
[13] Matrix_1.2-3            preprocessCore_1.32.0   plyr_1.8.3
[16] GEOquery_2.36.0         siggenes_1.44.0         XML_3.98-1.3
[19] mixOmics_5.2.0          biomaRt_2.26.1          genefilter_1.52.0
[22] zlibbioc_1.16.0         xtable_1.8-0            corpcor_1.6.8
[25] scales_0.3.0            BiocParallel_1.4.3      annotate_1.48.0
[28] mgcv_1.8-10             beanplot_1.2            pkgmaker_0.22
[31] ggplot2_2.0.0           GenomicFeatures_1.22.7  survival_2.38-3
[34] magrittr_1.5            mclust_5.1              RPMM_1.20
[37] nlme_3.1-122            MASS_7.3-45             tools_3.2.2
[40] registry_0.3            matrixStats_0.50.1      stringr_1.0.0
[43] munsell_0.4.2           cluster_2.0.3           rngtools_1.2.4
[46] AnnotationDbi_1.32.3    lambda.r_1.1.7          base64_1.1
[49] futile.logger_1.4.1     grid_3.2.2              RCurl_1.95-4.7
[52] marray_1.48.0           igraph_1.0.1            bitops_1.0-6
[55] DNAcopy_1.44.0          gtable_0.1.2            codetools_0.2-14
[58] multtest_2.26.0         DBI_0.3.1               reshape_0.8.5
[61] illuminaio_0.12.0       GenomicAlignments_1.6.1 rtracklayer_1.30.1
[64] wateRmelon_1.10.0       futile.options_1.0.0    stringi_1.0-1
[67] sva_3.18.0              Rcpp_0.12.3

 

software error champ • 1.4k views
ADD COMMENT
0
Entering edit mode

I can reproduce this. It turns out that the vignette chunk that runs champ.process() is marked eval=FALSE, so doesn't actually get run when the vignette is built. It's probably because it takes quite a while to run, but it ends up masking this error.

Hopefully the ChAMP author will respond to this post. I might suggest to them (in addition to fixing this issue) adding a unit test to test it so that we have some assurance that the issue is fixed when we run R CMD check.

ADD REPLY
0
Entering edit mode

Wow, that was quick! Thanks Dan. --H

ADD REPLY

Login before adding your answer.

Traffic: 468 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6