Mercurial > repos > iuc > raceid_clustering
changeset 3:d4646ce659b4 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid3 commit d94b3b8a4c7cf8c604279eb1eea24d32b3868922
author | iuc |
---|---|
date | Mon, 15 Apr 2019 17:54:40 -0400 |
parents | 528a43b1cbcf |
children | ee0bbc160cb1 |
files | macros_cluster.xml scripts/cluster.R test-data/intestinal.filter.log test-data/matrix.filter.geqone.pdf |
diffstat | 4 files changed, 17 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/macros_cluster.xml Thu Feb 28 17:40:05 2019 -0500 +++ b/macros_cluster.xml Mon Apr 15 17:54:40 2019 -0400 @@ -287,6 +287,7 @@ filt.use.ccorrect = FALSE filt.lbatch.regexes = NULL +filt.geqone = as.logical( '$filt.hist_geq_one' ) filt\$mintotal = as.integer( '$filt.mintotal' ) filt\$minexpr = as.integer( '$filt.minexpr' ) filt\$minnumber = as.integer( '$filt.minnumber' )
--- a/scripts/cluster.R Thu Feb 28 17:40:05 2019 -0500 +++ b/scripts/cluster.R Mon Apr 15 17:54:40 2019 -0400 @@ -1,5 +1,5 @@ #!/usr/bin/env R -VERSION = "0.3" +VERSION = "0.4" args = commandArgs(trailingOnly = T) @@ -28,6 +28,10 @@ filt.lib <- log10(colSums(getfdata(sc))) filt.feat <- log10(colSums(getfdata(sc)>0)) + if (filt.geqone){ + filt.feat <- log10(colSums(getfdata(sc)>=1)) + } + br <- 50 ## Determine limits on plots based on the unfiltered data ## (doesn't work, R rejects limits and norm data is too different to compare to exp data @@ -124,11 +128,12 @@ goi <- head(rownames(dg.goi.table), genelist.plotlim) print(plotmarkergenes(sc, goi)) - print(do.call(mtext, c(paste(" Cluster ",n), test))) ## spacing is a hack + buffer <- paste(rep("", 36), collapse=" ") + print(do.call(mtext, c(paste(buffer, "Cluster ",n), test))) ## spacing is a hack test$line=-1 - print(do.call(mtext, c(paste(" Sig. Genes"), test))) ## spacing is a hack + print(do.call(mtext, c(paste(buffer, "Sig. Genes"), test))) ## spacing is a hack test$line=-2 - print(do.call(mtext, c(paste(" (fc > ", genelist.foldchange,")"), test))) ## spacing is a hack + print(do.call(mtext, c(paste(buffer, "(fc > ", genelist.foldchange,")"), test))) ## spacing is a hack }) write.table(df, file=out.genelist, sep="\t", quote=F) @@ -139,10 +144,10 @@ if (use.filtnormconf){ sc <- do.filter(sc) message(paste(" - Source:: genes:",nrow(sc@expdata),", cells:",ncol(sc@expdata))) - message(paste(" - Filter:: genes:",nrow(sc@ndata),", cells:",ncol(sc@ndata))) + message(paste(" - Filter:: genes:",nrow(getfdata(sc)),", cells:",ncol(getfdata(sc)))) message(paste(" :: ", - sprintf("%.1f", 100 * nrow(sc@ndata)/nrow(sc@expdata)), "% of genes remain,", - sprintf("%.1f", 100 * ncol(sc@ndata)/ncol(sc@expdata)), "% of cells remain")) + sprintf("%.1f", 100 * nrow(getfdata(sc))/nrow(sc@expdata)), "% of genes remain,", + sprintf("%.1f", 100 * ncol(getfdata(sc))/ncol(sc@expdata)), "% of cells remain")) } if (use.cluster){