converts SAM format to BAM formatsamtools
sam_to_bam.py --input1=$source.input1 --dbkey=${input1.metadata.dbkey}
#if $source.index_source == "history":
--ref_file=$source.ref_file
#else
--ref_file="None"
#end if
--output1=$output1 --index_dir=${GALAXY_DATA_INDEX_DIR}
**What it does**
This tool uses the SAMTools_ toolkit to produce an indexed BAM file based on a sorted input SAM file.
.. _SAMTools: http://samtools.sourceforge.net/samtools.shtml