Problem generating Varscn2 copynumber output
3
3
Entering edit mode
7.5 years ago
gsk1185 ▴ 20

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.

Varscan Varscan2 CNV Copy-Number-Analysis • 4.0k views
ADD COMMENT
5
Entering edit mode
7.1 years ago
russhh 5.6k

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 COMMENT
1
Entering edit mode
7.5 years ago

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

Dear Pierre,

Thanks for the reply.

I have tried using both ways but getting sample error.

ADD REPLY
0
Entering edit mode
7.2 years ago
ehscholl • 0

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 COMMENT

Login before adding your answer.

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