Skip to content

2.2. Automated Pipeline Starting with BAM files

Breon Schmidt edited this page Jan 22, 2021 · 4 revisions

Got some BAM's aligned to hg19? This pipeline will run Feature Counts and ALLSorts for you,

Before We Begin

Download the reference GTF used for ALLSorts

ALLSorts runs on hg19 (I know), so we need references related to that.

GTF - ftp://ftp.ensembl.org/pub/grch37/current/gtf/homo_sapiens/Homo_sapiens.GRCh37.87.chr.gtf.gz

Now ungzip it somewhere memorable!

ALLSorts has been installed

Just follow the instructions https://github.com/Oshlack/ALLSorts/wiki.

Running ALLSorts starting with BAM files

Ok, ALLSorts and the prerequisites above have been installed? You're good to go!

ALLSorts can be run with this script, note the parameter descriptions below: bpipe -p results=$results -p type=$type -p strand=$strand _$COUNTSDIR/counts.groovy_ $bam

Parameters

Feel free to make these environment variables (I tend to) or just directly insert them into the command line snippet above.

$results = /path/to/desired/output

$type = "bam"

$strand = "yes" or "no" or "reverse" # No and Reverse will be the two most used (no = unstranded, reverse = stranded typically)

$COUNTSDIR/counts.groovy should be the path /your/allsorts/clone/path/tools/counts/counts.groovy

$bam - the path to your bam files. Can be something as simple as /path/to/bams/*.bam, so long as the format parameter is set correctly.

Run a test to see if it's working!

If you have setup your prerequisite tools correctly, this should output a result fairly quickly! Just change the parameters as suitable for your environment.

bpipe -p results=/output/path/ -p type="bam" -p strand="no" $COUNTSDIR/counts.groovy /your/allsorts/clone/path/tests/bams/*.bam

The output will just be some collection of predictions, it's not a real sample, just a garbled mess of counts.

Issues

Please report any https://github.com/Oshlack/ALLSorts/issues!