<s> """<STR_LIT>""" <EOL> import sys <EOL> import re <EOL> import os . path <EOL> import os <EOL> from collections import defaultdict <EOL> from glob import * <EOL> import shutil <EOL> from ruffus import * <EOL> from rubra . utils import pipeline_options <EOL> from rubra . utils import ( runStageCheck , mkLogFile , mkDir , mkForceLink ) <EOL> from input_fastq import parse_and_link <EOL> def make_metadata_string ( metadata ) : <EOL> return r'<STR_LIT>' % ( metadata [ '<STR_LIT>' ] , metadata [ '<STR_LIT>' ] , metadata [ '<STR_LIT>' ] ) <EOL> ref_files = pipeline_options . ref_files <EOL> working_files = pipeline_options . working_files <EOL> logDir = pipeline_options . pipeline [ '<STR_LIT>' ] <EOL> fastq_metadata = defaultdict ( dict ) <EOL> original_fastq_files = [ ] <EOL> for fastq_dir in working_files [ '<STR_LIT>' ] : <EOL> original_fastq_files += glob ( os . path . join ( fastq_dir , '<STR_LIT>' ) ) <EOL> if len ( original_fastq_files ) == <NUM_LIT:0> : <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT>" <EOL> print "<STR_LIT:\n>" . join ( working_files [ '<STR_LIT>' ] ) <EOL> sys . exit ( <NUM_LIT:1> ) <EOL> mkDir ( working_files [ '<STR_LIT>' ] ) <EOL> all_fastq_files = [ ] <EOL> for file in original_fastq_files : <EOL> symlink = parse_and_link ( file , working_files [ '<STR_LIT>' ] , fastq_metadata ) <EOL> all_fastq_files . append ( symlink ) <EOL> if pipeline_options . pipeline [ '<STR_LIT>' ] : <EOL> allowed_samples = set ( pipeline_options . pipeline [ '<STR_LIT>' ] ) <EOL> fastq_files = [ file for file in sorted ( all_fastq_files ) <EOL> if ( fastq_metadata [ os . path . basename ( file ) ] [ '<STR_LIT>' ] in allowed_samples ) ] <EOL> else : <EOL> fastq_files = sorted ( all_fastq_files ) <EOL> print "<STR_LIT>" <EOL> for file in fastq_files : <EOL> print file <EOL> print <EOL> print "<STR_LIT>" % working_files [ '<STR_LIT>' ] <EOL> print "<STR_LIT>" % logDir <EOL> print <EOL> output_dir = working_files [ '<STR_LIT>' ] <EOL> fastqc_dir = os . path . join ( output_dir , "<STR_LIT>" ) <EOL> mkDir ( fastqc_dir ) <EOL> sambam_dir = os . path . join ( output_dir , "<STR_LIT>" ) <EOL> mkDir ( sambam_dir ) <EOL> variant_dir = os . path . join ( output_dir , "<STR_LIT>" ) <EOL> mkDir ( variant_dir ) <EOL> coverage_dir = os . path . join ( output_dir , "<STR_LIT>" ) <EOL> mkDir ( coverage_dir ) <EOL> ensembl_dir = os . path . join ( output_dir , "<STR_LIT>" ) <EOL> mkDir ( ensembl_dir ) <EOL> results_dir = os . path . join ( output_dir , "<STR_LIT>" ) <EOL> mkDir ( results_dir ) <EOL> @ transform ( fastq_files , regex ( '<STR_LIT>' ) , <EOL> [ r'<STR_LIT>' % fastqc_dir , r'<STR_LIT>' % fastqc_dir ] ) <EOL> def fastqc ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> sequence = inputs <EOL> fastqc_dest , flagFile = outputs <EOL> runStageCheck ( '<STR_LIT>' , flagFile , fastqc_dir , sequence ) <EOL> @ collate ( fastq_files , regex ( r"<STR_LIT>" ) , <EOL> [ r"<STR_LIT>" % sambam_dir , r"<STR_LIT>" % sambam_dir ] ) <EOL> def bwaPE ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> seq1 , seq2 = sorted ( inputs ) <EOL> output , flag_file = outputs <EOL> fastq_name = os . path . basename ( seq1 ) <EOL> sample = fastq_metadata [ fastq_name ] [ '<STR_LIT>' ] <EOL> runID = fastq_metadata [ fastq_name ] [ '<STR_LIT>' ] <EOL> lane = fastq_metadata [ fastq_name ] [ '<STR_LIT>' ] <EOL> readgroup_metadata = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : sample , <EOL> '<STR_LIT>' : "<STR_LIT>" % ( sample , runID , lane ) } <EOL> metadata_str = make_metadata_string ( readgroup_metadata ) <EOL> print "<STR_LIT>" % ( os . path . basename ( seq1 ) , os . path . basename ( seq2 ) ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , metadata_str , ref_files [ '<STR_LIT>' ] , seq1 , seq2 , output ) <EOL> @ transform ( bwaPE , suffix ( "<STR_LIT>" ) , <EOL> [ "<STR_LIT>" , "<STR_LIT>" ] ) <EOL> def samToBam ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> output , flag_file = outputs <EOL> sam , _success = inputs <EOL> print "<STR_LIT>" % os . path . basename ( sam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , sam , output ) <EOL> @ collate ( samToBam , regex ( r'<STR_LIT>' ) , <EOL> [ r"<STR_LIT>" , r'<STR_LIT>' ] ) <EOL> def mergeBams ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bams = [ bam for [ bam , _success ] in inputs ] <EOL> output , flag_file = outputs <EOL> baminputs = '<STR_LIT:U+0020>' . join ( [ "<STR_LIT>" % bam for bam in bams ] ) <EOL> print "<STR_LIT>" % ( "<STR_LIT:U+002C>" . join ( [ os . path . basename ( bam ) for bam in bams ] ) , os . path . basename ( output ) ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , baminputs , output ) <EOL> @ follows ( '<STR_LIT>' ) <EOL> @ transform ( mergeBams , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def dedup ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> input_bam , _success = inputs <EOL> output_bam , flag_file = outputs <EOL> logFile = mkLogFile ( logDir , input_bam , '<STR_LIT>' ) <EOL> print "<STR_LIT>" % os . path . basename ( input_bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , input_bam , logFile , output_bam ) <EOL> @ follows ( '<STR_LIT>' ) <EOL> @ transform ( dedup , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def realignIntervals ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output_intervals , flag_file = outputs <EOL> logFile = mkLogFile ( logDir , bam , '<STR_LIT>' ) <EOL> print "<STR_LIT>" % os . path . basename ( bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , ref_files [ '<STR_LIT>' ] , bam , ref_files [ '<STR_LIT>' ] , ref_files [ '<STR_LIT>' ] , logFile , output_intervals ) <EOL> def remove_GATK_bai ( bamfile ) : <EOL> """<STR_LIT>""" <EOL> bad_bai = os . path . splitext ( bamfile ) [ <NUM_LIT:0> ] + "<STR_LIT>" <EOL> try : <EOL> os . remove ( bad_bai ) <EOL> except OSError , e : <EOL> if e . errno != <NUM_LIT:2> : <EOL> raise e <EOL> @ transform ( realignIntervals , regex ( r"<STR_LIT>" ) , <EOL> add_inputs ( [ r'<STR_LIT>' ] ) , <EOL> [ r'<STR_LIT>' , r'<STR_LIT>' ] ) <EOL> def realign ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> [ intervals , _success ] , [ input_bam ] = inputs <EOL> output_bam , flag_file = outputs <EOL> logFile = mkLogFile ( logDir , input_bam , '<STR_LIT>' ) <EOL> print "<STR_LIT>" % os . path . basename ( input_bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , ref_files [ '<STR_LIT>' ] , input_bam , intervals , logFile , output_bam ) <EOL> remove_GATK_bai ( output_bam ) <EOL> @ follows ( '<STR_LIT>' ) <EOL> @ transform ( realign , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def baseQualRecalCount ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output_csv , flag_file = outputs <EOL> logFile = mkLogFile ( logDir , bam , '<STR_LIT>' ) <EOL> print "<STR_LIT>" % os . path . basename ( bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam , ref_files [ '<STR_LIT>' ] , ref_files [ '<STR_LIT>' ] , logFile , output_csv ) <EOL> @ transform ( baseQualRecalCount , regex ( r'<STR_LIT>' ) , <EOL> add_inputs ( [ r'<STR_LIT>' ] ) , <EOL> [ r'<STR_LIT>' , r'<STR_LIT>' ] ) <EOL> def baseQualRecalTabulate ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> [ input_csv , _success ] , [ input_bam ] = inputs <EOL> output_bam , flag_file = outputs <EOL> logFile = mkLogFile ( logDir , input_bam , '<STR_LIT>' ) <EOL> print "<STR_LIT>" % os . path . basename ( input_bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , input_bam , ref_files [ '<STR_LIT>' ] , input_csv , logFile , output_bam ) <EOL> remove_GATK_bai ( output_bam ) <EOL> @ transform ( baseQualRecalTabulate , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def indexRecalibratedBams ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output , flag_file = outputs <EOL> print "<STR_LIT>" % os . path . basename ( bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam ) <EOL> @ follows ( indexRecalibratedBams ) <EOL> @ transform ( baseQualRecalTabulate , <EOL> regex ( r'<STR_LIT>' ) , <EOL> [ r'<STR_LIT>' % variant_dir , <EOL> r'<STR_LIT>' % variant_dir , <EOL> r'<STR_LIT>' % variant_dir ] ) <EOL> def callSNPs ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output_vcf , _idx , flag_file = outputs <EOL> logFile = mkLogFile ( logDir , bam , '<STR_LIT>' ) <EOL> print "<STR_LIT>" % bam <EOL> runStageCheck ( '<STR_LIT>' , flag_file , ref_files [ '<STR_LIT>' ] , bam , ref_files [ '<STR_LIT>' ] , logFile , output_vcf ) <EOL> @ follows ( indexRecalibratedBams ) <EOL> @ transform ( baseQualRecalTabulate , <EOL> regex ( r'<STR_LIT>' ) , <EOL> [ r'<STR_LIT>' % variant_dir , <EOL> r'<STR_LIT>' % variant_dir , <EOL> r'<STR_LIT>' % variant_dir ] ) <EOL> def callIndels ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output_vcf , _idx , flag_file = outputs <EOL> logFile = mkLogFile ( logDir , bam , '<STR_LIT>' ) <EOL> print "<STR_LIT>" % bam <EOL> runStageCheck ( '<STR_LIT>' , flag_file , ref_files [ '<STR_LIT>' ] , bam , ref_files [ '<STR_LIT>' ] , logFile , output_vcf ) <EOL> @ transform ( callSNPs , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def filterSNPs ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> input_vcf , _idx , _success = inputs <EOL> output_vcf , _idxout , flag_file = outputs <EOL> logFile = mkLogFile ( logDir , input_vcf , '<STR_LIT>' ) <EOL> print "<STR_LIT>" % input_vcf <EOL> runStageCheck ( '<STR_LIT>' , flag_file , ref_files [ '<STR_LIT>' ] , input_vcf , logFile , output_vcf ) <EOL> @ transform ( callIndels , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def filterIndels ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> input_vcf , _idx , _success = inputs <EOL> output_vcf , _idxout , flag_file = outputs <EOL> logFile = mkLogFile ( logDir , input_vcf , '<STR_LIT>' ) <EOL> print "<STR_LIT>" % input_vcf <EOL> runStageCheck ( '<STR_LIT>' , flag_file , ref_files [ '<STR_LIT>' ] , input_vcf , logFile , output_vcf ) <EOL> @ transform ( [ filterSNPs , filterIndels ] , regex ( r'<STR_LIT>' ) , <EOL> [ r'<STR_LIT>' % ensembl_dir , r'<STR_LIT>' % ensembl_dir ] ) <EOL> def getEnsemblAnnotations ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> vcf , _idx , _success = inputs <EOL> output , flag_file = outputs <EOL> logFile = mkLogFile ( logDir , vcf , '<STR_LIT>' ) <EOL> print "<STR_LIT>" % os . path . basename ( vcf ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , vcf , output , logFile ) <EOL> @ transform ( mergeBams , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def indexMergedBams ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output , flag_file = outputs <EOL> print "<STR_LIT>" % os . path . basename ( bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam ) <EOL> @ transform ( dedup , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def indexDedupedBams ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output , flag_file = outputs <EOL> print "<STR_LIT>" % os . path . basename ( bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam ) <EOL> @ transform ( realign , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def indexRealignedBams ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output , flag_file = outputs <EOL> print "<STR_LIT>" % os . path . basename ( bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam ) <EOL> @ transform ( mergeBams , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def igvcountMergedBams ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> outfile , flag_file = outputs <EOL> print "<STR_LIT>" % os . path . basename ( bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam , outfile ) <EOL> @ transform ( realign , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def igvcountRealignedBams ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> outfile , flag_file = outputs <EOL> print "<STR_LIT>" % os . path . basename ( bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam , outfile ) <EOL> @ transform ( dedup , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def igvcountDedupedBams ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> outfile , flag_file = outputs <EOL> print "<STR_LIT>" % os . path . basename ( bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam , outfile ) <EOL> @ transform ( baseQualRecalTabulate , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def igvcountRecalibratedBams ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> outfile , flag_file = outputs <EOL> print "<STR_LIT>" % os . path . basename ( bam ) <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam , outfile ) <EOL> @ transform ( filterSNPs , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def vcfIndexSNPs ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> vcf , _idx , _success = inputs <EOL> zipfile , tabix_index , flag_file = outputs <EOL> print "<STR_LIT>" % vcf <EOL> runStageCheck ( '<STR_LIT>' , flag_file , vcf ) <EOL> @ transform ( filterIndels , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def vcfIndexIndels ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> vcf , _idx , _success = inputs <EOL> zipfile , tabix_index , flag_file = outputs <EOL> print "<STR_LIT>" % vcf <EOL> runStageCheck ( '<STR_LIT>' , flag_file , vcf ) <EOL> @ follows ( indexMergedBams ) <EOL> @ transform ( mergeBams , <EOL> regex ( r'<STR_LIT>' ) , <EOL> [ r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir ] ) <EOL> def earlyDepthOfCoverage ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> flag_file = outputs [ - <NUM_LIT:1> ] <EOL> output_example = outputs [ <NUM_LIT:0> ] <EOL> output_base = os . path . splitext ( output_example ) [ <NUM_LIT:0> ] <EOL> print "<STR_LIT>" % bam <EOL> runStageCheck ( '<STR_LIT>' , flag_file , ref_files [ '<STR_LIT>' ] , bam , output_base ) <EOL> @ follows ( indexDedupedBams ) <EOL> @ transform ( dedup , <EOL> regex ( r'<STR_LIT>' ) , <EOL> [ r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir ] ) <EOL> def dedupedDepthOfCoverage ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> flag_file = outputs [ - <NUM_LIT:1> ] <EOL> output_example = outputs [ <NUM_LIT:0> ] <EOL> output_base = os . path . splitext ( output_example ) [ <NUM_LIT:0> ] <EOL> print "<STR_LIT>" % bam <EOL> runStageCheck ( '<STR_LIT>' , flag_file , ref_files [ '<STR_LIT>' ] , bam , output_base ) <EOL> @ follows ( indexRecalibratedBams ) <EOL> @ transform ( baseQualRecalTabulate , <EOL> regex ( r'<STR_LIT>' ) , <EOL> [ r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir , <EOL> r'<STR_LIT>' % coverage_dir ] ) <EOL> def finalDepthOfCoverage ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> flag_file = outputs [ - <NUM_LIT:1> ] <EOL> output_example = outputs [ <NUM_LIT:0> ] <EOL> output_base = os . path . splitext ( output_example ) [ <NUM_LIT:0> ] <EOL> print "<STR_LIT>" % bam <EOL> runStageCheck ( '<STR_LIT>' , flag_file , ref_files [ '<STR_LIT>' ] , bam , output_base ) <EOL> @ transform ( samToBam , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def countRunBam ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output , flag_file = outputs <EOL> print "<STR_LIT>" % bam <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam , output ) <EOL> @ transform ( mergeBams , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def countMergedBam ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output , flag_file = outputs <EOL> print "<STR_LIT>" % bam <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam , output ) <EOL> @ transform ( realign , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def countRealignedBam ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output , flag_file = outputs <EOL> print "<STR_LIT>" % bam <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam , output ) <EOL> @ transform ( dedup , suffix ( '<STR_LIT>' ) , <EOL> [ '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def countDedupedBam ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> bam , _success = inputs <EOL> output , flag_file = outputs <EOL> print "<STR_LIT>" % bam <EOL> runStageCheck ( '<STR_LIT>' , flag_file , bam , output ) <EOL> @ merge ( [ countDedupedBam , countMergedBam ] , <EOL> [ "<STR_LIT>" % results_dir , "<STR_LIT>" % results_dir , "<STR_LIT>" % results_dir ] ) <EOL> def collateReadCounts ( inputs , outputs ) : <EOL> """<STR_LIT>""" <EOL> in_dir = sambam_dir <EOL> out_dir = results_dir <EOL> flag_file = outputs [ - <NUM_LIT:1> ] <EOL> print "<STR_LIT>" <EOL> runStageCheck ( '<STR_LIT>' , flag_file , in_dir , out_dir ) </s>
