Skip to content

SAM_Processing

Skylar Wyant edited this page Jun 2, 2016 · 33 revisions

Basic Usage

The SAM_Processing handler sorts, de-duplicates, adds read groups to, and merges the SAM files produced from Read_Mapping into one finished BAM file. This script utilizes Picard to carry out all processing of the SAM files. In addition, it creates before and after statistics using the flagstat function of SAMTools. To run SAM_Processing, all common variables and handler-specific variables must be defined within the config file. Once the variables have been defined, SAM_Processing can be run with the following command:

sequence_handling SAM_Processing Config

Where Config is the full file path to the config file.

Future features: After the job has run, a list of sorted, deduplicated, and read grouped BAM files will be generated in addition to the merged BAM file.

Handler-Specific Variables

The following are a list of variables that need to be defined within Config. In addition to the handler-specific variables, all common variables must be defined.

Variable Line Function
Email 5 Sets an email address for notifications of job status
SAMTools Definition 43-45 Define the path to the SAMTools installation or load it from a cluster
SAMPLE_INFO 48 A list of SAM files to process
REF_GEN 51 A reference sequence used in the sorting process
SCRATCH 54 A directory that will hold results
PROJECT 57 A name that describes the project you are working on

Output

SAM_Processing creates sorted, deduplicated BAM files that have read groups marked. In addition, it also generates a merged BAM file for other tasks such as variant calling, alignment statistics for all input SAM files, and the finished unmerged BAM files. Finally, a list of all finished unmerged BAM files is generated.

Dependencies

SAM_Processing depends on Picard for all processing needs as well as SAMTools for generating the alignment statistics. In addition, PBS and GNU Parallel are required for basic running.

Clone this wiki locally