@follows( mkdir("plots") )
@merge(getGenesetCapseqOverlapList, "plots/"+PARAMS["species"]+"_overlapped_genes_tissue_venn.pdf")
def plotFigure4OverlappedGenesTissueVenn( infiles, outfile):
    inlist = "'"+"','".join(infiles)+"'"
    print(inlist)
    R('''library(VennDiagram) ''')
    R('''inlist <- c(%(inlist)s)''' % locals() )
    R('''x <- list()''' )
    R('''listnames <- NULL''' )
    R('''length(x) <- length(inlist)''')
    R('''for ( i in 1:length(inlist)) { x[[i]] <- read.table(file=inlist[i], header=FALSE, stringsAsFactors=FALSE)[,1]; listnames <- c(listnames,inlist[i]); }''' % locals() )
    R('''names(x) <- listnames''')
    R('''pdf(file='%(outfile)s', height=8, width=8, onefile=TRUE, family='Helvetica', paper='A4', pointsize=12)''' % locals() )
    R('''venn <- venn.diagram( x, filename=NULL, col="#58595B", alpha=0.75, cex=2.0, fontfamily="Helvetica", fontface="bold")''' % locals() )
    R('''grid.draw(venn)''')
    R('''dev.off()''')
    
    # Convert pdf to png for web
    outfile2 = outfile.replace("pdf","png")
    statement = '''convert %(outfile)s %(outfile2)s'''
    P.run()

############################################################
deploy a versioned project on the host
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_proj007.py/plotFigure4OverlappedGenesTissueVenn--crossover with--dataset/ETHPy150Open bretth/woven/woven/api.py/deploy