Question: Problem generating Varscn2 copynumber output
3
gravatar for gsk1185
5.5 years ago by
gsk118520
gsk118520 wrote:

Hi,

I'm trying to generate CNVs using Varscan2. I am getting following ERROR

java -jar /opt/VarScan.v2.3.6.jar copynumber normal.mpliup tumor.mpliup
Normal Pileup: normal.mpliup
Tumor Pileup: tumor.mpliup
Min coverage:    10
Min avg qual:    15
P-value thresh:    0.01
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
    at net.sf.varscan.Copynumber.<init>(Copynumber.java:693)
    at net.sf.varscan.VarScan.copynumber(VarScan.java:317)
    at net.sf.varscan.VarScan.main(VarScan.java:198

 

Please Suggest.

ADD COMMENTlink modified 5.1 years ago by russhh4.8k • written 5.5 years ago by gsk118520
5
gravatar for russhh
5.1 years ago by
russhh4.8k
UK, U. Glasgow
russhh4.8k wrote:

Hi,

Hopefully, this is no longer an issue for you but I have had the same problem this morning and thought I ought to post my fix. In my hands Varscan crashes if a sample on any line of the input pileup has zero coverage:

# FAILING CMD:
​samtools mpileup -q 1 -f ref.fasta n.bam t.bam | java -jar VarScan.v2.3.7.jar copynumber out.bn --mpileup 1
# WORKING CMD:
samtools mpileup -q 1 -f ref.fasta n.bam t.bam |\
awk -F"\t" '$4 > 0 && $7 > 0' |\
java -jar VarScan.v2.3.7.jar copynumber out.bn --mpileup 1

Note that this seems to be a bug, but that VarScan's forums appear t be down so I can't post it. The program runs fine if I ensure that just the second mpileup column is nonzero (using $7 > 0 alone); it fails if I ensure that just the first mpileup column is nonzero (using $4 > 0 alone).

If you have two separate pre-prepared pileups, I'd take the intersection of the covered positions before passing them into VarScan, though it would probably be easier just to construct a 2-sample coverage-filtered pileup (using code similar to the above) and either pass it or pipe it into Varscan.

Regards

Russ

ADD COMMENTlink modified 5 weeks ago by RamRS24k • written 5.1 years ago by russhh4.8k
1
gravatar for Pierre Lindenbaum
5.5 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum124k wrote:

In http://varscan.sourceforge.net/copy-number-calling.html

The syntax of the command for copy number calling is most similar to the VarScan somatic tool.

java -jar VarScan.jar copynumber normal-tumor.pileup output.basename --mpileup 1

Or, if you have independent normal and tumor pileup files:

java -jar VarScan.jar copynumber normal.pileup tumor.pileup output.basename

an argument is missing.

ADD COMMENTlink modified 5 weeks ago by RamRS24k • written 5.5 years ago by Pierre Lindenbaum124k

Dear Pierre,

Thanks for the reply.

I have tried using both ways but getting sample error.

ADD REPLYlink modified 5 weeks ago by RamRS24k • written 5.5 years ago by gsk118520
0
gravatar for ehscholl
5.2 years ago by
ehscholl0
United States
ehscholl0 wrote:

gsk - did you ever figure out how to run it?

I'm getting similar errors, and I've seen others listing similar errors as well, but I haven't seen a solution yet.

I generated two separate pileup files, using the -B flag, and use them as input to varscan copynumber as follows:

java -jar VarScan.v2.3.7.jar copynumber normal.pileup tumor.pileup outfile

I get this error:

Normal Pileup: normal.pileup
Tumor Pileup: tumor.pileup
Min coverage:    10
Min avg qual:    15
P-value thresh:    0.01
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
    at net.sf.varscan.Copynumber.&lt;init&gt;(Copynumber.java:693)
    at net.sf.varscan.VarScan.copynumber(VarScan.java:317)
    at net.sf.varscan.VarScan.main(VarScan.java:198)
ADD COMMENTlink modified 5 weeks ago by RamRS24k • written 5.2 years ago by ehscholl0
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: 771 users visited in the last hour