#NEWLINE# @ transform ( buildBAM , regex ( '(\\S+).bam' ) , '\\1.nsrt.bam' ) #NEWLINE# def sortByName( infile , outfile ) : #NEWLINE# #INDENT# 'Add number of hits tags to sam file' #NEWLINE# to_cluster = USECLUSTER #NEWLINE# track = P . snip ( outfile , '.bam' ) #NEWLINE# statement = 'samtools sort -n %(infile)s %(track)s;' #NEWLINE# P . run ( )