Git Product home page Git Product logo

bam-aggregate-task's Introduction

bam-aggregate-task

The bam-aggregate-task is Kotlin workflow task which aggregates the 5' end of reads from an alignment file across sets of input regions in BED 6+ format, producing corresponding vectors of read counts in JSON format. All the regions in each input file are first resized to a constant width, which defaults to 2000 basepairs, around their center points. The task requires the input BAM to have a corresponding index, located at <input>.bam.bai. The task is strand-aware: when a region in a BED 6+ input file lies on the minus strand, the ordering of read counts around its center is reversed. If your input regions are not strand-specific, you can use a strand designation of . in the sixth field of each BED file.

Running locally

To run the task, first checkout the GitHub repository and build an executable JAR:

git clone https://www.github.com/krews-community/bam-aggregate-task
cd bam-aggregate-task && scripts/build.sh

Then, to run the task:

java -jar build/*.jar \
    --region-file input1.bed
    --alignments input.bam
    --expansionSize 4000
    --outputDir output

This will produce an output file at output/input1_input.aggregate.json containing a vector of aggregated read counts in JSON format. The above example uses a custom width of +/- 2000 basepairs around each peak summit, rather than the default +/- 1000.

Contributors

The scripts/ directory contains utilities you can use to build, test, and deploy.

Building

To build the docker container with a version tag, use scripts/build-image.sh vX.X.X. To build the JAR locally, use scripts/build-local.sh. To run the built JAR, use scripts/run-local.sh.

Testing

To run automated tests from command line, use scripts/test.sh.

Deploying

To deploy the image to our docker repository, use scripts/push-image.sh.

bam-aggregate-task's People

Contributors

hpratt avatar

Watchers

 avatar  avatar

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.