Hi There,

I did copynumber call and performed segmentation using DNAcopy.

```r
cnP1 = read.table ("copyNumber_varscanIdhP1.copynumber", header=TRUE)
CNA.object <- CNA( genomdat = cnP1[,7], chrom = cnP1[,1], maploc = cnP1 [,2], data.type = 'logratio')

CNA.object.smoothed     <- smooth.CNA(CNA.object)
CNA.object.smoothed.seg <- segment(CNA.object.smoothed, verbose=0, min.width=2)
segmented = CNA.object.smoothed.seg$output
 
write.table (segmented[,2:6], file="cbsP1", row.names=F, col.names=F, quote=F, sep="\t")
```

Now, I want to merge these output segments:

```
perl mergeSegments.pl
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.
        OPTIONS:
```

WHAT is the input file here?

Is the input to the script is output from DNAcopy output.

But the columns are different:

```
head cbs_P1
chr1    567331    569882    6    -2.3721
chr1    761847    905536    162    -0.1232
chr1    905636    3549990    2846    -0.0335
```

Can you please suggest me to make the input file in compatible format.

Thanks!

**Edit**: This is how you could get input file (output from DNACopy) to mergeSegments.pl

```r
seg.pvalue <- segments.p(CNA.object.smoothed.seg, ngrid=100, tol=1e-6, alpha=0.05, search.range=100, nperm=1000)
write.table (seg.pvalue, file="blah", row.names=F, col.names=F, quote=F, sep="\t")
```
<p>Its the output from <code>segments.p</code> function from DNACopy.</p>
