Coder Social home page Coder Social logo

subset_bam's Introduction

Rust

MultiSubsetBam

A Rust way to subset a bam based on an bam internal key.

In comparison to the Illumina subset_bam tool this one is able to create up to 1000 subsets in one run of the program. As reading and writing the BAM file is the most time consuming step in the split procedure this program should (in theory) speed the splitting of multiple subsets up by the amount of supbsets you want to split - e.g 10x for 10 clusters of cells to split.

Install

You need to install Rust on your computer, then clone this repo and finally compile the tool for your computer:

cargo build -r

The executable will be target/release/multi_subset_bam.

Testing

On a Linux system:

./target/release/multi_subset_bam -b testData/test.bam -v testData/barcodes.txt,testData/barcodes2.txt -o testData/outpath/subset_

samtools view testData/outpath/subset_barcodes.bam | wc -l
samtools view testData/outpath/subset_barcodes2.bam | wc -l

This should tell you that there are 11 reads for the 4 barcodes.

By default this tool will query the CB:Z tag (e.g. 'GAGCAGACAGGCAGTA') of the bam file and only write the reads matching to the entries in the 'values' barcodes table into the outfile. If you have cell ids like 'GAGCAGACAGGCAGTA-1' you want to use the option -t "CR".

subset_bam's People

Contributors

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