@transform( dedup, suffix( ".dedup.bam"), ".dedup.mapped.bam")
def removeUnmapped(infile, outfile):
    to_cluster = True
    statement = '''samtools view -F 4 -bh %(infile)s > %(outfile)s; 
                   samtools index %(outfile)s; ''' % locals()
    P.run()

############################################################
Remove unmapped reads from BAM file
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj012_chipseq.py/removeUnmapped