Need help with makeModels() testvar error
fruce-ki opened this issue · comments
I'm trying to run the F-statistic version of derfinder. I follow the example in the docs, with only difference that my fullcov
equivalent has five chromosomes instead of just one, and only two samples instead of a dozen. I've reached a dead end at attempting to make the models.
cv <- c("fpa7", "wt")
sampleDepths <- sampleDepth(collapseFullCoverage(allcov), 1)
sampleDepths
## fpa7-1.100% wt2-1.100%
## 24.53941 24.42730
demodels <- makeModels(sampleDepths, testvars=cv, adjustvars=NULL)
Error in makeModels(sampleDepths, testvars = cv, adjustvars = ifelse(length(cf) == :
The length of 'testvars' and the number of sample library size adjustments do not match.
The length of my testvars
is equal to the number of columns I got out of sampleDepth()
, and equal to the number of columns in each of the chromosome coverage tables in allcov
. From what I understand from the user guide example, testvar
is the category value of each sample. Two samples, two values.
The function documentation makes reference to columns in a coverageInfo$coverage
but there is no such variable in my session or in the user manual example, and there is no indication where to find it.
So from the available documentation and examples I cannot figure out what I'm doing wrong.
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] derfinderData_0.112.0 BiocInstaller_1.28.0 derfinder_1.12.6 rtracklayer_1.38.3 GenomicRanges_1.30.3 GenomeInfoDb_1.14.0
[7] IRanges_2.12.0 S4Vectors_0.16.0 BiocGenerics_0.24.0 data.table_1.10.4-3
loaded via a namespace (and not attached):
[1] Biobase_2.38.0 httr_1.3.1 RMySQL_0.10.14 bit64_0.9-7 splines_3.4.1
[6] foreach_1.4.4 GenomicFiles_1.14.0 Formula_1.2-2 bumphunter_1.20.0 assertthat_0.2.0
[11] latticeExtra_0.6-28 doRNG_1.6.6 blob_1.1.1 BSgenome_1.46.0 GenomeInfoDbData_1.0.0
[16] Rsamtools_1.30.0 progress_1.1.2 pillar_1.2.1 RSQLite_2.1.0 backports_1.1.2
[21] lattice_0.20-35 digest_0.6.15 RColorBrewer_1.1-2 XVector_0.18.0 checkmate_1.8.5
[26] qvalue_2.10.0 colorspace_1.3-2 htmltools_0.3.6 Matrix_1.2-14 plyr_1.8.4
[31] XML_3.98-1.10 biomaRt_2.34.2 zlibbioc_1.24.0 xtable_1.8-2 scales_0.5.0
[36] BiocParallel_1.12.0 tibble_1.4.2 htmlTable_1.11.2 pkgmaker_0.22 ggplot2_2.2.1
[41] SummarizedExperiment_1.8.1 GenomicFeatures_1.30.3 nnet_7.3-12 lazyeval_0.2.1 survival_2.41-3
[46] magrittr_1.5 memoise_1.1.0 foreign_0.8-69 registry_0.5 tools_3.4.1
[51] prettyunits_1.0.2 matrixStats_0.53.1 stringr_1.3.0 locfit_1.5-9.1 munsell_0.4.3
[56] rngtools_1.2.4 cluster_2.0.7-1 DelayedArray_0.4.1 AnnotationDbi_1.40.0 Biostrings_2.46.0
[61] compiler_3.4.1 rlang_0.2.0 grid_3.4.1 RCurl_1.95-4.10 iterators_1.0.9
[66] rstudioapi_0.7 VariantAnnotation_1.24.5 htmlwidgets_1.0 bitops_1.0-6 base64enc_0.1-3
[71] derfinderHelper_1.12.0 codetools_0.2-15 gtable_0.2.0 DBI_0.8 reshape2_1.4.3
[76] R6_2.2.2 GenomicAlignments_1.14.2 gridExtra_2.3 knitr_1.20 bit_1.1-12
[81] Hmisc_4.1-1 stringi_1.1.7 Rcpp_0.12.16 rpart_4.1-13 acepack_1.4.1
Oh. Fair enough. I normally would have more than 2 samples indeed.
Is that what's causing this error or can there be other things going on as well? This cause is certainly not reflected in the message.
Thanks!
Hi,
If you want more feedback, please give us a toy example or subset/anonymized version of your data and the full code that reproduces the error (like creating allcov
). Use a few more samples too so we can rule that being a part of the issue.
Best,
Leonardo
Hi @fruce-ki, should we close this issue?
Ok! If you need help with another issue please let us know. Best, Leo