Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • aleidenroth
    Junior Member
    • Nov 2009
    • 8

    Picard: problem with Java?

    Hi all,

    I have the following problem when I run the Picard tool CollectInsertSizeMetrics.jar on a SAM file:

    >java -jar
    INPUT=alignedsorted.bam
    OUTPUT=collectgcbiasmetricsoutfile
    HISTOGRAMFILE=chartoutputoutfile.pdf VALIDATION_STRINGENCY=LENIENT

    This command successfully creates an outfile with the insert size metric raw numbers, but fails to create the histogram file and gives the following error:


    ---------------------------------------------------------------------------------
    Exception in thread "main" net.sf.picard.PicardException: Unexpected exception executing [Rscript /var/folders/LQ/LQtAvdk7FwmOLyjOs72FKU+++TI/-Tmp-/Andy/script7235887036363822816.R /Users/Andy/ngs/pipetest/refgen/collectgcbiasmetricsoutfile /Users/Andy/ngs/pipetest/refgen/chartoutputoutfile.pdf alignedsorted.bam]
    at net.sf.picard.util.ProcessExecutor.execute(ProcessExecutor.java:102)
    at net.sf.picard.util.ProcessExecutor.execute(ProcessExecutor.java:78)
    at net.sf.picard.util.RExecutor.executeFromFile(RExecutor.java:73)
    at net.sf.picard.util.RExecutor.executeFromClasspath(RExecutor.java:55)
    at net.sf.picard.analysis.CollectInsertSizeMetrics.finish(CollectInsertSizeMetrics.java:207)
    at net.sf.picard.analysis.SinglePassSamProgram.makeItSo(SinglePassSamProgram.java:145)
    at net.sf.picard.analysis.SinglePassSamProgram.doWork(SinglePassSamProgram.java:54)
    at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:156)
    at net.sf.picard.cmdline.CommandLineProgram.instanceMainWithExit(CommandLineProgram.java:117)
    at net.sf.picard.analysis.CollectInsertSizeMetrics.main(CollectInsertSizeMetrics.java:81)
    Caused by: java.io.IOException: Cannot run program "Rscript": error=2, No such file or directory
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:466)
    at net.sf.picard.util.ProcessExecutor.execute(ProcessExecutor.java:93)
    ... 9 more
    Caused by: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
    at java.lang.ProcessImpl.start(ProcessImpl.java:91)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
    ... 12 more
    system cd ~/ngs/pipetest/refgen/; java -jar /users/andy/ngs/applications/picard-tools-1.38/CollectInsertSizeMetrics.jar INPUT=alignedsorted.bam OUTPUT=collectgcbiasmetricsoutfile HISTOGRAM_FILE=chartoutputoutfile.pdf VALIDATION_STRINGENCY=LENIENT
    ---------------------------------------------------------------------------------


    If I run the command as above but with

    >java jvm-args -jar

    The program crashes right away with error message:


    ---------------------------------------------------------------------------------
    Exception in thread "main" java.lang.NoClassDefFoundError: jvm-args
    Caused by: java.lang.ClassNotFoundException: jvm-args
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    system cd ~/ngs/pipetest/refgen/; java jvm-args -jar /users/andy/ngs/applications/picard-tools-1.38/CollectInsertSizeMetrics.jar INPUT=alignedsorted.bam OUTPUT=collectgcbiasmetricsoutfile HISTOGRAM_FILE=chartoutputoutfile.pdf VALIDATION_STRINGENCY=LENIENT
    ---------------------------------------------------------------------------------


    I'm a newbie currently learning unix/perl and use of NGS tools. Any ideas what my problem could be?

    Any help would be greatly appreciated.

    Andy
  • drio
    Senior Member
    • Oct 2008
    • 323

    #2
    1. Tell your sysadmins to install R in your cluster/machine.

    2. Change jvm-args for whatever parameters you want to use. Typically: -Xmx2g for
    picard.
    -drd

    Comment

    • aleidenroth
      Junior Member
      • Nov 2009
      • 8

      #3
      Hi,

      Thanks a lot, I installed R and it works like a charm now!

      Comment

      • pd
        Member
        • Jan 2010
        • 17

        #4
        Picard error in CollectMultipleMetrics.jar

        Hi

        I am trying to use picard tool - CollectMultipleMetrics.jar to find out the insert size distribution. Unfortunately when i run the following command
        "java -jar CollectMultipleMetrics.jar I=myfile.sam R=mouse_genome.fa STOP_AFTER=1000000 O=output_file"

        I end with following error:

        WARNING 2011-11-14 13:13:16 SinglePassSamProgram File reports sort order 'unsorted', assuming it's coordinate sorted anyway.
        [Mon Nov 14 13:13:46 CET 2011] net.sf.picard.analysis.CollectMultipleMetrics done. Elapsed time: 0.50 minutes.
        Runtime.totalMemory()=1953366016
        Exception in thread "main" net.sf.picard.PicardException: Requesting earlier reference sequence: 11 < 14
        at net.sf.picard.reference.ReferenceSequenceFileWalker.get(ReferenceSequenceFileWalker.java:78)
        at net.sf.picard.analysis.SinglePassSamProgram.makeItSo(SinglePassSamProgram.java:115)
        at net.sf.picard.analysis.CollectMultipleMetrics.doWork(CollectMultipleMetrics.java:107)
        at net.sf.picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:175)
        at net.sf.picard.cmdline.CommandLineProgram.instanceMainWithExit(CommandLineProgram.java:118)
        at net.sf.picard.analysis.CollectMultipleMetrics.main(CollectMultipleMetrics.java:85)




        Could anyone guide me, why reference file is showing error, inspite of using the same reference file to generate .bam file?

        With Regards
        Parveen Kumar

        Comment

        • nilshomer
          Nils Homer
          • Nov 2008
          • 1283

          #5
          Is your SAM file sorted?

          Comment

          • pd
            Member
            • Jan 2010
            • 17

            #6
            yes the file was unsorted. Once i sorted it, worked excellently. But facing one more problem now. :-).. WHICH IS
            SAM validation error: ERROR: Record 7181005, Read name HWI-ST571:95:C04NEACXX:5:1106:13509:190206, MAPQ should be 0 for unmapped read

            What should i do? After googling i found to add VALIDATION_STRINGENCY=SILENT as an option but hw much good this option is?

            Comment

            • swbarnes2
              Senior Member
              • May 2008
              • 910

              #7
              The problem is just what it says; the sam file is formatted a little differently than Picard is expecting, specifically, unmapped reads have been given mapping qualities, which they really shouldn't have. Perhaps the .bam can be mended by Picard, but it's not a serious problem.

              The other option is to use VALIDATION_STRINGENCY=LENIENT; then you'll see all the reads that it is complaining about, and why.

              Comment

              • pd
                Member
                • Jan 2010
                • 17

                #8
                picard CleaneSam.jar option

                Hello

                I have some CIGAR length problem in one of my sequence in .sam file. Anyone had any idea about the picard CleanSam.jar option from picard tools.. What actually it does?? Or it would be good to remove that particular sequence from .sam file?

                Comment

                • jay2008
                  Member
                  • Sep 2010
                  • 44

                  #9
                  I have another problem using picard: can anyone tell me how to get org.xerial.snappy?


                  Exception in thread "main" java.lang.NoClassDefFoundError: org/xerial/snappy/SnappyError
                  at net.sf.samtools.util.TempStreamFactory.getSnappyLoader(TempStreamFactory.java:43)
                  at net.sf.samtools.util.TempStreamFactory.wrapTempOutputStream(TempStreamFactory.java:74)
                  at net.sf.samtools.util.SortingCollection.spillToDisk(SortingCollection.java:207)
                  at net.sf.samtools.util.SortingCollection.add(SortingCollection.java:150)
                  at net.sf.samtools.SAMFileWriterImpl.addAlignment(SAMFileWriterImpl.java:157)
                  at

                  Comment

                  • nilshomer
                    Nils Homer
                    • Nov 2008
                    • 1283

                    #10
                    Originally posted by jay2008 View Post
                    I have another problem using picard: can anyone tell me how to get org.xerial.snappy?


                    Exception in thread "main" java.lang.NoClassDefFoundError: org/xerial/snappy/SnappyError
                    at net.sf.samtools.util.TempStreamFactory.getSnappyLoader(TempStreamFactory.java:43)
                    at net.sf.samtools.util.TempStreamFactory.wrapTempOutputStream(TempStreamFactory.java:74)
                    at net.sf.samtools.util.SortingCollection.spillToDisk(SortingCollection.java:207)
                    at net.sf.samtools.util.SortingCollection.add(SortingCollection.java:150)
                    at net.sf.samtools.SAMFileWriterImpl.addAlignment(SAMFileWriterImpl.java:157)
                    at
                    For those who may come to this thread through a web search:
                    Download picard for free. A set of tools for working with high-throughput sequencing data. A set of tools (in Java) for working with next generation sequencing data in the SAM/BAM format. Note that development has moved to GitHub at https://github.com/broadinstitute/picard and support is available on the GATK forum at http://gatkforums.broadinstitute.org/categories/ask-the-team

                    Comment

                    Latest Articles

                    Collapse

                    • mylaser
                      Reply to Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                      by mylaser
                      Kheloyar – Everything You Need to Know About Kheloyaar Login and Kheoyar Id
                      If you are looking for an online gaming platform that offers a user-friendly experience, Kheloyar has become a name that many users search for. Whether you're interested in creating a new account, accessing your dashboard through Kheloyaar Login, or learning how to obtain a Kheoyar Id, understanding the platform's features and account process is essential.
                      This guide explains everything you need to know about...
                      Today, 01:13 AM
                    • SEQadmin2
                      Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                      by SEQadmin2



                      Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                      ...
                      07-09-2026, 11:10 AM
                    • SEQadmin2
                      Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                      by SEQadmin2



                      Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                      There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                      07-08-2026, 05:17 AM

                    ad_right_rmr

                    Collapse

                    News

                    Collapse

                    Topics Statistics Last Post
                    Started by SEQadmin2, 07-09-2026, 10:04 AM
                    0 responses
                    16 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 07-08-2026, 10:08 AM
                    0 responses
                    10 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 07-07-2026, 11:05 AM
                    0 responses
                    22 views
                    0 reactions
                    Last Post SEQadmin2  
                    Started by SEQadmin2, 07-02-2026, 11:08 AM
                    0 responses
                    31 views
                    0 reactions
                    Last Post SEQadmin2  
                    Working...