CopywriteR error: "Error in .Method"
1
0
Entering edit mode
Tom ▴ 10
@tom-10763
Last seen 5.2 years ago

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

CopywriteR • 1.6k views
ADD COMMENT
0
Entering edit mode

Based on the error output (" '-' not meaningful for factors"), I'm guessing that the function doesn't like some of the names in

BAMlist.txt. Can you print a `head` of that file?
ADD REPLY
0
Entering edit mode

Keith,

Thank you for your reply. The head (n=5) of BAMlist.txt is:

/home/tom/ngs/data/output/barcode/160405_Target/bam/s_TA_C001D/s_TA_C001D.markdup.bam
/home/tom/ngs/data/output/barcode/160405_Target/bam/s_TA_C002D/s_TA_C002D.markdup.bam
/home/tom/ngs/data/output/barcode/160405_Target/bam/s_TA_C003D/s_TA_C003D.markdup.bam
/home/tom/ngs/data/output/barcode/160405_Target/bam/s_TA_C004D/s_TA_C004D.markdup.bam
/home/tom/ngs/data/output/barcode/160405_Target/bam/s_TA_C005D/s_TA_C005D.markdup.bam

 

ADD REPLY
0
Entering edit mode
Tom ▴ 10
@tom-10763
Last seen 5.2 years ago

I looked inside the Copywriter.log file and it ended with:

INFO [2016-07-12 14:35:29] remote-error in value[[3L]](cond): failed to open BamFile: file(s) do not exist:
  ‘XXX(one of my bam files).bam’
I corrected the wrong path and then CopywriteR() ended successfully.

 

ADD COMMENT

Login before adding your answer.

Traffic: 1113 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