@transform( buildBAM, suffix( ".bam"), ".dedup.bam")
def dedup(infiles, outfile):
        to_cluster = USECLUSTER
        track = P.snip( outfile, ".bam" )
        dedup_method = PARAMS["dedup_method"]
        if dedup_method == 'samtools':
            statement = '''samtools rmdup %(infiles)s %(outfile)s; ''' % locals()    
        elif dedup_method == 'picard':
            statement = '''MarkDuplicates INPUT=%(infiles)s  ASSUME_SORTED=true OUTPUT=%(outfile)s 
                           METRICS_FILE=%(track)s.dupstats REMOVE_DUPLICATES=true 
                           VALIDATION_STRINGENCY=SILENT; ''' % locals()
        statement += '''samtools index %(outfile)s; ''' % locals()
        P.run()

#########################################################################
Adds a new item from the given (key, value)-tuple.
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj012_chipseq.py/dedup--crossover with--dataset/ETHPy150Open clips/pattern/pattern/text/search.py/odict.push