#NEWLINE# @ transform ( dedup , regex ( '(\\S+)/bam/(\\S+).bam' ) , '\\1/bam/\\2.alignstats' ) #NEWLINE# def buildPicardAlignStats( infile , outfile ) : #NEWLINE# #INDENT# 'Gather BAM file alignment statistics using Picard ' #NEWLINE# to_cluster = USECLUSTER #NEWLINE# track = P . snip ( os . path . basename ( statement ) , '.bam' ) #NEWLINE# statement = ( 'CollectAlignmentSummaryMetrics INPUT=%(infile)s REFERENCE_SEQUENCE=%%(samtools_genome)s ASSUME_SORTED=true OUTPUT=%(outfile)s VALIDATION_STRINGENCY=SILENT ' % locals ( ) ) #NEWLINE# P . run ( )