Previous changeset 3:d4646ce659b4 (2019-04-15) Next changeset 5:7e014059a88d (2020-01-29) |
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid3 commit 5d7c4cd914295a81d42bf8baaad4981c23a83059" |
modified:
macros.xml raceid_clustering.xml scripts/cluster.R scripts/clusterinspect.R |
added:
macros_cheetah.xml test-data/out_diffgene_multiple.pdf |
removed:
macros_cluster.xml macros_inspectclusters.xml macros_inspecttrajectories.xml macros_trajectory.xml test-data/matrix.genelist test-data/matrix.pdf test-data/matrix.rdat test-data/out_traject_inspect_fateid.tabular |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 macros.xml --- a/macros.xml Mon Apr 15 17:54:40 2019 -0400 +++ b/macros.xml Mon Aug 12 13:00:12 2019 -0400 |
[ |
@@ -1,5 +1,4 @@ <macros> - <token name="@GET_VERSION@"><![CDATA[ 2>&1 | head -1 | cut -d' ' -f 2 ]]></token> <token name="@STRING2VECTOR@"> string2numericvector = function(string){ #' Converts a string to a valid vector @@ -27,7 +26,25 @@ } </token> <token name="@VERSION_RACEID@">3</token> - <token name="@VERSION_PACKAGE@">0.2</token> + <token name="@VERSION_WRAPPER@">1</token> + + <macro name="version_command_config" token_prog="temp" token_cheetah="temp2" token_out="2> '$outlog'"> + <version_command><![CDATA[ +Rscript '$__tool_directory__/scripts/@PROG@' 2>&1 | head -1 | cut -d' ' -f 2 + ]]></version_command> + <command detect_errors="exit_code"><![CDATA[ +Rscript '$__tool_directory__/scripts/@PROG@' '$userconf' @OUT@ +]]> + </command> + <configfiles> + <configfile name="userconf" ><![CDATA[ +@STRING2VECTOR@ + +@@CHEETAH@@ +]]></configfile> + </configfiles> + </macro> + <macro name="requirements" > <requirements> <requirement type="package" version="0.1.1">r-raceid</requirement> @@ -69,36 +86,6 @@ <citation type="doi">10.1038/nmeth.4662</citation> </citations> </macro> - <macro name="select_cells" token_sectionname="@SECTIONNAME@" token_sectiontitle="@SECTIONTITLE@" > - <section name="@SECTIONNAME@" title="@SECTIONTITLE@" expanded="true" > - <param name="name_set" type="text" optional="true" label="Name of Set" > - <!-- Aname, Bname --> - <expand macro="sanitize_title" /> - </param> - <conditional name="meth" > - <param name="type" type="select" label="Selection method" > - <option value="cln" selected="true">Cluster Numbers</option> - <option value="regex" >Regular Expression</option> - <option value="manual" >Manual Selection</option> - </param> - <when value="cln" > - <param name="selector" type="text" value="" label="List of clusters" > - <expand macro="sanitize_numeric_vector" /> - </param> - </when> - <when value="regex" > - <param name="selector" type="text" value="" label="Regular Expression to select gene names" > - <expand macro="sanitize_regex" /> - </param> - </when> - <when value="manual" > - <param name="selector" type="text" value="" label="List of genes" > - <expand macro="sanitize_string_vector" /> - </param> - </when> - </conditional> - </section> - </macro> <!-- Sanitizers --> <macro name="sanitize_title"> <sanitizer invalid_char=""> |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 macros_cheetah.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros_cheetah.xml Mon Aug 12 13:00:12 2019 -0400 |
[ |
b'@@ -0,0 +1,377 @@\n+<macros>\n+ <token name="@FILTNORM_CHEETAH@"><![CDATA[\n+## Perform do.filter\n+use.filtnormconf = TRUE\n+\n+## Perform do.cluster, do.outlier, do.clustmap, mkgenelist\n+use.cluster = FALSE\n+\n+in.table = read.table(\n+ \'${intable}\',\n+ stringsAsFactors = F,\n+ na.strings=c("NA", "-", "?", "."),\n+ sep=\'\\t\',\n+ header=TRUE,\n+ row.names=1\n+)\n+\n+## Hidden flag to use test data instead\n+## see: test-data/use.intestinal\n+\n+use.test.data = (names(in.table)[1] == "test")\n+\n+sc = NULL\n+if (use.test.data) {\n+ sc = SCseq(intestinalData)\n+ message("Loading test data from library")\n+} else {\n+ sc = SCseq(in.table)\n+}\n+\n+\n+filt = formals(filterdata)\n+filt.ccc = formals(CCcorrect)\n+filt.use.ccorrect = FALSE\n+filt.lbatch.regexes = NULL\n+\n+filt.geqone = as.logical( \'$filt.hist_geq_one\' )\n+filt\\$mintotal = as.integer( \'$filt.mintotal\' )\n+filt\\$minexpr = as.integer( \'$filt.minexpr\' )\n+filt\\$minnumber = as.integer( \'$filt.minnumber\' )\n+#if str($filt.use.def) == "no":\n+filt\\$knn = as.integer( \'$filt.use.knn\' )\n+filt\\$ccor = as.numeric( \'$filt.use.ccor\' )\n+filt\\$bmode = as.character( \'$filt.use.bmode\' )\n+ #if $filt.use.LBatch_regexes:\n+filt.lbatch.regexes = string2textvector( \'$filt.use.LBatch_regexes\' )\n+ #end if\n+ #if $filt.use.CGenes:\n+filt\\$CGenes = string2textvector( \'$filt.use.CGenes\' )\n+ #end if\n+ #if $filt.use.FGenes:\n+filt\\$FGenes = string2textvector( \'$filt.use.FGenes\' )\n+ #end if\n+ #if str($filt.use.ccc.use) == "yes"\n+filt.use.ccorrect = TRUE\n+ #if $filt.use.ccc.vset:\n+filt.ccc\\$vset = string2textvector( \'$filt.use.ccc.vset\' )\n+ #end if\n+ #if $filt.use.ccc.ncomp:\n+filt.ccc\\$nComp = as.integer( \'$filt.use.ccc.ncomp\' )\n+ #end if\n+filt.ccc\\$pvalue = as.numeric( \'$filt.use.ccc.pvalue\' )\n+filt.ccc\\$quant = as.numeric( \'$filt.use.ccc.quant\' )\n+filt.ccc\\$dimR = as.logical( \'$filt.use.ccc.dimr\' )\n+filt.ccc\\$mode = as.character( \'$filt.use.ccc.mode.value\' )\n+filt.ccc\\$logscale = as.logical( \'$filt.use.ccc.logscale\' )\n+ #end if\n+#end if\n+\n+out.pdf = \'${outpdf}\'\n+out.rdat = \'${outrdat}\'\n+out.table = \'${outtable}\'\n+\n+]]></token>\n+ <token name="@CLUSTER_CHEETAH@"><![CDATA[\n+\n+in.rdat = readRDS(\'${inputrds}\')\n+\n+sc = in.rdat\n+\n+## Perform do.filter\n+use.filtnormconf = FALSE\n+\n+## Perform do.cluster, do.outlier, do.clustmap, mkgenelist\n+use.cluster = TRUE\n+\n+\n+clust.compdist = formals(compdist)\n+clust.clustexp = formals(clustexp)\n+clust.compdist\\$metric = as.character( \'$clust.metric\' )\n+clust.clustexp\\$FUNcluster = as.character( \'$clust.funcluster\' )\n+\n+#if str($clust.use.def) == "no":\n+\n+clust.compdist\\$FSelect = as.logical( \'$clust.use.fselect\' )\n+ #if $clust.use.knn:\n+clust.compdist\\$knn = as.integer( \'$clust.use.knn\' )\n+ #end if\n+clust.clustexp\\$sat = as.logical( \'$clust.use.sat\' )\n+ #if $clust.use.samp:\n+clust.clustexp\\$samp = as.integer( \'$clust.use.samp\' )\n+ #end if\n+ #if $clust.use.cln:\n+clust.clustexp\\$cln = as.integer( \'$clust.use.cln\' )\n+clust.clustexp\\$clustnr = as.integer( \'$clust.use.clustnr\' )\n+clust.clustexp\\$bootnr = as.integer( \'$clust.use.bootnr\' )\n+##clust.clustexp\\$rseed = as.integer( \'$clust.use.rseed\' )\n+ #end if\n+#end if\n+\n+outlier.use.randomforest = FALSE\n+outlier.findoutliers = formals(findoutliers)\n+outlier.clustheatmap = formals(clustheatmap)\n+outlier.rfcorrect = formals(rfcorrect)\n+\n+outlier.findoutliers\\$outminc = as.integer( \'$outlier.outminc\' )\n+outlier.findoutliers\\$outlg = as.integer( \'$outlier.outlg\' )\n+outlier.rfcorrect\\$final = as.logical( \'$outlier.final\' )\n+\n+#if str($outlier.use.def) == "no":\n+ #if $outlier.use.nbtree:\n+outlier.rfcorrect\\$nbtree = as.integer( \'$outlier.use.nbtree\' )\n+ #end if\n+outlier.findoutliers\\$probthr = as.numeric( \'$outlier.use.probthr\' )\n+outlier.findoutliers\\$outdistquant = as.numeric( \'$outlier.use.outdistquant\' )\n+##outlier.rfcorrect\\$rfseed = as.integer( \'$outlier.use.rfseed\' )\n+outlier.rfcorrect\\$nbfactor = as.integer( \'$outlier.use.nbfactor\' )\n+#end if\n+\n+cluster.comptsne'..b'ffg_mthr\n+plotdiffg\\$mthr = as.numeric( \'$diffgtest.use.plotdiffg_mthr\' )\n+ #end if\n+ #end if\n+#end if\n+\n+out.pdf=\'${outpdf}\'\n+ ]]></token>\n+ <token name="@TRAJECTORY_CHEETAH@"><![CDATA[\n+\n+in.rdat = readRDS(\'${inputrds}\')\n+\n+pstc.projc = formals(projcells)\n+pstc.projc\\$knn = as.integer( \'$projcell.knn\' )\n+pstc.projc\\$cthr = as.integer( \'$projcell.cthr\' )\n+#if str($projcell.use.def) == "no":\n+pstc.projc\\$nmode = as.logical( \'$projcell.use.nmode\' )\n+pstc.projc\\$fr = as.logical( \'$projcell.use.fr\' )\n+#end if\n+\n+pstc.projb = formals(projback)\n+pstc.projb\\$pdishuf = as.integer( \'$projback.pdishuf\' )\n+#if str($projback.use.def) == "no":\n+pstc.projb\\$fast = as.logical( \'$projback.use.fast\' )\n+pstc.projb\\$rseed = as.integer( \'$projback.use.rseed\' )\n+#end if\n+\n+pstc.comppval = formals(comppvalue)\n+pstc.comppval\\$pthr = as.numeric( \'$comppval.pthr\' )\n+pstc.comppval\\$sensitive = as.logical( \'$comppval.sensitive\' )\n+\n+pstc.plotgraph = formals(plotgraph)\n+pstc.plotgraph\\$showCells = as.logical( \'$plotgraph.showcells\' )\n+pstc.plotgraph\\$scthr = as.numeric( \'$plotgraph.scthr\' )\n+#if str($plotgraph.use.def) == "no":\n+pstc.plotgraph\\$showTsne = as.logical( \'$plotgraph.use.showtsne\' )\n+pstc.plotgraph\\$tp = as.numeric( \'$plotgraph.use.tp\' )\n+#end if\n+\n+pstc.compscore = formals(compscore)\n+pstc.compscore\\$nn = as.integer( \'$compscore.nn\' )\n+pstc.compscore\\$scthr = as.numeric( \'$compscore.scthr\' )\n+\n+out.pdf=\'${outpdf}\'\n+out.rdat=\'${outrdat}\'\n+ ]]></token>\n+ <token name="@INSPECTTRAJECTORIES_CHEETAH@"><![CDATA[\n+in.rdat = readRDS(\'${inputrds}\')\n+\n+perform.stemID = FALSE\n+perform.fateID = FALSE\n+perform.fateID.sominspect = FALSE\n+\n+#if str($trjsid.basic.doit) == "yes"\n+perform.stemID = TRUE\n+trjsid.getproj = formals(getproj)\n+\n+trjsid.numdiffgenes = 10\n+trjsid.getproj\\$i = as.integer( \'$trjsid.basic.i\' )\n+trjsid.branchcells.ijk = string2numericvector( \'$trjsid.basic.br\' )\n+\n+ #if str($trjsid.basic.use.def) == "no":\n+\n+trjsid.getproj\\$zscore = as.logical( \'$trjsid.basic.use.zscore\' )\n+trjsid.numdiffgenes = as.integer( \'$trjsid.basic.use.ndiffgenes\' )\n+\n+ #end if\n+#end if\n+\n+#if str($trjfid.basic.doit) == "yes":\n+perform.fateID = TRUE\n+trjfid.cellsfrom = formals(cellsfromtree)\n+trjfid.filterset = formals(filterset)\n+trjfid.getsom = formals(getsom)\n+trjfid.procsom = formals(procsom)\n+trjfid.plotheat = list()\n+\n+trjfid.cellsfrom\\$z = string2numericvector( \'$trjfid.basic.cellsfromz\' )\n+ #if str($trjfid.basic.use.def) == "no":\n+\n+trjfid.filterset\\$minexpr = as.integer( \'$trjfid.basic.use.filterset_minexpr\' )\n+trjfid.filterset\\$minnumber = as.integer( \'$trjfid.basic.use.filterset_minnumber\' )\n+trjfid.getsom\\$nb = as.numeric( \'$trjfid.basic.use.getsom_nb\' )\n+trjfid.getsom\\$alpha = as.numeric( \'$trjfid.basic.use.getsom_alpha\' )\n+trjfid.procsom\\$corthr = as.numeric( \'$trjfid.basic.use.procsom_corthr\' )\n+trjfid.procsom\\$minsom = as.integer( \'$trjfid.basic.use.procsom_minsom\' )\n+trjfid.plotheat\\$xgrid = as.logical( \'$trjfid.basic.use.plotheat_xgrid\' )\n+trjfid.plotheat\\$ygrid = as.logical( \'$trjfid.basic.use.plotheat_ygrid\' )\n+trjfid.plotheat\\$xlab = as.logical( \'$trjfid.basic.use.plotheat_xlab\' )\n+ #end if\n+\n+ #if str($trjfid.basic.som.doit) == "yes":\n+perform.fateID.sominspect = TRUE\n+\n+trjfidsomi = list()\n+ #if str($trjfid.basic.som.use_genes.typer) == "genelist":\n+trjfidsomi.use.genes = string2textvector( \'$trjfid.basic.som.use_genes.use_genes\' )\n+ #else if str($trjfid.basic.som.use_genes.typer) == "cln":\n+trjfidsomi.use.genes = as.integer( \'$trjfid.basic.som.use_genes.use_genes\' )\n+ #end if\n+\n+trjfidsomi.use.types = \'$trjfid.basic.som.use_types\'\n+trjfidsomi\\$name = \'$trjfid.basic.som.title\'\n+\n+ #if str($trjfid.basic.som.use.def) == "no":\n+trjfidsomi\\$cluster = as.logical( \'$trjfid.basic.som.use.cluster\' )\n+trjfidsomi\\$alpha = as.numeric( \'$trjfid.basic.som.use.alpha\' )\n+ #end if\n+ #end if\n+#end if\n+\n+out.pdf = \'${outpdf}\'\n+out.diffgenes = \'${outdiffgenes}\'\n+\n+]]></token>\n+</macros>\n' |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 macros_cluster.xml --- a/macros_cluster.xml Mon Apr 15 17:54:40 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
b'@@ -1,404 +0,0 @@\n-<macros>\n- <macro name="cluster_inputs" >\n- <param name="intable" type="data" format="tabular" label="Count Matrix" />\n- <section name="filt" title="Filtering" expanded="true" >\n- <param name="mintotal" type="integer" min="1" value="3000" label="Min Transcripts" help="The minimum total transcripts required. Cells with less than mintotal transcripts are filtered out." />\n- <param name="minexpr" type="integer" min="1" value="5" label="Min Expression" help="The minimum required transcript counts of a gene in the minimum number of cells (below)" />\n- <param name="minnumber" type="integer" min="1" value="5" label="Min Cells" help="The minumum number of cells for gene expression to be counted" />\n- <expand macro="use_defaults_no" >\n- <param name="knn" type="integer" min="0" value="10" label="K-nearest-neighbours" help="Number of nearest neighbors used to infer corresponding cell types in different batches" />\n- <param name="CGenes" type="text" optional="true" label="CGenes" help="Filter out genes with correlated expression for cell type inference" >\n- <expand macro="sanitize_string_vector" />\n- </param>\n- <param name="FGenes" type="text" optional="true" label="FGenes" help="Explicitly filter out genes for cell type inference" >\n- <expand macro="sanitize_string_vector" />\n- </param>\n- <param name="LBatch_regexes" type="text" optional="true" label="Batch Regex" help="List of regexes to capture experimental batches for batch effect correction" >\n- <expand macro="sanitize_string_vector" />\n- </param>\n- <param name="ccor" type="float" value="0.4" label="CCor" help="Correlation coefficient used as a threshold for determining correlated genes" />\n- <param name="bmode" type="select" label="Batch Mode" help="Method to regress out batch effects" >\n- <option value="RaceID" selected="true" >RaceID</option>\n- <option value="scran">SCRAN</option>\n- </param>\n- <conditional name="ccc" >\n- <param name="use" type="select" label="Perform Cell-cycle correction?" >\n- <option value="yes" >Yes</option>\n- <option value="no" selected="true" >No</option>\n- </param>\n- <when value="no" />\n- <when value="yes" >\n- <param name="vset" type="text" optional="true" label="List of Gene Sets" >\n- <expand macro="sanitize_string_vector" />\n- </param>\n- <param name="pvalue" type="float" value="0.01" min="0" max="1" label="P-value Cutoff" help="P-value cutoff for determining enriched components" />\n- <param name="quant" type="float" value="0.01" min="0" max="1" label="Quantification Fraction" help="Upper and lower fraction of gene loadings use for determining enriched components" />\n- <param name="ncomp" type="integer" min="0" optional="true" label="Number of components to use" help="If left blank, the maximum number of components are used" /><!-- 0 = NULL -->\n- <param name="dimr" type="boolean" value="true" label="Derive Components from saturation criterion" />\n- <param name="mode" type="select" label="Type of Component Analysis" help="If ICA is selected, ensure that the number of components value above is sufficiently high" >\n- <option value="pca" selected="true">PCA</option>\n- <option value="ica">ICA</option>\n- </param>\n- <param name="logscale" type="boolean" value="false" label="Log-transform data prior to PCA or ICA" help="" />\n'..b'-filt.use.ccorrect = FALSE\n-filt.lbatch.regexes = NULL\n-\n-filt.geqone = as.logical( \'$filt.hist_geq_one\' )\n-filt\\$mintotal = as.integer( \'$filt.mintotal\' )\n-filt\\$minexpr = as.integer( \'$filt.minexpr\' )\n-filt\\$minnumber = as.integer( \'$filt.minnumber\' )\n-#if str($filt.use.def) == "no":\n-filt\\$knn = as.integer( \'$filt.use.knn\' )\n-filt\\$ccor = as.numeric( \'$filt.use.ccor\' )\n-filt\\$bmode = as.character( \'$filt.use.bmode\' )\n- #if $filt.use.LBatch_regexes:\n-filt.lbatch.regexes = string2textvector( \'$filt.use.LBatch_regexes\' )\n- #end if\n- #if $filt.use.CGenes:\n-filt\\$CGenes = string2textvector( \'$filt.use.CGenes\' )\n- #end if\n- #if $filt.use.FGenes:\n-filt\\$FGenes = string2textvector( \'$filt.use.FGenes\' )\n- #end if\n- #if str($filt.use.ccc.use) == "yes"\n-filt.use.ccorrect = TRUE\n- #if $filt.use.ccc.vset:\n-filt.ccc\\$vset = string2textvector( \'$filt.use.ccc.vset\' )\n- #end if\n- #if $filt.use.ccc.ncomp:\n-filt.ccc\\$nComp = as.integer( \'$filt.use.ccc.ncomp\' )\n- #end if\n-filt.ccc\\$pvalue = as.numeric( \'$filt.use.ccc.pvalue\' )\n-filt.ccc\\$quant = as.numeric( \'$filt.use.ccc.quant\' )\n-filt.ccc\\$dimR = as.logical( \'$filt.use.ccc.dimr\' )\n-filt.ccc\\$mode = as.character( \'$filt.use.ccc.mode.value\' )\n-filt.ccc\\$logscale = as.logical( \'$filt.use.ccc.logscale\' )\n- #end if\n-#end if\n-\n-out.pdf = \'${outpdf}\'\n-out.rdat = \'${outrdat}\'\n-\n-]]></token>\n- <token name="@CLUSTER_CHEETAH@"><![CDATA[\n-\n-in.rdat = readRDS(\'${inputrds}\')\n-\n-sc = in.rdat\n-\n-## Perform do.filter\n-use.filtnormconf = FALSE\n-\n-## Perform do.cluster, do.outlier, do.clustmap, mkgenelist\n-use.cluster = TRUE\n-\n-\n-clust.compdist = formals(compdist)\n-clust.clustexp = formals(clustexp)\n-clust.compdist\\$metric = as.character( \'$clust.metric\' )\n-clust.clustexp\\$FUNcluster = as.character( \'$clust.funcluster\' )\n-\n-#if str($clust.use.def) == "no":\n-\n-clust.compdist\\$FSelect = as.logical( \'$clust.use.fselect\' )\n- #if $clust.use.knn:\n-clust.compdist\\$knn = as.integer( \'$clust.use.knn\' )\n- #end if\n-clust.clustexp\\$sat = as.logical( \'$clust.use.sat\' )\n- #if $clust.use.samp:\n-clust.clustexp\\$samp = as.integer( \'$clust.use.samp\' )\n- #end if\n- #if $clust.use.cln:\n-clust.clustexp\\$cln = as.integer( \'$clust.use.cln\' )\n-clust.clustexp\\$clustnr = as.integer( \'$clust.use.clustnr\' )\n-clust.clustexp\\$bootnr = as.integer( \'$clust.use.bootnr\' )\n-##clust.clustexp\\$rseed = as.integer( \'$clust.use.rseed\' )\n- #end if\n-#end if\n-\n-outlier.use.randomforest = FALSE\n-outlier.findoutliers = formals(findoutliers)\n-outlier.clustheatmap = formals(clustheatmap)\n-outlier.rfcorrect = formals(rfcorrect)\n-\n-outlier.findoutliers\\$outminc = as.integer( \'$outlier.outminc\' )\n-outlier.findoutliers\\$outlg = as.integer( \'$outlier.outlg\' )\n-outlier.rfcorrect\\$final = as.logical( \'$outlier.final\' )\n-\n-#if str($outlier.use.def) == "no":\n- #if $outlier.use.nbtree:\n-outlier.rfcorrect\\$nbtree = as.integer( \'$outlier.use.nbtree\' )\n- #end if\n-outlier.findoutliers\\$probthr = as.numeric( \'$outlier.use.probthr\' )\n-outlier.findoutliers\\$outdistquant = as.numeric( \'$outlier.use.outdistquant\' )\n-##outlier.rfcorrect\\$rfseed = as.integer( \'$outlier.use.rfseed\' )\n-outlier.rfcorrect\\$nbfactor = as.integer( \'$outlier.use.nbfactor\' )\n-#end if\n-\n-cluster.comptsne = formals(comptsne)\n-cluster.compfr = formals(compfr)\n-\n-cluster.comptsne\\$perplexity = as.integer( \'$tsne.perplexity\' )\n-cluster.compfr\\$knn = as.integer( \'$tsne.knn\' )\n-#if str($tsne.use.def) == "no":\n-cluster.comptsne\\$initial_cmd = as.logical( \'$tsne.use.initial_cmd\' )\n-cluster.comptsne\\$rseed = as.integer( \'$tsne.use.rseed_tsne\' )\n-cluster.compfr\\$rseed = as.integer( \'$tsne.use.rseed_fr\' )\n-#end if\n-\n-genelist.tablelim = as.integer( \'$extra.tablelim\' )\n-genelist.plotlim = as.integer( \'$extra.plotlim\' )\n-genelist.foldchange = as.integer( \'$extra.foldchange\' )\n-genelist.pvalue = as.numeric( \'$extra.pvalue\' )\n-\n-out.pdf = \'${outpdf}\'\n-out.rdat = \'${outrdat}\'\n-out.genelist = \'${outgenelist}\'\n-\n-]]>\n- </token>\n-</macros>\n' |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 macros_inspectclusters.xml --- a/macros_inspectclusters.xml Mon Apr 15 17:54:40 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
b'@@ -1,326 +0,0 @@\n-<macros>\n- <macro name="inspectclusters_inputs" >\n- <param name="inputrds" type="data" format="rdata" label="Input RaceID RDS" help="Requires the RDS output from the cluster analysis" />\n- <conditional name="plotgen">\n- <param name="do_opt" type="select" label="Plot All Clusters?" help="Generates tSNE and F-R plots" >\n- <option value="yes" selected="true" >Yes</option>\n- <option value="no" >No</option>\n- </param>\n- <when value="no" />\n- <when value="yes" />\n- </conditional>\n- <conditional name="plotsym" >\n- <param name="do_opt" type="select" label="Perform Subset Analysis?" >\n- <expand macro="yesno_checkedno" />\n- </param>\n- <when value="no" />\n- <when value="yes">\n- <param name="types_regex" type="text" optional="true" label="Types Regex (removal)" help="Regular expression to be used to remove portions of the cell names, in order to indicate cell type. e.g. if your cells are labelled as \'cdk5_1, cdk5_2, glow_1, glow_2\', then a regex of \'_\\\\d$\' would trim off the ends and set the cell types to \'cdk5, cdk5, glow, glow\'. " >\n- <expand macro="sanitize_regex" />\n- </param>\n- <expand macro="use_defaults_no" >\n- <param name="subset_regex" type="text" optional="true" label="Subset of Types: Regex (select)" help="Regular expression to be used to select for cell types of interest. e.g. if we are only interested in \'cdk5\' positive cells, then we would simply put \'cdk5\' here. ">\n- <expand macro="sanitize_regex" />\n- </param>\n- <param name="fr" type="boolean" checked="false" label="Output FR map instead of tSNE" help="Performs a Fruchterman-Rheingold projection instead of tSNE" />\n- </expand>\n- </when>\n- </conditional>\n- <conditional name="gois" >\n- <param name="do_opt" type="select" label="Examine Genes of Interest" >\n- <expand macro="yesno_checkedno" />\n- </param>\n- <when value="no" />\n- <when value="yes">\n- <param name="inspect_goi_genes" type="text" value="" label="Genes to Examine" >\n- <expand macro="sanitize_string_vector" />\n- </param>\n- <param name="inspect_goi_cells" type="text" optional="true" label="Cells to Examine" help="Leave blank to examine all" ><!-- "":NULL -->\n- <expand macro="sanitize_string_vector" />\n- </param>\n- <expand macro="use_defaults_no" >\n- <!-- Yes, examine genes of interest, but no do not use defaults... -->\n- <param name="inspect_goi_imputed" type="boolean" checked="false" label="Impute Genes" help="Only works if k-nearest neighbours was used in the clustering" />\n- <param name="plotexp_n" type="text" optional="true" label="Title of plot" help="If blank, the list of genes are used" >\n- <expand macro="sanitize_title" />\n- </param>\n- <param name="plotmarkg_cthr" type="integer" min="0" value="0" label="Cluster Threshold" help="Include only clusters with cells greater than this" />\n- <param name="plotmarkg_cl" type="text" optional="true" label="Cluster List" help="List of cluster numbers to include. Leave blank to include all" >\n- <expand macro="sanitize_numeric_vector" />\n- </param><!-- "":NULL -->\n- <param name="plotmarkg_order_cells" type="boolean" checked="false" label="Order Cells" help="Order heatmap by cell names, not by cluster" />\n- <param name="plotmarkg_aggr" type="boolean" checked="false" label="Average Expression" help="Show only average expression for ea'..b'rform.plotting = TRUE\n-#end if\n-\n-#if str($plotsym.do_opt) == "yes":\n-perform.symbolmap = TRUE\n-plotsym = formals(plotsymbolsmap)\n-plotsym.use.typeremoveregex = NULL\n-plotsym.use.typeremoveregex.subselect = NULL\n-plotsym.use.typeremoveregex = as.character( \'$plotsym.types_regex\' )\n- #if str($plotsym.use.def) == "no":\n-plotsym\\$fr = as.logical( \'$plotsym.use.fr\' )\n- #if $plotsym.use.subset_regex:\n-plotsym.use.typeremoveregex.subselect = as.character( \'$plotsym.use.subset_regex\' )\n- #end if\n- #end if\n-#end if\n-\n-#if str($gois.do_opt) == "yes":\n-perform.genesofinterest = TRUE\n-plotexp = formals(plotexpmap)\n-plotmarkg = formals(plotmarkergenes)\n-\n-inspect.goi.use.genes = string2textvector( \'$gois.inspect_goi_genes\' )\n-plotexp\\$g = inspect.goi.use.genes\n-plotmarkg\\$genes = inspect.goi.use.genes\n-\n- #if $gois.inspect_goi_cells:\n-inspect.goi.use.cells = as.character( \'$gois.inspect_goi_cells\' )\n-plotexp\\$cells = inspect.goi.use.cells\n-plotmarkg\\$cells = inspect.goi.use.cells\n- #end if\n- #if str($gois.use.def) == "no":\n-inspect.goi.use.imputed = as.logical( \'$gois.use.inspect_goi_imputed\' )\n-plotexp\\$imputed = inspect.goi.use.imputed\n-plotmarkg\\$imputed = inspect.goi.use.imputed\n- #if $gois.use.plotmarkg_cl\n-plotmarkg\\$cl = string2numericvector( \'$gois.use.plotmarkg_cl\' )\n- #end if\n- #if $gois.use.plotmarkg_cap\n-plotmarkg\\$cap = as.integer( \'$gois.use.plotmarkg_cap\' )\n- #end if\n- #if $gois.use.plotmarkg_flo\n-plotmarkg\\$flo = as.integer( \'$gois.use.plotmarkg_flo\' )\n- #end if\n- #if $gois.use.plotmarkg_samples\n-plotmarkg\\$samples = as.character( \'$gois.use.plotmarkg_samples\' )\n- #end if\n- #if $gois.use.plotexp_n\n-plotexp\\$n = as.character( \'$gois.use.plotexp_n\' )\n- #end if\n-plotmarkg\\$cthr = as.integer( \'$gois.use.plotmarkg_cthr\' )\n-plotmarkg\\$order.cells = as.logical( \'$gois.use.plotmarkg_order_cells\' )\n-plotmarkg\\$aggr = as.logical( \'$gois.use.plotmarkg_aggr\' )\n-plotmarkg\\$norm = as.logical( \'$gois.use.plotmarkg_norm\' )\n-plotmarkg\\$cluster_cols = as.logical( \'$gois.use.plotmarkg_cluster_cols\' )\n-plotmarkg\\$cluster_rows = as.logical( \'$gois.use.plotmarkg_cluster_rows\' )\n-plotmarkg\\$cluster_set = as.logical( \'$gois.use.plotmarkg_cluster_set\' )\n- #end if\n-#end if\n-\n-#if str($diffgtest.do_opt) == "yes":\n-plotdiffg = formals(plotdiffgenesnb)\n-\n-perform.diffgene = TRUE\n-plotdiffg\\$Aname = \'$diffgtest.set_a.name_set\'\n-plotdiffg\\$Bname = \'$diffgtest.set_b.name_set\'\n-\n-gfdat.A.use = list()\n-gfdat.B.use = list()\n-\n-gfdat.A.use\\$manual = NULL\n-gfdat.A.use\\$regex = NULL\n-gfdat.A.use\\$cln = NULL\n-gfdat.B.use\\$manual = NULL\n-gfdat.B.use\\$regex = NULL\n-gfdat.B.use\\$cln = NULL\n-\n- #if str($diffgtest.set_a.meth.type) == "cln":\n-gfdat.A.use\\$cln = c( \'$diffgtest.set_a.meth.selector\' )\n- #else if str($diffgtest.set_a.meth.type) == "regex":\n-gfdat.A.use\\$regex = as.character( \'$diffgtest.set_a.meth.selector\' )\n- #else if str($diffgtest.set_a.meth.type) == "manual":\n-gfdat.A.use\\$manual = string2textvector( \'$diffgtest.set_a.meth.selector\' )\n- #end if\n-\n- #if str($diffgtest.set_b.meth.type) == "cln":\n-gfdat.B.use\\$cln = c( \'$diffgtest.set_b.meth.selector\' )\n- #else if str($diffgtest.set_b.meth.type) == "regex":\n-gfdat.B.use\\$regex = as.character( \'$diffgtest.set_b.meth.selector\' )\n- #else if str($diffgtest.set_b.meth.type) == "manual":\n-gfdat.B.use\\$manual = string2textvector( \'$diffgtest.set_b.meth.selector\' )\n- #end if\n-\n- #if str($diffgtest.use.def) == "no":\n-plotdiffg\\$pthr = as.numeric( \'$diffgtest.use.plotdiffg_pthr\' )\n-plotdiffg\\$padj = as.logical( \'$diffgtest.use.plotdiffg_padj\' )\n-plotdiffg\\$lthr = as.integer( \'$diffgtest.use.plotdiffg_lthr\' )\n-plotdiffg\\$show_names = as.logical( \'$diffgtest.use.plotdiffg_show_names\' )\n- #if $diffgtest.use.plotdiffg_mthr\n-plotdiffg\\$mthr = as.numeric( \'$diffgtest.use.plotdiffg_mthr\' )\n- #end if\n- #end if\n-#end if\n-\n-out.pdf=\'${outpdf}\'\n- ]]>\n- </token>\n-</macros>\n' |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 macros_inspecttrajectories.xml --- a/macros_inspecttrajectories.xml Mon Apr 15 17:54:40 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
b'@@ -1,243 +0,0 @@\n-<macros>\n- <macro name="inspecttrajectories_inputs" >\n- <param name="inputrds" type="data" format="rdata" label="Input RDS" help="Requires the RDS output from the trajectory analysis" />\n- <section name="trjsid" title="StemID Branch Link Examine" expanded="true" help="StemID derives cell lineage trees and predicts multipotent cell identities">\n- <conditional name="basic" >\n- <param name="doit" type="select" label="Perform StemID?" >\n- <expand macro="yesno_checkedno" />\n- </param>\n- <when value="no" />\n- <when value="yes" >\n- <param name="i" type="integer" min="1" value="1" label="Cluster Number" />\n- <param name="br" type="text" label="Trajectory Path i, j, k" help="A path of three clusters starting at i, passing through j, and ending at k." >\n- <expand macro="sanitize_numeric_vector" />\n- </param>\n- <expand macro="use_defaults_no">\n- <param name="zscore" type="boolean" checked="false" label="Plot Z-score Transformed Projections" />\n- <param name="ndiffgenes" type="integer" min="1" value="10" label="Number of DE Genes" help="Number of differentially expressed genes to output per cluster" />\n- </expand>\n- </when>\n- </conditional>\n- </section>\n- <section name="trjfid" title="FateID Branch Link Examine" expanded="true" help="FateID infers cell fate bias in multipotent progenitor cells" >\n- <conditional name="basic" >\n- <param name="doit" type="select" label="Perform FateID?" >\n- <expand macro="yesno_checkedno" />\n- </param>\n- <when value="no" />\n- <when value="yes" >\n- <param name="cellsfromz" type="text" value="" label="Cells from Clusters" help="Vector of valid cluster numbers ordered along the trajectory" >\n- <expand macro="sanitize_numeric_vector" />\n- </param>\n- <expand macro="use_defaults_no">\n- <param name="filterset_minexpr" type="integer" min="0" value="2" label="Min Expression" help="Minimum expression required for at least minnumber cells" />\n- <param name="filterset_minnumber" type="integer" min="0" value="1" label="Min Number of Cells" help="Minimum number of cells in which a gene needs to be expressed at least a level of minexpr."/>\n- <param name="getsom_nb" type="integer" min="1" value="1000" label="SOM Nodes" help="Number of nodes of the self-organizing map." />\n- <param name="getsom_alpha" type="float" min="0" value="0.5" label="Smoothing parameter" help="Pseudo-temporal expression profiles are derived by a local regression of expression values across the ordered cells using the function \'loess\' from the package \'stats\'. This is the parameter, which controls the degree of smoothing. Larger values return smoother profiles." />\n- <param name="procsom_corthr" type="float" min="0" max="1" value="0.85" label="Correlation threshold" help="The z-score of the average normalized pseudo-temporal expression profiles within each node of the self-organizing map is computed, and the correlation of these z-scores between neighbouring nodes is computed. If the correlation is greater than \'corthr\', neighbouring nodes are merged" />\n- <param name="procsom_minsom" type="integer" min="0" value="3" label="Min SOM" help="Nodes of the self-organizing map with less than this number of transcripts are discarded" />\n- <param name="plotheat_xgrid" type="boolean" checked="false" label="Partitioning along the x-axis" />\n- <param name="plotheat_ygrid" type="boolean" chec'..b' <param name="doit" value="yes" />\n- <param name="cellsfromz" value="3,9,2" />\n- <expand macro="test_nondef" >\n- <param name="filterset_minexpr" value="1" />\n- <param name="filterset_minnumber" value="2" />\n- <param name="procsom_minsom" value="5" />\n- <param name="procsom_corthr" value="0.5" />\n- <param name="plotheat_ygrid" value="true" />\n- </expand>\n- <conditional name="som" >\n- <param name="doit" value="yes" />\n- <conditional name="use_genes" >\n- <param name="typer" value="genelist" />\n- <param name="use_genes" value="Clca4,Mki67,Defa24,Ybx1,Vasp,Apoa1" />\n- <expand macro="test_nondef" >\n- <param name="cluster" value="true" />\n- <param name="alpha" value="0.1" />\n- </expand>\n- </conditional>\n- </conditional>\n- </conditional>\n- </section>\n- <output name="outdiffgenes" value="out_traject_inspect_allthree.tabular" />\n- <output name="outpdf" value="out_traject_inspect_allthree.pdf" compare="sim_size" delta="15" />\n- </test>\n- </macro>\n- <token name="@INSPECTTRAJECTORIES_CHEETAH@"><![CDATA[\n-in.rdat = readRDS(\'${inputrds}\')\n-\n-perform.stemID = FALSE\n-perform.fateID = FALSE\n-perform.fateID.sominspect = FALSE\n-\n-#if str($trjsid.basic.doit) == "yes"\n-perform.stemID = TRUE\n-trjsid.getproj = formals(getproj)\n-\n-trjsid.numdiffgenes = 10\n-trjsid.getproj\\$i = as.integer( \'$trjsid.basic.i\' )\n-trjsid.branchcells.ijk = string2numericvector( \'$trjsid.basic.br\' )\n-\n- #if str($trjsid.basic.use.def) == "no":\n-\n-trjsid.getproj\\$zscore = as.logical( \'$trjsid.basic.use.zscore\' )\n-trjsid.numdiffgenes = as.integer( \'$trjsid.basic.use.ndiffgenes\' )\n-\n- #end if\n-#end if\n-\n-#if str($trjfid.basic.doit) == "yes":\n-perform.fateID = TRUE\n-trjfid.cellsfrom = formals(cellsfromtree)\n-trjfid.filterset = formals(filterset)\n-trjfid.getsom = formals(getsom)\n-trjfid.procsom = formals(procsom)\n-trjfid.plotheat = list()\n-\n-trjfid.cellsfrom\\$z = string2numericvector( \'$trjfid.basic.cellsfromz\' )\n- #if str($trjfid.basic.use.def) == "no":\n-\n-trjfid.filterset\\$minexpr = as.integer( \'$trjfid.basic.use.filterset_minexpr\' )\n-trjfid.filterset\\$minnumber = as.integer( \'$trjfid.basic.use.filterset_minnumber\' )\n-trjfid.getsom\\$nb = as.numeric( \'$trjfid.basic.use.getsom_nb\' )\n-trjfid.getsom\\$alpha = as.numeric( \'$trjfid.basic.use.getsom_alpha\' )\n-trjfid.procsom\\$corthr = as.numeric( \'$trjfid.basic.use.procsom_corthr\' )\n-trjfid.procsom\\$minsom = as.integer( \'$trjfid.basic.use.procsom_minsom\' )\n-trjfid.plotheat\\$xgrid = as.logical( \'$trjfid.basic.use.plotheat_xgrid\' )\n-trjfid.plotheat\\$ygrid = as.logical( \'$trjfid.basic.use.plotheat_ygrid\' )\n-trjfid.plotheat\\$xlab = as.logical( \'$trjfid.basic.use.plotheat_xlab\' )\n- #end if\n-\n- #if str($trjfid.basic.som.doit) == "yes":\n-perform.fateID.sominspect = TRUE\n-\n-trjfidsomi = list()\n- #if str($trjfid.basic.som.use_genes.typer) == "genelist":\n-trjfidsomi.use.genes = string2textvector( \'$trjfid.basic.som.use_genes.use_genes\' )\n- #else if str($trjfid.basic.som.use_genes.typer) == "cln":\n-trjfidsomi.use.genes = as.integer( \'$trjfid.basic.som.use_genes.use_genes\' )\n- #end if\n-\n-trjfidsomi.use.types = \'$trjfid.basic.som.use_types\'\n-trjfidsomi\\$name = \'$trjfid.basic.som.title\'\n-\n- #if str($trjfid.basic.som.use.def) == "no":\n-trjfidsomi\\$cluster = as.logical( \'$trjfid.basic.som.use.cluster\' )\n-trjfidsomi\\$alpha = as.numeric( \'$trjfid.basic.som.use.alpha\' )\n- #end if\n- #end if\n-#end if\n-\n-out.pdf = \'${outpdf}\'\n-out.diffgenes = \'${outdiffgenes}\'\n-\n-]]>\n- </token>\n-</macros>\n' |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 macros_trajectory.xml --- a/macros_trajectory.xml Mon Apr 15 17:54:40 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
b'@@ -1,156 +0,0 @@\n-<macros>\n- <macro name="trajectory_inputs" >\n- <param name="inputrds" type="data" format="rdata" label="Input RDS" help="This is the output RData file given by the Cluster stage" />\n- <section name="projcell" title="Compute transcriptome entropy of each cell" expanded="true" >\n- <param name="knn" type="integer" min="0" value="3" label="KNN" help="Number of nearest neighbours to consider." />\n- <param name="cthr" type="integer" min="0" value="5" label="Cluster Threshold" help="Clusters to be included in the StemID analysis must have more than this number of cells" />\n- <expand macro="use_defaults_no" >\n- <param name="nmode" type="boolean" checked="true" label="Neighbour Mode" help="Assign a cell of a given cluster to the cluster with the smallest average distance of the knn nearest neighbours within this cluster." />\n- <param name="fr" type="boolean" checked="false" label="F-R layout?" help="Use Fruchterman-Rheigold layout instead of t-SNE" />\n- </expand>\n- </section>\n- <section name="projback" title="Compute Cell Projections for Randomized Background Distribution" expanded="true" >\n- <param name="pdishuf" type="integer" min="100" value="2000" label="Shuffle Projections" help="Number of randomizations of cell positions for which to compute projections of cells on inter-cluster links" />\n- <expand macro="use_defaults_no" >\n- <param name="fast" type="boolean" checked="false" label="Use a fast approximate background model to infer links" />\n- <param name="rseed" type="integer" value="17000" label="Random seed" />\n- </expand>\n- </section>\n- <section name="comppval" title="Computing P-values for Link Significance" expanded="true" >\n- <param name="pthr" type="float" value="0.01" label="P-value cutoff" help="Cutoff for link significance. This threshold is applied for the calculation of link scores reflecting how uniformly a link is occupied by cells." />\n- <param name="sensitive" type="boolean" checked="false" label="Sensitivity" help="All cells on the most highly significant link are and the link itself are disregard to test significance of the remaining links with a binomial p-value" />\n- </section>\n- <section name="plotgraph" title="StemID2 Lineage Graph" expanded="true" >\n- <param name="showcells" type="boolean" checked="false" label="Show Cells" help="Projections of cells are shown in the plot" />\n- <param name="scthr" type="float" min="0" max="1" value="0" label="Score Threshold" help="Score threshold for links to be shown in the graph" />\n- <expand macro="use_defaults_no">\n- <param name="showtsne" type="boolean" checked="true" label="Show tSNE" help="Show transparent t-SNE map of cells in the background" />\n- <param name="tp" type="float" min="0" max="1" value="0.5" label="Transparency" help="Level of transparency of t-SNE map" />\n- </expand>\n- </section>\n- <section name="compscore" title="Compute StemID2 score" expanded="true" >\n- <param name="nn" type="integer" min="0" value="1" label="Number of Neighbours" help="Number of higher order neighbours to be included for the determination of links" />\n- <param name="scthr" type="float" min="0" max="1" value="0" label="Score Threshold" help="Score threshold for links to be included in the calculation" />\n- </section>\n- </macro>\n- <macro name="trajectory_tests" >\n- <test>\n- <!-- All defaults -->\n- <param name="inputrds" value="out_cluster_default.rdat" />\n- <output name="outpdf" value="out_traject_default.pdf" compare="sim_size" delta="15" />\n- <output name="outrdat" value="out_traject_default.ltree.rdat" compare="sim_size" delta="15" />\n- </test>\n- <test>\n- '..b't" value="false" />\n- <param name="rseed" value="17000" />\n- </expand>\n- </section>\n- <section name="comppval" >\n- <param name="pthr" value="0.01" />\n- <param name="sensitive" value="false" />\n- </section>\n- <section name="plotgraph" >\n- <param name="showcells" value="false" />\n- <param name="scthr" value="0" />\n- <expand macro="test_nondef" >\n- <param name="showtsne" value="true" />\n- <param name="tp" value="0.5" />\n- </expand>\n- </section>\n- <section name="compscore" >\n- <param name="nn" value="1" />\n- <param name="scthr" value="0" />\n- </section>\n- <output name="outpdf" value="out_traject_default.pdf" compare="sim_size" delta="15" />\n- <output name="outrdat" value="out_traject_default.ltree.rdat" compare="sim_size" delta="15" />\n- </test>\n- <test>\n- <!-- Non-defaults -->\n- <param name="inputrds" value="out_cluster_default.rdat" />\n- <section name="projcell">\n- <param name="knn" value="4" />\n- <param name="cthr" value="4" />\n- <expand macro="test_nondef" >\n- <param name="nmode" value="false" />\n- <param name="fr" value="true" />\n- </expand>\n- </section>\n- <section name="projback">\n- <param name="pdishuf" value="1500" />\n- <expand macro="test_nondef" >\n- <param name="fast" value="true" />\n- <param name="rseed" value="1500" />\n- </expand>\n- </section>\n- <section name="comppval">\n- <param name="pthr" value="0.05" />\n- <param name="sensitive" value="true" />\n- </section>\n- <section name="plotgraph">\n- <param name="showcells" value="true" />\n- <param name="scthr" value="0.5" />\n- <expand macro="test_nondef" >\n- <param name="showtsne" value="false" />\n- <param name="tp" value="0.25" />\n- </expand>\n- </section>\n- <section name="compscore">\n- <param name="nn" value="2" />\n- <param name="scthr" value="0.5" />\n- </section>\n- <output name="outpdf" value="out_traject_adv_nondef.pdf" compare="sim_size" delta="15" />\n- </test>\n- </macro>\n- <token name="@TRAJECTORY_CHEETAH@"><![CDATA[\n-\n-in.rdat = readRDS(\'${inputrds}\')\n-\n-pstc.projc = formals(projcells)\n-pstc.projc\\$knn = as.integer( \'$projcell.knn\' )\n-pstc.projc\\$cthr = as.integer( \'$projcell.cthr\' )\n-#if str($projcell.use.def) == "no":\n-pstc.projc\\$nmode = as.logical( \'$projcell.use.nmode\' )\n-pstc.projc\\$fr = as.logical( \'$projcell.use.fr\' )\n-#end if\n-\n-pstc.projb = formals(projback)\n-pstc.projb\\$pdishuf = as.integer( \'$projback.pdishuf\' )\n-#if str($projback.use.def) == "no":\n-pstc.projb\\$fast = as.logical( \'$projback.use.fast\' )\n-pstc.projb\\$rseed = as.integer( \'$projback.use.rseed\' )\n-#end if\n-\n-pstc.comppval = formals(comppvalue)\n-pstc.comppval\\$pthr = as.numeric( \'$comppval.pthr\' )\n-pstc.comppval\\$sensitive = as.logical( \'$comppval.sensitive\' )\n-\n-pstc.plotgraph = formals(plotgraph)\n-pstc.plotgraph\\$showCells = as.logical( \'$plotgraph.showcells\' )\n-pstc.plotgraph\\$scthr = as.numeric( \'$plotgraph.scthr\' )\n-#if str($plotgraph.use.def) == "no":\n-pstc.plotgraph\\$showTsne = as.logical( \'$plotgraph.use.showtsne\' )\n-pstc.plotgraph\\$tp = as.numeric( \'$plotgraph.use.tp\' )\n-#end if\n-\n-pstc.compscore = formals(compscore)\n-pstc.compscore\\$nn = as.integer( \'$compscore.nn\' )\n-pstc.compscore\\$scthr = as.numeric( \'$compscore.scthr\' )\n-\n-out.pdf=\'${outpdf}\'\n-out.rdat=\'${outrdat}\'\n- ]]>\n- </token>\n-</macros>\n' |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 raceid_clustering.xml --- a/raceid_clustering.xml Mon Apr 15 17:54:40 2019 -0400 +++ b/raceid_clustering.xml Mon Aug 12 13:00:12 2019 -0400 |
[ |
@@ -1,27 +1,12 @@ -<tool id="raceid_clustering" name="Clustering using RaceID" version="@VERSION_RACEID@.@VERSION_PACKAGE@.1" > +<tool id="raceid_clustering" name="Clustering using RaceID" version="@VERSION_RACEID@.@VERSION_WRAPPER@" > <description>performs clustering, outlier detection, dimensional reduction</description> <macros> <import>macros.xml</import> - <import>macros_cluster.xml</import> + <import>macros_cheetah.xml</import> </macros> <expand macro="requirements" /> - <version_command><![CDATA[ -Rscript '$__tool_directory__/scripts/cluster.R' @GET_VERSION@ -]]></version_command> - - <command detect_errors="exit_code"><![CDATA[ -#set bin = 'cluster.R' -Rscript '$__tool_directory__/scripts/$bin' '$userconf' 2>&1 > '$outlog' - ]]></command> + <expand macro="version_command_config" prog="cluster.R" cheetah="CLUSTER_CHEETAH" out="&> '$outlog'" /> - <configfiles> - <configfile name="userconf" ><![CDATA[ -@STRING2VECTOR@ - -@CLUSTER_CHEETAH@ - -]]></configfile> - </configfiles> <inputs> <param name="inputrds" type="data" format="rdata" label="Input RaceID RDS" help="Requires the RDS output from the normalisation stage" /> <section name="clust" title="Clustering" expanded="true" > @@ -90,18 +75,23 @@ <outputs> <data name="outpdf" format="pdf" label="${tool.name} on ${on_string}: PDF Report" /> <data name="outrdat" format="rdata" label="${tool.name} on ${on_string}: RDS" /> + <data name="outassignments" format="tabular" label="${tool.name} on ${on_string}: Cell-to-Cluster assignments" /> <data name="outgenelist" format="tabular" label="${tool.name} on ${on_string}: Cluster - Genes per Cluster" /> <data name="outlog" format="txt" label="${tool.name} on ${on_string}: Log" > <filter>use_log</filter> </data> </outputs> - <tests> <test> <param name="inputrds" value="matrix.filter.rdat" /> <output name="outgenelist" value="matrix2.genelist" /> <output name="outrdat" value="matrix2.rdat" compare="sim_size" delta="15" /> <output name="outpdf" value="matrix2.pdf" compare="sim_size" delta="10" /> + <output name="outassignments" > + <assert_contents> + <has_line_matching expression="P1_B1_ATCCAC\s1\s1\sFALSE" /> + </assert_contents> + </output> </test> <test> <!-- defaults, but manually specified. No opts, no CC. Generates identical to above --> |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 scripts/cluster.R --- a/scripts/cluster.R Mon Apr 15 17:54:40 2019 -0400 +++ b/scripts/cluster.R Mon Aug 12 13:00:12 2019 -0400 |
b |
@@ -1,5 +1,5 @@ #!/usr/bin/env R -VERSION = "0.4" +VERSION = "0.5" args = commandArgs(trailingOnly = T) @@ -139,6 +139,19 @@ write.table(df, file=out.genelist, sep="\t", quote=F) } + +writecellassignments <- function(sc){ + dat <- sc@cluster$kpart + tab <- data.frame(row.names = NULL, + cells = names(dat), + cluster.initial = dat, + cluster.final = sc@cpart, + is.outlier = names(dat) %in% sc@out$out) + + write.table(tab, file=out.assignments, sep="\t", quote=F, row.names = F) +} + + pdf(out.pdf) if (use.filtnormconf){ @@ -148,6 +161,7 @@ message(paste(" :: ", sprintf("%.1f", 100 * nrow(getfdata(sc))/nrow(sc@expdata)), "% of genes remain,", sprintf("%.1f", 100 * ncol(getfdata(sc))/ncol(sc@expdata)), "% of cells remain")) + write.table(as.matrix(sc@ndata), file=out.table, col.names=NA, row.names=T, sep="\t", quote=F) } if (use.cluster){ @@ -161,6 +175,7 @@ sc <- do.clustmap(sc) mkgenelist(sc) + writecellassignments(sc) } dev.off() |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 scripts/clusterinspect.R --- a/scripts/clusterinspect.R Mon Apr 15 17:54:40 2019 -0400 +++ b/scripts/clusterinspect.R Mon Aug 12 13:00:12 2019 -0400 |
[ |
@@ -1,5 +1,5 @@ #!/usr/bin/env R -VERSION = "0.2" +VERSION = "0.5" args = commandArgs(trailingOnly = T) @@ -17,13 +17,30 @@ test$line = 3 do.plotting <- function(sc){ - print(plotmap(sc, final = FALSE, fr = FALSE)) + + sc.tmp <- sc + + ## If it's a subset, we need to get clever and subset specific parts + if (!(is.null(plotting.cln) || is.na(plotting.cln))){ + cellstokeep <- names(sc.tmp@cpart[sc.tmp@cpart %in% plotting.cln]) + + ## Subselect partitions for initial and final clusters + sc.tmp@cpart <- sc.tmp@cpart[cellstokeep] + sc.tmp@cluster$kpart <- sc.tmp@cluster$kpart[cellstokeep] + + ## Subselect tSNE and FR data + ## - Note: no names in tsne, so we assume it follows the ndata naming + sc.tmp@tsne <- sc.tmp@tsne[colnames(sc.tmp@ndata) %in% cellstokeep,] + sc.tmp@fr <- sc.tmp@fr[cellstokeep,] + } + + print(plotmap(sc.tmp, final = FALSE, fr = FALSE)) print(do.call(mtext, c("Initial Clustering tSNE", test))) - print(plotmap(sc, final = TRUE, fr = FALSE)) + print(plotmap(sc.tmp, final = TRUE, fr = FALSE)) print(do.call(mtext, c("Final Clustering tSNE", test))) - print(plotmap(sc, final = FALSE, fr = TRUE)) + print(plotmap(sc.tmp, final = FALSE, fr = TRUE)) print(do.call(mtext, c("Initial Clustering Fruchterman-Reingold", test))) - print(plotmap(sc, final = TRUE, fr = TRUE)) + print(plotmap(sc.tmp, final = TRUE, fr = TRUE)) print(do.call(mtext, c("Final Clustering Fruchterman-Reingold", test))) } |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 test-data/matrix.genelist --- a/test-data/matrix.genelist Mon Apr 15 17:54:40 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
b'@@ -1,201 +0,0 @@\n-n\tmean.ncl\tmean.cl\tfc\tpv\tpadj\n-ENSDARG00000108798\t1\t0.13225291542414\t22.6067842060994\t170.935998904815\t5.63439752001819e-20\t3.43529216795509e-16\n-ENSDARG00000109030\t1\t0.186711263967539\t34.6842724288799\t185.764220603798\t2.48233981248329e-19\t7.56741291835532e-16\n-ENSDARG00000108379\t1\t0.168199368419563\t24.3874482842581\t144.991319012715\t4.11994031997326e-19\t8.37309204362565e-16\n-ENSDARG00000107599\t1\t0.194980763882093\t20.9729826342942\t107.564367975175\t3.56470297051077e-18\t5.43349850280104e-15\n-ENSDARG00000107321\t1\t0.1\t1.94683879586459\t19.4683879586459\t1.39905888784068e-09\t1.70601240783292e-06\n-ENSDARG00000105564\t1\t0.1\t1.72137476189456\t17.2137476189456\t5.11677986670882e-09\t5.19950114122061e-06\n-ENSDARG00000090447\t1\t0.1\t1.4302236712519\t14.302236712519\t3.51620742912878e-08\t3.06261667077116e-05\n-ENSDARG00000079591\t1\t0.11578454541401\t1.47825950354764\t12.767330028907\t4.83701028926633e-08\t3.6864064667071e-05\n-ENSDARG00000107138\t1\t0.118643244515052\t1.63372529702772\t13.7700659123533\t8.59237265783686e-08\t5.36793599520202e-05\n-ENSDARG00000041060\t1\t0.11578454541401\t1.4382199783801\t12.421519411226\t8.84781911763433e-08\t5.36793599520202e-05\n-ENSDARG00000077004\t1\t0.1\t1.29299827494356\t12.9299827494356\t1.0364347799037e-07\t5.36793599520202e-05\n-ENSDARG00000100003\t1\t0.1\t1.29775216728225\t12.9775216728225\t1.05650700249999e-07\t5.36793599520202e-05\n-ENSDARG00000102310\t1\t0.129577145917004\t1.72085266498654\t13.2805260743185\t1.20446928962954e-07\t5.64896096836256e-05\n-ENSDARG00000068650\t1\t0.115601615820105\t1.27001296748153\t10.9861177845289\t2.26895176903151e-07\t9.88128495413223e-05\n-ENSDARG00000086678\t1\t0.128030253978187\t1.35647794130946\t10.5949796955067\t3.16910756640577e-07\t0.000122948041506908\n-ENSDARG00000105857\t1\t0.105900327795989\t1.37647789967886\t12.9978625026598\t3.22645344285801e-07\t0.000122948041506908\n-ENSDARG00000105159\t1\t0.1\t1.16700756453584\t11.6700756453584\t3.44329675018825e-07\t0.000123492825211163\n-ENSDARG00000102997\t1\t0.125930886410326\t1.40950930054417\t11.1927211879659\t3.75314178672153e-07\t0.00012712725263134\n-ENSDARG00000052615\t1\t0.109701288024116\t1.2495211865536\t11.3902143635625\t4.65728278602572e-07\t0.000149449753402099\n-ENSDARG00000103046\t1\t0.111800655591977\t1.27916812008568\t11.441508221151\t5.24275745356588e-07\t0.000158237500570989\n-ENSDARG00000105009\t1\t0.107892272707005\t1.29390774186871\t11.9925895470056\t5.45020093815115e-07\t0.000158237500570989\n-ENSDARG00000069937\t1\t0.1\t1.08683574177416\t10.8683574177416\t5.98190849813324e-07\t0.000165780436877811\n-ENSDARG00000034941\t1\t0.1\t1.14009483992511\t11.4009483992511\t7.60152472832673e-07\t0.000201506505515687\n-ENSDARG00000099753\t1\t0.121501943616094\t1.29493126702895\t10.6577000210014\t1.17807930734258e-06\t0.000299281230702821\n-ENSDARG00000076005\t1\t0.1\t1.05371686166029\t10.5371686166029\t1.32743044013891e-06\t0.00029931174491888\n-ENSDARG00000041750\t2\t0.118845246250015\t4.25427279350112\t35.7967434772393\t1.39550360463363e-07\t0.000850838547745124\n-ENSDARG00000103735\t2\t0.119337350478008\t3.54379562135099\t29.6956117020886\t9.49083511390771e-07\t0.00228722429441009\n-ENSDARG00000101886\t2\t0.215092571957637\t5.30165157388469\t24.6482318084367\t1.12541789129576e-06\t0.00228722429441009\n-ENSDARG00000090914\t2\t0.122178374276303\t3.1027845112115\t25.3955295246819\t1.65948635889896e-06\t0.00252947208255174\n-ENSDARG00000090496\t2\t0.111721506487875\t2.96053053983273\t26.4991999562235\t2.19562316256802e-06\t0.00267734288443544\n-ENSDARG00000078308\t2\t0.1\t2.64934229048601\t26.4934229048601\t2.65009460603265e-06\t0.00269293780216352\n-ENSDARG00000075253\t2\t0.121220276605515\t2.61038833734525\t21.534254915456\t7.21609407341446e-06\t0.00624434487572006\n-ENSDARG00000086877\t2\t0.174901657246515\t3.44134351834849\t19.6758771330457\t8.19333426369698e-06\t0.00624434487572006\n-ENSDARG00000040487\t2\t0.132551316615554\t2.19579056306671\t16.5655884764638\t5.8552609335758e-05\t0.0389789127774957\n-ENSDARG00000052912\t2\t0.29374667394921\t3.98299817184644\t13.5592962408661\t6.97030598265265e-05\t0.0389789127774957\n-ENSDARG00000052558\t2\t0.307266492503596\t4.25427279350112\t13'..b'.01967640768832e-06\t0.000724351003392688\n-ENSDARG00000059558\t7\t0.112699471961133\t0.967793901919788\t8.58738630340302\t3.00038333622434e-06\t0.000888688802910736\n-ENSDARG00000060566\t7\t0.127846770606366\t1.01035836252462\t7.90288528785342\t3.78083155119976e-06\t0.000992894397782283\n-ENSDARG00000100206\t7\t0.139832328948304\t1.04998427596811\t7.5088806992286\t4.54325865418129e-06\t0.000992894397782283\n-ENSDARG00000057206\t7\t0.121885624201679\t0.88338782626096\t7.24767856789453\t4.55979057534917e-06\t0.000992894397782283\n-ENSDARG00000070623\t7\t0.12670584582223\t0.943766658477006\t7.44848552450473\t5.87432370429556e-06\t0.00110819712277626\n-ENSDARG00000100514\t7\t0.121454028840368\t0.820406006163069\t6.75486860334098\t7.45177975757828e-06\t0.00116897636495374\n-ENSDARG00000039265\t7\t0.131635113592875\t0.87126351316452\t6.6187773868543\t9.18440046329954e-06\t0.00133326880058898\n-ENSDARG00000095904\t7\t0.168129332968718\t1.08581712830248\t6.45822539785194\t1.03525068635208e-05\t0.00139894259529663\n-ENSDARG00000039350\t7\t0.133011711683714\t0.897490439418404\t6.74745425088979\t1.06942592337219e-05\t0.00139894259529663\n-ENSDARG00000070512\t7\t0.12670239660567\t0.910072943888678\t7.18276029711621\t1.10515908767776e-05\t0.00139894259529663\n-ENSDARG00000103551\t8\t1.61835767565622\t32.2654393890171\t19.93714978732\t1.97522608849965e-06\t0.0120429534615824\n-ENSDARG00000078383\t8\t0.182610070366458\t2.60621132144157\t14.2720021749703\t1.6366673021414e-05\t0.0447464228757837\n-ENSDARG00000093799\t8\t0.115321017732354\t1.62941087246693\t14.1293487042283\t2.20172656433248e-05\t0.0447464228757837\n-ENSDARG00000036625\t8\t0.119337255991682\t1.48171990557204\t12.4162391137543\t8.39663841121717e-05\t0.127985760982978\n-ENSDARG00000016706\t8\t0.180025642511508\t1.82486224560436\t10.1366795315712\t0.000126325160000158\t0.154040900104192\n-ENSDARG00000040251\t8\t0.121540951107174\t1.29918699186992\t10.6892942669529\t0.000198034398721646\t0.201235954834313\n-ENSDARG00000098674\t8\t0.253812764860557\t2.21906493621457\t8.74292093793513\t0.000293366486612692\t0.255522209839655\n-ENSDARG00000098856\t8\t0.194513509828675\t1.64663383642527\t8.46539573459756\t0.000451769293400039\t0.296721325111977\n-ENSDARG00000062226\t8\t0.144813536626749\t1.38335068305012\t9.55263378875725\t0.000474939776632199\t0.296721325111977\n-ENSDARG00000075123\t8\t0.142439266402834\t1.40532056857682\t9.86610366696508\t0.00048666774661633\t0.296721325111977\n-ENSDARG00000070239\t8\t0.154515334275144\t1.27289156626506\t8.23796273836765\t0.000570475520527726\t0.316199022605232\n-ENSDARG00000026180\t8\t0.151758427938041\t1.41564289946672\t9.32826544595394\t0.000683459166751383\t0.347254211640265\n-ENSDARG00000104786\t8\t0.182483274181232\t1.61787042996763\t8.8658559927024\t0.00078762411588287\t0.369395710349066\n-ENSDARG00000101061\t8\t0.255483815147335\t1.62613690189592\t6.36493118344166\t0.00150635451453941\t0.61883047685698\n-ENSDARG00000016584\t8\t0.135272462199637\t0.880366460381022\t6.50809814551733\t0.00158197684628705\t0.61883047685698\n-ENSDARG00000070256\t8\t0.203213690445973\t1.26976802854965\t6.24843742448165\t0.00178015471505539\t0.61883047685698\n-ENSDARG00000062745\t8\t0.130428963634169\t0.955091918456498\t7.32269805604966\t0.00182445112094621\t0.61883047685698\n-ENSDARG00000086037\t8\t0.19632007891506\t1.29918699186992\t6.61769799120764\t0.00182695564760138\t0.61883047685698\n-ENSDARG00000027310\t8\t0.193675103177481\t1.44901164174846\t7.48166190685131\t0.00211840042255122\t0.678671506770642\n-ENSDARG00000103109\t8\t0.14293938597264\t0.936026560054929\t6.54841598545899\t0.00240745117064372\t0.678671506770642\n-ENSDARG00000078352\t8\t0.177346649454539\t1.15788746142844\t6.52895030715114\t0.0024876207141355\t0.678671506770642\n-ENSDARG00000035389\t8\t0.143574445102194\t1.00421593036345\t6.99439186164828\t0.0026995869399452\t0.678671506770642\n-ENSDARG00000103106\t8\t0.175526172559138\t1.23041862190788\t7.00988692437495\t0.0027017171947583\t0.678671506770642\n-ENSDARG00000007257\t8\t0.157933075856061\t0.866671316548008\t5.48758587680447\t0.0028384639169755\t0.678671506770642\n-ENSDARG00000010596\t8\t0.110516369140454\t0.836156159426777\t7.56590327686312\t0.00297745919336174\t0.678671506770642\n' |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 test-data/matrix.pdf |
b |
Binary file test-data/matrix.pdf has changed |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 test-data/matrix.rdat |
b |
Binary file test-data/matrix.rdat has changed |
b |
diff -r d4646ce659b4 -r ee0bbc160cb1 test-data/out_diffgene_multiple.pdf |
b |
Binary file test-data/out_diffgene_multiple.pdf has changed |