Question: Merging Segments From Varscan2 Output...
0
gravatar for sousuffer
7.7 years ago by
sousuffer20
sousuffer20 wrote:

I am a little new to this so any help would be appreciated - I ran a variation of the standard example workflow for VarScan2 copy number variant caller (using my exome sequencing data). I visualized the results of the segmentation (Step 4 - first few lines of output shown below) and it looks good, so I am now trying to implement Step 5: Merge adjacent segments of similar copy number and classify events by size (large-scale or focal).

chrom loc.start loc.end num.mark seg.mean
chr1 126901 336305 20 -0.2205
chr1 566191 569388 3 1.2087
chr1 653310 2338123 1505 -0.1378
chr1 2338223 16057066 5079 -0.19
chr1 16057166 16258373 168 -0.1205
chr1 16258673 16258973 4 -1.2245
chr1 16259073 17012168 579 -0.1526
chr1 17012268 17273478 48 0.0673
chr1 17282515 26109165 4152 -0.1866

I am trying to do this using the mergeSegments.pl package and am getting the following message: ../../apps/mergeSegments.pl out.file

Use of uninitialized value $input in <handle> at ../../apps/mergeSegments.pl line 446.
readline() on unopened filehandle at ../../apps/mergeSegments.pl line 446.
Can't use an undefined value as a symbol reference at ../../apps/mergeSegments.pl line 456.

I am trying to figure out what I am doing wrong. Initially, I figured that my file was in the wrong format. The mergeSegments specifies that the input should be:

"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."

My file doesn't have an ID, bstat, pval, lcl, or ucl and I'm not even sure how I would generate these if indeed this was the issue. Any help would be greatly appreciated. Thank you very much.

ADD COMMENTlink modified 5.8 years ago by lmesrob0 • written 7.7 years ago by sousuffer20
0
gravatar for Chris Miller
7.7 years ago by
Chris Miller21k
Washington University in St. Louis, MO
Chris Miller21k wrote:

I believe this answer is what you need to generate those additional columns: Varscan Copy Number Calling Workflow: Using Mergesegments.Pl After Cbc

ADD COMMENTlink modified 7.7 years ago • written 7.7 years ago by Chris Miller21k
0
gravatar for sousuffer
7.7 years ago by
sousuffer20
sousuffer20 wrote:

Thanks for the advice...I generated the correct columns and the mergeSegments.pl still fails:

perl ../../apps/mergeSegments.pl outp.file
Use of uninitialized value $input in <handle> at ../../apps/mergeSegments.pl line 446.
readline() on unopened filehandle at ../../apps/mergeSegments.pl line 446.
Can't use an undefined value as a symbol reference at ../../apps/mergeSegments.pl line 456.

This is the file format: ID chrom loc.start loc.end num.mark seg.mean bstat pval lcl ucl
Sample.1 chr1 126901 336305 20 -0.2205 7.35726563517599 3.50306367498813e-12 336305 336305
Sample.1 chr1 566191 569388 3 1.2087 8.08753912963223 1.21687750240143e-13 569388 569388
Sample.1 chr1 653310 2338123 1505 -0.1378 6.06563083831769 2.6260014877838e-07 2234624 2446703
Sample.1 chr1 2338223 16057066 5079 -0.19 3.1268048900692 0.149143434568713 15904118 16174570

Any help would be greatly appreciated. Thanks.

ADD COMMENTlink written 7.7 years ago by sousuffer20

IDs need to be unique. Sample.1 Sample.2 ... and so on.

ADD REPLYlink written 7.6 years ago by cris.giu0
0
gravatar for sousuffer
7.7 years ago by
sousuffer20
sousuffer20 wrote:

Can anyone help with this?

ADD COMMENTlink written 7.7 years ago by sousuffer20
0
gravatar for aheikkila
7.5 years ago by
aheikkila0
aheikkila0 wrote:

There are some discrepancies in the documentation and in the code. Does this help you: A: Question about mergeSegment.pl

ADD COMMENTlink written 7.5 years ago by aheikkila0
0
gravatar for dankoboldt
7.3 years ago by
dankoboldt140
dankoboldt140 wrote:

I believe this was an issue with the ref-arm-sizes file and has been resolved.

ADD COMMENTlink written 7.3 years ago by dankoboldt140
0
gravatar for lmesrob
5.8 years ago by
lmesrob0
France
lmesrob0 wrote:

Hi,

I've got same errors and here is the solution:

1) add $stats{'num_merged_events'} in line 109:

$stats{'num_merged_events'} = $stats{'num_variants'} = $stats{'num_fail_pos'} = $stats{'num_fail_strand'} = $stats{'num_fail_varcount'} = $stats{'num_fail_varfreq'} = $stats{'num_fail_mmqs'} = $stats{'num_fail_var_mmqs'} = $stats{'num_fail_mapqual'} = $stats{'num_fail_readlen'} = $stats{'num_fail_dist3'} = $stats{'num_pass_filter'} = 0;

 

2) remove $sample in line 134:

my ($id, $chrom, $chr_start, $chr_stop, $num_mark, $seg_mean, $bstat, $p_value, $lcl, $ucl) = split(/\s+/, $line);

 

3) by the way, assure that the $ref_arm_sizes file is tab delemited and contains "chr" in the first column if you have "chr" before the chromosomes.

Hope this helps,

Lilia

ADD COMMENTlink written 5.8 years ago by lmesrob0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2096 users visited in the last hour