Uses calcroicovg.c to count covered bases per-gene for each given tumor-normal pair of bams.
This document describes gmt music bmr calc-covg version 0.04 (2013-05-14 at 16:03:05)
gmt music bmr calc-covg --roi-file=? --reference-sequence=? --bam-list=? --output-dir=? [--cmd-list-file=?] [--cmd-prefix=?] [--normal-min-depth=?] [--tumor-min-depth=?] [--min-mapq=?]
General usage:
... music bmr calc-covg \ --bam-list input_dir/bam_list \ --output-dir output_dir/ \ --reference-sequence input_dir/all_sequences.fa \ --roi-file input_dir/all_coding_exons.tsv
To create a list of commands that will allow the processing of each tumor-normal pair in parallel with an \s-1LSF\s0 job scheduler:
... music bmr calc-covg \ --bam-list input_dir/bam_list \ --output-dir output_dir/ \ --reference-sequence input_dir/all_sequences.fa \ --roi-file input_dir/all_coding_exons.tsv \ --cmd_list_file parallelizable_commands \ --cmd_prefix bsub
In the above case, the commands printed into the output file \*(L"parallelizable_commands\*(R" can be run in parallel. After they complete, rerun this script as printed directly below (--cmd_list_file and --cmd_prefix have been removed) to merge the parallelized calculations:
... music bmr calc-covg \ --bam-list input_dir/bam_list \ --output-dir output_dir/ \ --reference-sequence input_dir/all_sequences.fa \ --roi-file input_dir/all_coding_exons.tsv
Tab delimited list of ROIs [chr start stop gene_name] (See Description)
Path to reference sequence in \s-1FASTA\s0 format
Tab delimited list of \s-1BAM\s0 files [sample_name normal_bam tumor_bam] (See Description)
Directory where output files and subdirectories will be written
A file to write calcRoiCovg commands to (See Description)
A command that submits a job to your cluster (See Description)
The minimum read depth to consider a Normal \s-1BAM\s0 base as covered
The minimum read depth to consider a Tumor \s-1BAM\s0 base as covered
The minimum mapping quality of reads to consider towards read depth counts
This script counts bases with sufficient coverage in the ROIs of each gene in the given pairs of tumor-normal \s-1BAM\s0 files and categorizes them into - \s-1AT\s0, \s-1CG\s0 (non-CpG), and CpG counts. It also adds up these base-counts across all ROIs of each gene for each sample, but covered bases that lie within overlapping ROIs are not counted more than once towards these total counts.
By default, this script runs a C-based tool named calcRoiCovg for each sample one after another, taking ~30 mins per sample to generate per-ROI covered base counts. If the results of calcRoiCovg for a sample already exists in the output subdirectory roi_covgs, re-calculation is skipped. This allows you to run your own calcRoiCovg jobs in parallel or on multiple machines (Keep reading).
Speed things up by running calcRoiCovg jobs in parallel: If a compute cluster or multiple machines are available, run this script twice as follows:
Define cmd-list-file and cmd-prefix to generate a file with commands that can be submitted to a cluster or run manually. These jobs will write per-ROI base counts in a subdirectory roi_covgs.
After all the parallelized calcRoiCovg jobs are completed, run this script again to add them up and generate the final per-gene base counts in a subdirectory gene_covgs. Remember to remove the cmd-list-file and cmd-prefix arguments or you will just be re-creating a list of commands.
Copyright (C) 2010-2011 Washington University in St. Louis.
It is released under the Lesser \s-1GNU\s0 Public License (\s-1LGPL\s0) version 3. See the associated \s-1LICENSE\s0 file in this distribution.
Cyriac Kandoth, Ph.D.
genome-music-bmr(1), genome-music(1), genome(1)