Merging Segments From Varscan2 Output...
6
0
Entering edit mode
11.1 years ago
sousuffer ▴ 20

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.

varscan copynumber cnv exome sequencing • 4.6k views
ADD COMMENT
0
Entering edit mode
11.1 years ago

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

ADD COMMENT
0
Entering edit mode
11.1 years ago
sousuffer ▴ 20

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 COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode
11.1 years ago
sousuffer ▴ 20

Can anyone help with this?

ADD COMMENT
0
Entering edit mode
10.9 years ago
aheikkila • 0

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

ADD COMMENT
0
Entering edit mode
10.6 years ago
dankoboldt ▴ 140

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

ADD COMMENT
0
Entering edit mode
9.2 years ago
lmesrob • 0

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 delimited and contains "chr" in the first column if you have "chr" before the chromosomes.

Hope this helps,

Lilia

ADD COMMENT

Login before adding your answer.

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