Coder Social home page Coder Social logo

crossz / picard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from broadinstitute/picard

0.0 1.0 0.0 189.44 MB

A set of command line tools (in Java) for manipulating high-throughput sequencing (HTS) data and formats such as SAM/BAM/CRAM and VCF.

Home Page: https://broadinstitute.github.io/picard/

License: MIT License

XSLT 0.39% CSS 0.06% Java 98.73% R 0.45% Shell 0.18% Rebol 0.01% HTML 0.17% Dockerfile 0.01%

picard's Introduction

User Support:

For user questions please look for answers and ask first in the GATK forum.


Coverage Status Build Status License: MIT

A set of Java command line tools for manipulating high-throughput sequencing (HTS) data and formats.

Picard is implemented using the HTSJDK Java library HTSJDK to support accessing file formats that are commonly used for high-throughput sequencing data such as SAM and VCF.

Picard now builds and passes tests under Java 11. This should be considered to be a Beta feature. As of version 2.0.1 (Nov. 2015) Picard requires Java 1.8 (jdk8u66). The last version to support Java 1.7 was release 1.141.

Building Picard

  • First, clone the repo:
    git clone https://github.com/broadinstitute/picard.git
    cd picard/
  • Picard is now built using gradle. A wrapper script (gradlew) is included which will download the appropriate version of gradle on the first invocation.

  • To build a fully-packaged, runnable Picard jar with all dependencies included, run:

    ./gradlew shadowJar
  • The resulting jar will be in build/libs. To run it, the command is:
    java -jar build/libs/picard.jar
    
    or
    
    java -jar build/libs/picard-<VERSION>-all.jar 
  • To build a jar containing only Picard classes (without its dependencies), run:
    ./gradlew jar
  • To clean the build directory, run:
    ./gradlew clean

Running Tests

  • To run all tests, the command is:
    ./gradlew test
  • To run a specific test, the command is:
    ./gradlew legacyTest --tests "*TestClassName*"
    
    or
    
    ./gradlew barclayTest --tests "*TestClassName*"

Running legacyTest uses the legacy commandline parser while barclayTest uses the new parser.

Changing the released version of HTSJDK that Picard depends on

To switch Picard's HTSJDK dependency to a different released version:

  • Open build.gradle
  • Edit VERSION in the following line to be a different released version of HTSJDK. HTSJDK releases are listed here
    final htsjdkVersion = System.getProperty('htsjdk.version', 'VERSION')`
  • Open a pull request with this change

Building Picard with a Custom Version of HTSJDK

During development in Picard, it is sometimes necessary to build locally against an unreleased version or branch of HTSJDK.

  • To build against an unreleased version of HTSJDK's master branch:

    • Go to the Broad artifactory, where continuous snapshots of HTSJDK's master branch are published, and select the version you want to use. For example, 2.5.1-9-g5740ca1-SNAPSHOT. You can search by tag or short git commit hash.
    • In your Picard clone, run ./gradlew shadowJar -Dhtsjdk.version=VERSION, where VERSION is the version of the HTSJDK master branch snapshot you want to use.
  • To build against a version of HTSJDK that has not yet been merged into HTSJDK's master branch:

    • Clone HTSJDK, and in your clone check out the tag or branch you want to build Picard with.
    • Run ./gradlew install printVersion in your htsjdk clone to install that version to your local maven repository. Take note of the version number that gets printed at the end.
    • Switch back to your Picard clone, and run ./gradlew shadowJar -Dhtsjdk.version=VERSION, where VERSION is the version of HTSJDK you installed to your local maven repository.

Releasing Picard

Full instructions on how to create a new release of Picard are here

Path providers

Picard has limited support for reading from Path providers. Currently only google's api is supported, and only a few tools support this. To run with this support you need to compile the cloudJar target with gradle:

./gradlew cloudJar

then run picard as follows:

java -jar build/lib/picardcloud.jar <Picard arguments starting from program>

For example:

java -jar build/lib/picardcloud.jar CrosscheckFingerprints \
   I=gs://sample1.vcf \
   I=gs://sample2.vcf \
   CROSSCHECK_BY=FILE \
   H=Haplotype_db.txt \
   O=crosscheck.out

Alternatively, you can run the tool via the GATK which bundles the Google-Cloud jar, and should thus "Just Work".


Citing

Please cite this repository when using Picard tools for your publications.

“Picard Toolkit.” 2019. Broad Institute, GitHub Repository. http://broadinstitute.github.io/picard/; Broad Institute

@misc{Picard2019toolkit,
  title = {Picard toolkit},
  year = {2019},
  publisher = {Broad Institute},
  journal = {Broad Institute, GitHub repository},
  howpublished = {\url{http://broadinstitute.github.io/picard/}}
}

Picard is migrating to semantic versioning (http://semver.org/). We will eventually adhere to it strictly and bump our major version whenever there are breaking changes to our API, but until we more clearly define what constitutes our official API, clients should assume that every release potentially contains at least minor changes to public methods.

Please see the Picard Documentation for more information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.