Dear all,
I have used CopywriteR package with sequencing data and got an error.
Because I previously got a successful result with a different set of bam files, I think the problem would be the bam list (or some of the bam files), but I don't figure out what exactly is the problem.
My script, error messages and sessionInfo() are attached below.
Script:
library(CopywriteR) BAMlist="PATH/TO/BAMlist.txt" ref="PATH/TO/CONTROL.bam" data.folder="PATH/TO/DATAFOLDER" bin.size=50000 preCopywriteR(output.folder=file.path(data.folder),bin.size=bin.size,ref.genome="hg19") bp.param=SnowParam(workers=10, type="SOCK") samples=readLines(BAMlist) samples=c(samples,ref) controls=c(rep(ref,length(samples))) sample.control=data.frame(samples, controls) CopywriteR(sample.control=sample.control, destination.folder=file.path(data.folder), reference.folder=file.path(data.folder, "hg19_50kb"), bp.param=bp.param)
Error messages:
Error in .Method(..., deparse.level = deparse.level) : number of rows of matrices must match (see arg 2) Calls: CopywriteR ... f -> standardGeneric -> eval -> eval -> eval -> .Method In addition: Warning messages: 1: In .Method(..., deparse.level = deparse.level) : number of columns of result is not a multiple of vector length (arg 2) 2: In `[<-.data.frame`(`*tmp*`, , "total.properreads", value = list( : provided 174 variables to replace 1 variables 3: In Ops.factor(res$all.reads, res$chrom.reads) : '-' not meaningful for factors Execution halted
SessionInfo:
> sessionInfo() R version 3.2.1 (2015-06-18) Platform: x86_64-unknown-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux ComputeNode release 6.7 (Santiago) locale: [1] C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] CopywriteR_2.2.0 BiocParallel_1.2.7 loaded via a namespace (and not attached): [1] DNAcopy_1.44.0 chipseq_1.20.0 [3] XVector_0.10.0 GenomicRanges_1.22.4 [5] BiocGenerics_0.16.1 zlibbioc_1.14.0 [7] GenomicAlignments_1.6.3 IRanges_2.4.8 [9] lattice_0.20-33 hwriter_1.3.2 [11] GenomeInfoDb_1.6.3 SummarizedExperiment_1.0.2 [13] parallel_3.2.1 grid_3.2.1 [15] Biobase_2.28.0 data.table_1.9.6 [17] latticeExtra_0.6-28 lambda.r_1.1.7 [19] futile.logger_1.4.1 gtools_3.5.0 [21] matrixStats_0.50.2 RColorBrewer_1.1-2 [23] S4Vectors_0.8.11 futile.options_1.0.0 [25] bitops_1.0-6 CopyhelpeR_1.2.0 [27] Biostrings_2.38.4 Rsamtools_1.22.0 [29] stats4_3.2.1 ShortRead_1.26.0 [31] chron_2.3-47
Best,
Tom
Based on the error output (" '-' not meaningful for factors"), I'm guessing that the function doesn't like some of the names in
Keith,
Thank you for your reply. The head (n=5) of BAMlist.txt is: