the problem when I run vcffilterjs
1
0
Entering edit mode
7.6 years ago
zengtony743 ▴ 70

I am sorry to post this again separately since i am not quite sure if this is the computer issue or the issue from the tools. Anyone has this kind of experience?

[xxx@qlogin4 dist]$ java -jar vcffilterjs.jar
Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/samtools/util/BlockCompressedOutputStream
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
    at java.lang.Class.getMethod0(Class.java:2774)
    at java.lang.Class.getMethod(Class.java:1663)
    at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: net.sf.samtools.util.BlockCompressedOutputStream
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 6 more
vcf • 2.2k views
ADD COMMENT
1
Entering edit mode

I wrote this tool.

You should better use https://github.com/lindenb/jvarkit/issues

it's not correctly compiled. Did you follow: https://github.com/lindenb/jvarkit/wiki/Compilation ?

ADD REPLY
1
Entering edit mode

Furthermore, you're using an old code. The path should be htsjdk/samtools/util/BlockCompressedOutputStream & not net/sf/samtools/util/BlockCompressedOutputStream

ADD REPLY
0
Entering edit mode

Just stumbled upon your page on the usage in Github and was wondering if I should tag you in here :)

ADD REPLY
0
Entering edit mode

Looks like a possible dependency issue. Maybe a required jar file is missing?

ADD REPLY
0
Entering edit mode

Thank you, Pierre and Ram.. actually I do use a old code that I used 8 month ago.. so according to your suggestions. I need to re-install and do the right compilation by linkers you sent to me. Am I right?

Since I am using old code,, so that mean my previous command java -jar dist/vcffilterjs.jar -f script.js 280control.vcf > 84U1.vcf & need to change too?

Thank you,

ADD REPLY
0
Entering edit mode

yes, reinstall, I won't/can't help with an old version.

ADD REPLY
0
Entering edit mode

Pierre,

Since I do not have permission to install jvarkit under cluster but by staff of computer center.. for me, I want to use script.js that you wrote before and do filter within one VCF file which include many samples. followings are a list that all the tools in the jvarkit and IT people helped me scripting the install but some applications failed to install...Since this new javrkit package seems totally different from old version. For me, if I want to use java -jar dist/vcffilterjs.jar -f script.js 280control.vcf > 84U1.vcf which is the application that i need to use and how to use it? ( https://www.biostars.org/p/88921/ )

sortvcfonref
vcfbigwig
illuminafastqstats
picardmetricstoxml
tviewweb
vcfregistryweb
blastmapannots
mapuniprotfeatures
bam4deseqintervals
vcfstripannotations
vcfgeneontology
bamtofastq
vcftordf
vcfsamplerename
vcffiltersequenceontology
vcfrenamechromosomes
bamrenamechromosomes
bedrenamechromosomes
blastntosnp
blast2sam
vcfmapuniprot
mergesplittedblast
biostar92368
samchangereference
comparebamandbuild
knowngenestobed
biostar95652
samtopsl
ngsfilesscanner
vcfcomparepredictions
allelefrequencycalculator
buildwikipediaontology
biostar105754
pubmedfilterjs
vcfensemblreg
ADD REPLY
2
Entering edit mode

I don't think you'd need sudo privileges to install git or ant on the HPC. I don't see why using jvarkit downloaded to a user directory should be a problem.

ADD REPLY
1
Entering edit mode

It's still vcffilterjs but you need to download the latest updated version.

ADD REPLY
0
Entering edit mode

We installed the updated version when I ran the command, it shows as this

[rzeng@qlogin1 reference]$ java -Xmx15g -jar /hpf/tools/centos6/jvarkit/2014.1
.15/dist/vcffilterjs.jar -f script.js allsnp1.vcf > 136F1.vcf&6/jvarkit/2014.10
[1] 16772
[rzeng@qlogin1 reference]$ Unrecognized option: -jar /hpf/tools/centos6/jvarkit/2014.10.15/dist/vcffilterjs.jar -f
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

[1]+  Exit 1                  java -Xmx15g -jar /hpf/tools/centos6/jvarkit/2014.10.15/dist/vcffilterjs.jar -f script.js allsnp1.vcf > 136F1.vcf
ADD REPLY
1
Entering edit mode

are you sure about '-Xmx15g !' ? that must be a huge VCF !!! this tool uses streaming operation, memory shouldn't be a problem.

Unrecognized option: -jar /hpf/tools/centos6/jvarkit/2014.10.15/dist/vcffilterjs.jar -f

there must be some quotes in your command line that you don't show us: java can get the only option -jar . Let me show you a normal message:

$ java -HelloWorld arg
Unrecognized option: -HelloWorld
Error: Could not create the Java Virtual Machine

see ? to trailing words after "Unrecognized option: -HelloWorld"

ADD REPLY
1
Entering edit mode

Pierre, It works this time finally just because of lack of enough memory. You are right, my VCF is really huge, I set it as -Xmx45g then it works

Thank you :)

ADD REPLY
0
Entering edit mode

Sorry I posted the question as an answer by an accident!

ADD REPLY
0
Entering edit mode

The problem is with your demand for 15G of RAM. Your login or compute node config might not allow that limit and so is unable to create the JVM. Try a reasonable limit, such as 4G. The command should be:

java -Xmx4g -jar /hpf/tools/centos6/jvarkit/2014.10.15/dist/vcffilterjs.jar -f script.js allsnp1.vcf > 136F1.vcf
ADD REPLY
1
Entering edit mode

Thank you, RamRS, see the msg above :)

ADD REPLY
1
Entering edit mode

That was a twist I did not see coming! More memory, not less, eh? Nice!

ADD REPLY
0
Entering edit mode
7.6 years ago
zengtony743 ▴ 70

Old problem solved but new one comes...

  1. Here are commands that I used:

    java -Xmx45g -jar /hpf/tools/centos6/jvarkit/2014.10.15/dist/vcffilterjs.jar -f script.js allsnp1.vcf > 136F1.vcf &
    
  2. Here is the script.js (from Pierre)

    function accept(ctx)
     {
     var y,g2;
     var sampleList=header.getSampleNamesInOrder();
    
     var g1=ctx.getGenotype("136");
     /** ignore non-called */
     if(g1== null || ! g1.isCalled() ) return false;
     /** loop over the other samples */
     for(y=0;y< sampleList.size();++y)
         {
         g2=ctx.getGenotype( sampleList.get(y) );
    
         if(g2.getSampleName().equals(g1.getSampleName())) continue;
         /** ignore non-called */
         if(! g2.isCalled() ) continue;
    
         /** is g1==g2 ? */
         if( g1.sameGenotype( g2 ) ) return false;
         }
     /* found no other same genotype */
     return true;
     }
    accept(variant);
    
  3. the size of output file is small as 26K. here is the output looking like

........
........
.......
....

##INFO=<ID=STR,Number=0,Type=Flag,Description="Variant is a short tandem repeat">
##VCFFilterJSCmdLine=-f script.js allsnp1.vcf
##VCFFilterJSVersion=c83f20cde867920870918ee6eb5e5406f554e2bb
##contig=<ID=chr10,length=130694993>
##contig=<ID=chr11,length=122082543>
##contig=<ID=chr12,length=120129022>
##contig=<ID=chr13,length=120421639>
##contig=<ID=chr14,length=124902244>
##contig=<ID=chr15,length=104043685>
##contig=<ID=chr16,length=98207768>
##contig=<ID=chr17,length=94987271>
##contig=<ID=chr18,length=90702639>
##contig=<ID=chr19,length=61431566>
##contig=<ID=chr1,length=195471971>
##contig=<ID=chr2,length=182113224>
##contig=<ID=chr3,length=160039680>
##contig=<ID=chr4,length=156508116>
##contig=<ID=chr5,length=151834684>
##contig=<ID=chr6,length=149736546>
##contig=<ID=chr7,length=145441459>
##contig=<ID=chr8,length=129401213>
##contig=<ID=chr9,length=124595110>
##contig=<ID=chrM,length=16299>
##contig=<ID=chrX,length=171031299>
##contig=<ID=chrY,length=91744698>
##reference=file:///hpf/projects/mjustice/reference/genome.fa
#CHROM    POS    ID    REF    ALT    QUAL    FILTER    INFO    FORMAT    111 129_Control    136     137     186     195     196     198     620     752     97     C57B6_control    Chol1_592    Crf03_82    Crf04_151    L11J27    L11J74    M1527_280    M1527_305    M1527_84    M895_206    M895_417    M895_419    M895_64    Nur19_1457

But no MORE information after the line of (#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT)

ADD COMMENT
0
Entering edit mode

And is it an error? You have a large number of samples. The script above find the line where there is one genotype in "136" and all other samples have another genotype. Can just see a positive using a simple cut?

ADD REPLY
0
Entering edit mode

Cluster did not show any error after it has done.

Here is the beginning when it was running

[rzeng@qlogin1 reference]$ [INFO/VCFFilterJS] 2014-10-15 16:25:40 "Starting JOB at Wed Oct 15 16:25:40 EDT 2014 com.github.lindenb.jvarkit.tools.vcffilterjs.VCFFilterJS version=c83f20cde867920870918ee6eb5e5406f554e2bb built=2014-10-15 10:55:19"
[INFO/VCFFilterJS] 2014-10-15 16:25:40 "Command Line args : -f script.js allsnp1.vcf"
[INFO/VCFFilterJS] 2014-10-15 16:25:40 "Executing as rzeng@qlogin1 on Linux 2.6.32-358.18.1.el6.x86_64 amd64; OpenJDK 64-Bit Server VM 1.7.0_55-mockbuild_2014_04_16_12_11-b00"
[INFO/VCFFilterJS] 2014-10-15 16:25:40 "Compiling script.js"
[INFO/VCFFilterJS] 2014-10-15 16:25:40 "reading from allsnp1.vcf"
[INFO/VCFFilterJS] 2014-10-15 16:25:40 "reading from allsnp1.vcf"
[INFO/VCFFilterJS] 2014-10-15 16:25:40 "writing to stdout"
[INFO/VCFFilterJS] 2014-10-15 16:25:50 "Count: 11638 Elapsed: 10 seconds(0.25%) Remains: 1 hour(99.75%) Last: chr10:6695417"
[INFO/VCFFilterJS] 2014-10-15 16:26:00 "Count: 61805 Elapsed: 20 seconds(0.92%) Remains: 35 minutes(99.08%) Last: chr10:25012856"
[INFO/VCFFilterJS] 2014-10-15 16:26:10 "Count: 89912 Elapsed: 30 seconds(1.62%) Remains: 30 minutes(98.38%) Last: chr10:44220149"
[INFO/VCFFilterJS] 2014-10-15 16:26:20 "Count: 138752 Elapsed: 40 seconds(3.39%) Remains: 19 minutes(96.61%) Last: chr10:92306766"
[INFO/VCFFilterJS] 2014-10-15 16:26:30 "Count: 143381 Elapsed: 50 seconds(3.40%) Remains: 23 minutes(96.60%) Last: chr10:92712158"
[INFO/VCFFilterJS] 2014-10-15 16:26:40 "Count: 147562 Elapsed: 1 minute(3.42%) Remains: 28 minutes(96.58%) Last: chr10:93185159"
...
...
...
ADD REPLY
0
Entering edit mode

And it only ran 29mins for finishing up all the process..

ADD REPLY
0
Entering edit mode

just a log.

ADD REPLY
0
Entering edit mode

Yes, it did not run at all.

and it has ended as this

[rzeng@qlogin1 reference]$ [INFO/VCFFilterJS] 2014-10-15 16:38:30 "Count: 6443982 Elapsed: 12 minutes(74.45%) Remains: 4 minutes(25.55%) Last: chr7:115536450"
[INFO/VCFFilterJS] 2014-10-15 16:38:40 "Count: 6560118 Elapsed: 13 minutes(75.91%) Remains: 4 minutes(24.09%) Last: chr8:5547903"
[INFO/VCFFilterJS] 2014-10-15 16:38:50 "Count: 6667543 Elapsed: 13 minutes(76.81%) Remains: 3 minutes(23.19%) Last: chr8:30083112"
[INFO/VCFFilterJS] 2014-10-15 16:39:00 "Count: 6771369 Elapsed: 13 minutes(77.15%) Remains: 3 minutes(22.85%) Last: chr8:39574054"
[INFO/VCFFilterJS] 2014-10-15 16:39:10 "Count: 6886263 Elapsed: 13 minutes(78.33%) Remains: 3 minutes(21.67%) Last: chr8:71516512"
[INFO/VCFFilterJS] 2014-10-15 16:39:20 "Count: 6991610 Elapsed: 13 minutes(79.03%) Remains: 3 minutes(20.97%) Last: chr8:90801152"
[INFO/VCFFilterJS] 2014-10-15 16:39:30 "Count: 7108698 Elapsed: 13 minutes(81.26%) Remains: 3 minutes(18.74%) Last: chr9:6153531"
[INFO/VCFFilterJS] 2014-10-15 16:39:40 "Count: 7224778 Elapsed: 14 minutes(82.80%) Remains: 2 minutes(17.20%) Last: chr9:48092864"
[INFO/VCFFilterJS] 2014-10-15 16:39:50 "Count: 7342082 Elapsed: 14 minutes(84.11%) Remains: 2 minutes(15.89%) Last: chr9:83581279"
[INFO/VCFFilterJS] 2014-10-15 16:40:00 "Count: 7459188 Elapsed: 14 minutes(85.28%) Remains: 2 minutes(14.72%) Last: chr9:115495870"
[INFO/VCFFilterJS] 2014-10-15 16:40:10 "End JOB status=0 [Wed Oct 15 16:40:10 EDT 2014] com.github.lindenb.jvarkit.tools.vcffilterjs.VCFFilterJS done. Elapsed time: 14.51 minutes."

[1]+  Done                    java -Xmx45g -jar /hpf/tools/centos6/jvarkit/2014.10.15/dist/vcffilterjs.jar -f script.js allsnp1.vcf > 136F1.vcf
ADD REPLY
0
Entering edit mode

I ran the same command with another different master vcf file. it works.. So I guess this master file - allsnp1.vcf has some problem..

ADD REPLY

Login before adding your answer.

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