@follows(copyCapseqReplicatedBedFiles, exportCapseqIntergenicBed)
@files( (PARAMS["compare_liver_pattern"]+".replicated.intergenic.bed", PARAMS["compare_testes_pattern"]+".replicated.intergenic.bed"), "liver_vs_testes/liver.testes.intergenic.venn" )
def liverTestesIntergenicVenn(infiles, outfile):
    liver, testes = infiles
    to_cluster = True
    statement = '''cat %(liver)s %(testes)s | mergeBed -i stdin > liver_vs_testes/liver.testes.intergenic.merge.bed;
                   echo "Total merged intervals" > %(outfile)s; cat liver_vs_testes/liver.testes.intergenic.merge.bed | wc -l >> %(outfile)s; 
                   echo "Liver & testes" >> %(outfile)s; intersectBed -a liver_vs_testes/liver.testes.intergenic.merge.bed -b %(liver)s -u | intersectBed -a stdin -b %(testes)s -u | wc -l >> %(outfile)s; 
                   echo "Testes only" >> %(outfile)s; intersectBed -a liver_vs_testes/liver.testes.intergenic.merge.bed -b %(liver)s -v | wc -l >> %(outfile)s; 
                   echo "Liver only" >> %(outfile)s; intersectBed -a liver_vs_testes/liver.testes.intergenic.merge.bed -b %(testes)s -v | wc -l >> %(outfile)s;                   
                   sed -i '{N;s/\\n/\\t/g}' %(outfile)s; '''
    P.run()
    
############################################################
Gets the name of this source version.
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj007.py/liverTestesIntergenicVenn--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/appcfg.py/GetSourceName