No announcement yet.
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to install and use Picard

    Dear all,

    I want to use Picard to remove PCR duplicates and I downloaded from

    A set of tools for working with high-throughput sequencing data

    After unzip it in linux, I got these files:

    CleanSam.jar CreateSequenceDictionary.jar FastqToSam.jar MergeSamFiles.jar ReplaceSamHeader.jar SamFormatConverter.jar SortSam.jar ViewSam.jar
    CompareSAMs.jar EstimateLibraryComplexity.jar MarkDuplicates.jar picard-1.21.jar sam-1.21.jar SamToFastq.jar ValidateSamFile.jar

    I am not familar with Java at all and have no idea about what the next step is..

    All your help will be greatly appreciated!

  • #2
    In general, if you have Java installed, you run jar files like this:

    java -jar MarkDuplicates.jar

    You may sometimes have to increase the memory available to Java using the -Xmx option. There are also many other options (


    • #3
      [li@raven picard-tools-1.66]$ ls
      AddOrReplaceReadGroups.jar CollectMultipleMetrics.jar FixMateInformation.jar ReorderSam.jar
      BamIndexStats.jar CollectRnaSeqMetrics.jar IlluminaBasecallsToSam.jar ReplaceSamHeader.jar
      BamToBfq.jar CompareSAMs.jar IntervalListTools.jar RevertSam.jar
      BuildBamIndex.jar CreateSequenceDictionary.jar MarkDuplicates.jar sam-1.66.jar
      CalculateHsMetrics.jar DownsampleSam.jar MeanQualityByCycle.jar SamFormatConverter.jar
      CheckIlluminaDirectory.jar EstimateLibraryComplexity.jar MergeBamAlignment.jar SamToFastq.jar
      CleanSam.jar ExtractIlluminaBarcodes.jar MergeSamFiles.jar SortSam.jar
      CollectAlignmentSummaryMetrics.jar ExtractSequences.jar NormalizeFasta.jar ValidateSamFile.jar
      CollectGcBiasMetrics.jar FastqToSam.jar picard-1.66.jar ViewSam.jar
      CollectInsertSizeMetrics.jar FilterSamReads.jar QualityScoreDistribution.jar

      [li@raven picard-tools-1.66]$ java -Xmx2000m SamToFastq.jar
      Exception in thread "main" java.lang.NoClassDefFoundError: SamToFastq/jar
      Caused by: java.lang.ClassNotFoundException: SamToFastq.jar
      at Method)
      at java.lang.ClassLoader.loadClass(
      at sun.misc.Launcher$AppClassLoader.loadClass(
      at java.lang.ClassLoader.loadClass(

      Could not find the main class: SamToFastq.jar. Program will exit.

      I am confronted with the above problem when using the picard tool kit.
      Any idea? Thanks!


      • #4
        Try to provide an Input file an example:
        java -jar SortSam.jar I=/path/input.sam SO=coordinate O=/path/outpu.bam VALIDATION_STRINGENCY=LENIENT CREATE_INDEX=true


        • #5
          Thanks, thedamian, got it work now!


          • #6
            Problems with SortSam. jar file (Picard)-My Linux doesn´t find or it has not loaded

            Hello, When I try to use last version Picard in my Linux for make this step with my files exome analysis,my computer outputs the next message or similar:

            "SortSam.jar file (Picard) is not found or it has not loaded".

            I have downloaded last version Picard into my Linux.I have tried to look for the SortSam.jar file into my Picard folders,but I don´t find it.

            Somebody could help me,please, so I can go on with my exome analysis?

            Waiting for your answers,please,thank you so much.

            Last edited by j6163m; 05-12-2015, 01:37 AM.


            • #7
              maybe try do download older versions and copy SortSam.jar to a new version folder. And maybe then try to execute it from the picard folder - It is just my first guess, don't know if will help


              • #8
                Thank´s thedamian.I will proof it.Can I download older versions from picard web or I must go to another web pages or sites?.Where can I find these older versions picard and this file?

                Thank you.



                • #9
                  I believe here:


                  • #10
                    Thank you so much.I have just seen the Sortsam.jar file in versión before to last.I will proof it.



                    • #11
                      Hello again thedamian.I have tried to execute SortSam.jar from the picard folder (after I downloaded and copy to a new version picard folder), but I'm not sure to know do it well.
                      Could you help me, please and show me the code?.Where I have to place (copy) exactly the SortSam.jar file, in what folder or subfolder belongs to picard folder?.

                      What I am trying is to execute the next code (step in Exome analysis):

                      ubuntu@ubuntu-Compaq-CQ58-Notebook-PC:~/Escritorio$ java -Xmx4g \
                      > -jar picard/SortSam.jar \
                      > SO=coordinate \
                      > INPUT=input.sam \
                      > OUTPUT=output.bam \
                      > VALIDATION_STRINGENCY=LENIENT \
                      > CREATE_INDEX=true
                      Error: Unable to access jarfile picard/SortSam.jar

                      But, as you can see above always gives me Error:Unable to access jarfile picard/SortSam.jar

                      What can I do?.
                      Waiting for your help, please,thank you so much .



                      • #12
                        Well, it was my guessing, don't know if will work
                        anyway, try also:
                        a) try to use older version of picard
                        b) try to add picard's folder with .jar files to your env path
                        c) or use full path to desired .jar

                        ps. Picard's jar has a parameter TMP_DIR so you can use it instead of (I believe), so the command would be like this:
                        java -Xmx4g -jar /full/path/to/picard/SortSam.jar SO=coordinate INPUT=input.sam OUTPUT=output.bam VALIDATION_STRINGENCY=LENIENT CREATE_INDEX=true TMP_DIR=/tmp


                        • #13
                          I don't get to execute the picard step in my exome analysis.Probably I dont type or write well the path.The output is always:

                          ubuntu@ubuntu-Compaq-CQ58-Notebook-PC:~/Escritorio$ java -Xmx4g -jar /full/path/to/picard/SortSam.jar SO=coordinate INPUT=input.sam OUTPUT=output.bam VALIDATION_STRINGENCY=LENIENT CREATE_INDEX=true TMP_DIR=/tmp
                          Error: Unable to access jarfile /full/path/to/picard/SortSam.jar

                          I have copied SortSam. jar file in the directory:Escritorio/broadinstitute-picard-60603cd/src/java/picard .But I don t know if this is a right path or location.Thatś right or wrong the location of SortSam.jar file?

                          I don t know how to solve the problem.

                          Any idea,please?. Thank you.



                          • #14
                            Hello thedamian,

                            When I unzip SortSam.jar file there are 4 folders,one of these is picard.Where I must place or unzip SortSam.jar,in what picard folder (because I see there are several picard folders ,in different locations?

                            Waiting for your answer,please,Thank you so much



                            • #15
                              Hello everybody,

                              Please, somebody could help me with this problem(above) ?.I can not go on with my exome analysis if this problem doesn t solve .

                              Or another possible solution: Somebody could explain me,please, another different script or method to convert SAM files to BAM files?.

                              Waiting for your answers,thank you so much for your help.



                              Latest Articles


                              • seqadmin
                                Advanced Tools Transforming the Field of Cytogenomics
                                by seqadmin

                                At the intersection of cytogenetics and genomics lies the exciting field of cytogenomics. It focuses on studying chromosomes at a molecular scale, involving techniques that analyze either the whole genome or particular DNA sequences to examine variations in structure and behavior at the chromosomal or subchromosomal level. By integrating cytogenetic techniques with genomic analysis, researchers can effectively investigate chromosomal abnormalities related to diseases, particularly...
                                09-26-2023, 06:26 AM
                              • seqadmin
                                How RNA-Seq is Transforming Cancer Studies
                                by seqadmin

                                Cancer research has been transformed through numerous molecular techniques, with RNA sequencing (RNA-seq) playing a crucial role in understanding the complexity of the disease. Maša Ivin, Ph.D., Scientific Writer at Lexogen, and Yvonne Goepel Ph.D., Product Manager at Lexogen, remarked that “The high-throughput nature of RNA-seq allows for rapid profiling and deep exploration of the transcriptome.” They emphasized its indispensable role in cancer research, aiding in biomarker...
                                09-07-2023, 11:15 PM





                              Topics Statistics Last Post
                              Started by seqadmin, 09-29-2023, 09:38 AM
                              0 responses
                              Last Post seqadmin  
                              Started by seqadmin, 09-27-2023, 06:57 AM
                              0 responses
                              Last Post seqadmin  
                              Started by seqadmin, 09-26-2023, 07:53 AM
                              1 response
                              Last Post seed_phrase_metal_storage  
                              Started by seqadmin, 09-25-2023, 07:42 AM
                              0 responses
                              Last Post seqadmin