This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Varscan Copy Number Calling Workflow: Using Mergesegments.Pl After Cbc

I am trying to identify copy number variation in tumor/normal data using the workflow on the VarScan page. I got as far as the last step, where I got stuck on input to mergeSegments.pl mergeSegments.pl says that it requires the following fields in the input:

USAGE: mergeSegments.pl [segments] OPTIONS
        segments - A segments file with p-values from the DNAcopy library. This should be tab- or space-delimited
        with a header and the following columns: ID, chrom, loc.start, loc.end, num.mark, seg.mean, bstat, pval, lcl, ucl.

Meanwhile, the R script given on the workflow page produces a file with only the following fields:

ID      chrom   loc.start       loc.end num.mark        seg.mean

(even if I write out all columns of segs$output, where segs is the result of calling the segment function in DNAcopy)

My question is: where and how do I get the remaining coumns (bstat, pval, lcl, ucl) for input to mergeSegments.pl?

varscan copynumber

1 answer

When you run the segments.p method from DNAcopy on a DNACopy-class object (that is returned by segments(...)) a data frame containing p-values is returned

segments.p(segs, ngrid=100, tol=1e-6, alpha=0.05, search.range=100, nperm=1000)

also see reference manual for DNACopy page 13-14

After I ran the segments.p. I tried to run the mergeSegments.pl. Use of uninitialized value $input in <handle> at ../../mergeSegments.pl line 446. readline() on unopened filehandle at ../../mergeSegments.pl line 446. Can't use an undefined value as a symbol reference at ../../mergeSegments.pl line 456.

Anybody got a similar error?

Log in to answer this question.