Repository navigation
Open
Description
Dear Chris,
I am trying to run the copyCat in the paired mode as follows.
copyCat::runPairedSampleAnalysis(
annotationDirectory="./annotations/",
outputDirectory="./results/",
normal="./data/10A_depth.regions.bed",
tumor="./data/01A_depth.regions.bed",
inputType="bins",
readLength=100,
maxCores=2,
binSize=0,
perLibrary=1,
perReadLength=0,
verbose=TRUE,
minMapability=0.6,
dumpBins=TRUE,
doGcCorrection=TRUE,
gcWindowSize=100,
)
and I get the following error:
[1] "inferred bin size: 10000"
[1] "calculating mapability content for read length 100 Thu Apr 7 14:17:00 2022"
correcting for GC bias Thu Apr 7 14:17:01 2022
[1] "calculating GC content for read length 100 Thu Apr 7 14:17:01 2022"
Correcting read depth for GC-content bias: Thu Apr 7 14:17:03 2022
[1] "correcting library 1 (rd.Counts.100)"
error calling combine function:
<simpleError in `$<-.data.frame`(`*tmp*`, "avgreads", value = logical(0)): replacement has 0 rows, data has 1>
Error in model.frame.default(formula = reads ~ val, data = data.frame(reads = reads, :
invalid type (NULL) for variable 'val'
> traceback()
8: model.frame.default(formula = reads ~ val, data = data.frame(reads = reads,
val = val))
7: stats::model.frame(formula = reads ~ val, data = data.frame(reads = reads,
val = val))
6: eval(mf, parent.frame())
5: eval(mf, parent.frame())
4: loess(reads ~ val, span = 0.75, data.frame(reads = reads, val = val))
3: loessCorrect(rdo2, i, len, name, outlierPercentage = outlierPercentage,
type = "gc", corrResolution = resolution)
2: gcCorrect(rdo)
1: copyCat::runPairedSampleAnalysis( ## truncated
If I set the doGcCorrection to FALSE the function finishes successfully. I have downloaded the annotation file from https://wustl.app.box.com/s/3950x2fdi5ra1tjxzk73l9hq5l0y7kzl for read length 100. Also, I am running the function for only 3 chromosomes.
UPDATE: I have tried with all chromosomes as well and I get the same error message.
Do you have some suggestions how I can proceed with fixing this issue?
Thank you in advance! :)
Ebrahim
Metadata
Metadata
Assignees
Labels
No labels
Activity
samirad21 commentedon Apr 5, 2024
Hello,
I have the same issue. @eafyounian If you were able to fix the issue, please let me know how it worked.
@chrisamiller do you have any suggestions to fix the issue?
Thanks
Samira
eafyounian commentedon Apr 6, 2024
Unfortunately, I have not been able to fix this issue! One workaround is to skip the GC correction by setting the
doGcCorrectionparameter toFALSE. This allows the tool to continue without error, but it does not address the GC bias when calling the SCNAs.SteeleCD commentedon Oct 17, 2024
@eafyounian @samirad21 @chrisamiller
I managed to fix the problem by slightly altering the outputs of makeCorrBins() and makeCorrBinsMedian(). They were previously assigning elements to lists, which were then returned as a data frame:
return(data.frame(val=myBin,avgreads=zmed, numreads=zcnt))
but these were not handled properly in the foreach that then combines the results form each run of the loop. I changed return in makeCorrBins to:
return(data.frame(val = unlist(myBin), avgreads = unlist(zmean), numreads = unlist(zcnt)))
and the return in makeCorrBinsMedian to:
return(data.frame(val=unlist(myBin),avgreads=unlist(zmed), numreads=unlist(zcnt)))
which seemed to fix the problem.
eafyounian commentedon Oct 18, 2024
@SteeleCD That's great! Thank you for sharing how to fix this issue! :)