Name | APPS/BIO/SAMTOOLS |
---|---|
Description | SAMtoola short read alignment manipulation toolkit. |
Status | Production |
Last update | 2011-12-12 |
Only this development version currently available.
The runtime environment sets the following environment variables:
Here is a simple test case for the runtime environment.
Download the example files here.
The job description file samtools.xrsl
& (executable=runsamtools.sh) (jobname=bwa_1) (stdout=std_1.out) (stderr=std_1.err) (gmlog=gridlog_1) (walltime=2h) (memory=8000) (disk=4000) (runtimeenvironment>="APPS/BIO/SAMTOOLS") (inputfiles= ( "input.sam" "input.sam" ) ) (outputfiles= ( "output.bam" "output.bam" ) ( "output.bam.bai" "output.bam.bai" ) )
The job script runsamtools.sh is very simple
#!/bin/sh echo "Hello SAMtools!" input="input.sam" output="output" samtools view -S $input -b > converted.bam samtools sort converted.bam $output samtools index "$output".bam exitcode=$? echo "Bye SAMtools!" exit $exitcode
Here the actual run consists of three steps: 1. Converting SAM formatted file into BAM format (samtools view), 2. Sorting the BAM formatted file (samtools sort), 3. Indexing the sorted BAM file (samtools index). The exitcode from samtools index is used as the exit code for the script, this way ARC knows whether the job has succeeded or failed.
Source and installation instructions for the SAMtools software itself can be found from the SAMtools home page
Here is an example of installing the 0.1.18 version of SAMtools.
Get the package:
wget http://downloads.sourceforge.net/project/samtools/samtools/0.1.18/samtools-0.1.18.tar.bz2 bunzip2 samtools-0.1.18.tar.bz2 tar xvf samtools-0.1.18.tar
And compile:
cd samtools-0.1.18 make
Finally, copy the executables to a bin directory
mkdir bin mv samtools bin/ mv bcftools/bcftools bin/ cp misc/* bin/ rm bin/*.c bin/*.o bin/Makefile
Download runtime environment script template for SLURM.
Modify the scripts as needed and save the main script in your ARC runtime directory as APPS/BIO/SAMTOOLS.
As long as the interface requirements are satisfied, the implementation does not really matter. And some adaptation is needed anyway to accomondate differences in the cluster environment (batch queue systems, temporary directory location etc.)
Contact kimmo.mattila@csc.fi if you have any grid_bwa use specific questions. Contact your local SAMtools guru in sequence analysis related questions.