Question: Question About Mergesegment.Pl In Varscan 2
0
gravatar for Conan
6.1 years ago by
Conan20
Beijing
Conan20 wrote:

Hi there, I'm using Varscan2 CNV pipeline to deal with my exome data, it works fine until the last step which needed a perl script "mergeSegment.pl". my command is like:

perl mergeSegments.pl --ref-arm-sizes ./chr_arm_coordinate.txt ./blahblahblah.copynumber

The copynumber file was generated by R package DNAcopy, with 10 columns as mergeSegment.pl requires, here's the format:

ID    chrom    loc.start    loc.end    num.mark    seg.mean    bstat    pval    lcl    ucl
MetS6    1    762098    1635855    1040    -0.8484    7.868273154    6.30E-13    1635609    1646602
MetS6    1    1645759    1654150    11    -1.402    6.795998163    3.43E-10    1647851    1663751
MetS6    1    1663751    1690511    33    -0.8588    4.428916611    0.000268018    1688073    1721814

Then I got error below:

Use of uninitialized value $stats{"num_merged_events"} in array element at mergeSegments.pl line 182, <GEN1> line 3.
Use of uninitialized value in split at mergeSegments.pl line 255.
Use of uninitialized value $chrom_size in division (/) at mergeSegments.pl line 271.
Illegal division by zero at mergeSegments.pl line 271.

Any suggestions would be greatly appreciated, Thanks!

• 4.4k views
ADD COMMENTlink modified 5.0 years ago by matthew.1.davies20 • written 6.1 years ago by Conan20
1
gravatar for dankoboldt
6.0 years ago by
dankoboldt140
dankoboldt140 wrote:

It appears that your CBS output file differs slightly in structure from the output expected by mergeSegments.pl (see line 134):

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

Your line does not appear to have both ID and sample columns. Thus if you remove one of those variables in the split command, it should work for you.

ADD COMMENTlink modified 6.0 years ago by Istvan Albert ♦♦ 79k • written 6.0 years ago by dankoboldt140
0
gravatar for Chris Miller
6.1 years ago by
Chris Miller20k
Washington University in St. Louis, MO
Chris Miller20k wrote:

Does this solve your problem? Questions About Mergesegment.Pl

ADD COMMENTlink written 6.1 years ago by Chris Miller20k

Thank you for your instant reply Chris, I actually used ref-arm-sizes file that post recommended, and got the error above.

ADD REPLYlink written 6.0 years ago by Conan20
0
gravatar for pauly.rini
5.7 years ago by
pauly.rini10
United States
pauly.rini10 wrote:

I am getting the same error, so I simply added the sample column: Sample input:

ID sample chrom loc.start loc.end num.mark seg.mean bstat pval lcl ucl

Sample.1 ABC chr1 801880 1580650 192 23.6745 14.52182109 1.32E-45 1580650 1581021

But I still get the errors: Use of uninitialized value $stats{"num_merged_events"} in array element at ../../mergeSegments.pl line 182, <gen1> line 184. Use of uninitialized value in split at ../../mergeSegments.pl line 255. Use of uninitialized value $chrom_size in division (/) at ../../mergeSegments.pl line 271. Illegal division by zero at ../../mergeSegments.pl line 271.

The ----ref-arm-sizes file is in the format: chr1 0 125000000 p chr1 125000000 249250621 q

Any help is appreciated! ~Rini

ADD COMMENTlink modified 5.7 years ago • written 5.7 years ago by pauly.rini10
0
gravatar for suleymanvural
5.3 years ago by
United States
suleymanvural40 wrote:

I had the same problem, then i removed $sample from line 134 as he said, which initially looks like this
my ($id, $sample, $chrom, $chr_start, $chr_stop, $num_mark, $seg_mean, $bstat, $p_value, $lcl, $ucl) = split(/\s+/, $line);

Still gives this error
Use of uninitialized value $stats{"num_merged_events"} in array element at /home.../mergeSegments.pl line 182, <GEN1> line 3.
Also gives some results just below the error

You may want to see this post also, it is helpfull
http://sourceforge.net/p/varscan/discussion/1073558/thread/96c8dea8/?limit=25#3c10

ADD COMMENTlink written 5.3 years ago by suleymanvural40
0
gravatar for matthew.1.davies
5.0 years ago by
United Kingdom
matthew.1.davies20 wrote:

Hi

I'm currently having the exact same problem with mergeSegments.pl

Use of uninitialized value $stats{"num_merged_events"} in array element at mergeSegments.pl line 182, <gen1> line 2. Use of uninitialized value in split at mergeSegments.pl line 255. Use of uninitialized value $chrom_size in division (/) at mergeSegments.pl line 271. Illegal division by zero at mergeSegments.pl line 271.

Did you resolve this problem? Also, I am right in thinking the input file should not have a header.

Best wishes

ADD COMMENTlink written 5.0 years ago by matthew.1.davies20

this post might be helpful.

1. remove chromosome from your segmentation file that are not in your chr_arm length file. 

http://sourceforge.net/p/varscan/discussion/1073559/thread/996c2875/?limit=25#68b2

ADD REPLYlink written 4.3 years ago by CHANG40
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: 1121 users visited in the last hour