Skip to content

visze/BAMSampler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status: Build Status (Stable), Build Status (Development)

BAMSampler

This tool uses several BAM files to generated a new sampled BAM. It goes over each reads and choose a read by a probability of 1 divided by the number of BAMS to sample. The output is a new sorted and indexed BAM.

The sampling is similar to picardtools BAMSampler but with merging, sorting and indexing. For multiple threads several tmp BAMS are generated (each for each thread) and are merged after sampling.

Installation

  1. Download the master branch from git.
git co https://github.com/visze/BAMSampler.git BAMSampler
  1. Install files with maven
cd BAMSampler
mvn package

Run BAMSampler

java -jar target/bamsampler-<version>.jar

The command-line help will be:

-o,--output              Output BAM-File
-a,--sample-addition     Adds the string after the sample in the read
                              name. Read name will be like sample_addition_oldname
-i,--input               TSV-List (header BAM and Sample) of
                              BAM-files to choose.
                              First row: path to BAM.
                              Second row: Sample-name
-h,--help                     Print this help message.
-t,--threads             Number of threads for sampling

Example command can be:

cd target
java -jar target/bamsampler-<version>.jar --output /tmp/NC_000919.1_BAMsamples.bam --sample-addition testBAM --input resources/NC_000919.1_BAMsamples.tsv --threads 4

or

cd target
java -jar bamsampler-<version>.jar --output /tmp/NC_000919.1_SAMsamples.bam --sample-addition testSAM --input resources/NC_000919.1_BAMsamples.tsv --threads 4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages