Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • cliff
    Member
    • Oct 2009
    • 41

    how to install and use Picard

    Dear all,

    I want to use Picard to remove PCR duplicates and I downloaded picard-tools-1.21.zip from

    picard files. Full list of files for picard, 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!
  • kopi-o
    Senior Member
    • Feb 2008
    • 319

    #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 (http://java.sun.com/j2se/1.3/docs/to...aris/java.html)

    Comment

    • wangli
      Member
      • Apr 2012
      • 48

      #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 java.net.URLClassLoader$1.run(URLClassLoader.java:217)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:266)

      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!

      Comment

      • thedamian
        Member
        • Feb 2012
        • 50

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

        Comment

        • wangli
          Member
          • Apr 2012
          • 48

          #5
          Thanks, thedamian, got it work now!

          Comment

          • j6163m
            Member
            • May 2015
            • 16

            #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.

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

            Comment

            • thedamian
              Member
              • Feb 2012
              • 50

              #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

              Comment

              • j6163m
                Member
                • May 2015
                • 16

                #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.

                JM

                Comment

                • thedamian
                  Member
                  • Feb 2012
                  • 50

                  #9
                  I believe here: http://sourceforge.net/projects/pica.../picard-tools/

                  Comment

                  • j6163m
                    Member
                    • May 2015
                    • 16

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

                    JM

                    Comment

                    • j6163m
                      Member
                      • May 2015
                      • 16

                      #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 -Djava.io.tmpdir=/tmp \
                      > -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 .

                      JM

                      Comment

                      • thedamian
                        Member
                        • Feb 2012
                        • 50

                        #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 -Djava.io.tmpdir (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

                        Comment

                        • j6163m
                          Member
                          • May 2015
                          • 16

                          #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.

                          JM

                          Comment

                          • j6163m
                            Member
                            • May 2015
                            • 16

                            #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

                            JM

                            Comment

                            • j6163m
                              Member
                              • May 2015
                              • 16

                              #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.

                              JM

                              Comment

                              Latest Articles

                              Collapse

                              • GATTACAT
                                Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                                by GATTACAT
                                Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                                07-01-2026, 11:43 AM
                              • SEQadmin2
                                Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                                by SEQadmin2


                                I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                                Here are nine questions we think about, in roughly the order they matter, before...
                                06-18-2026, 07:11 AM

                              ad_right_rmr

                              Collapse

                              News

                              Collapse

                              Topics Statistics Last Post
                              Started by SEQadmin2, 07-02-2026, 11:08 AM
                              0 responses
                              25 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-30-2026, 05:37 AM
                              0 responses
                              23 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-26-2026, 11:10 AM
                              0 responses
                              23 views
                              0 reactions
                              Last Post SEQadmin2  
                              Started by SEQadmin2, 06-17-2026, 06:09 AM
                              0 responses
                              55 views
                              0 reactions
                              Last Post SEQadmin2  
                              Working...