@follows( exportLiverTestesMergeWithSort )
@transform( copyCapseqReplicatedBedFiles, regex(r"(\S+).replicated.bed"), r"liver_vs_testes/\1.replicated.liver.testes.merge.reads.peakshape.gz" )
def getPeakShapeLiverTestesReads(infile, outfile):
    track = P.snip( os.path.basename( infile ), ".replicated.bed" )
    bedfile = "liver_vs_testes/liver.testes.merge.sort.bed"
    bamfile = "../merged_bams/%s.merge.bam" % track
    assert os.path.exists( bamfile ), "could not find bamfile %s for track %s" % ( bamfile, track )
    statement = '''python %(scriptsdir)s/bam2peakshape.py %(bamfile)s %(bedfile)s
                       --output-filename-pattern=%(outfile)s.%%s
                       --sort=peak-width
                       --sort=peak-height
                       --sort=interval-width
                       --sort=interval-score
                       --window-size=3000
                       --bin-size=10
                       --normalization=sum
                       --centring-method=reads
                       --force
                       --log=%(outfile)s.log
                   | gzip > %(outfile)s '''
    P.run()

############################################################
Test getting all the installed capabilities
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj007.py/getPeakShapeLiverTestesReads--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/win_dism_test.py/DISMTestCase.test_installed_capabilities