view macros_trajectory.xml @ 1:7967b3d036d1 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/raceid3 commit 71e6b205841c83391ea8fc69e10eac03f212f4d6
author iuc
date Thu, 28 Feb 2019 12:58:58 -0500
parents e0e9b24d76aa
children
line wrap: on
line source

<macros>
    <macro name="trajectory_inputs" >
        <param name="inputrds" type="data" format="rdata" label="Input RDS" help="This is the output RData file given by the Cluster stage" />
        <section name="projcell" title="Compute transcriptome entropy of each cell" expanded="true" >
            <param name="knn" type="integer" min="0" value="3" label="KNN" help="Number of nearest neighbours to consider." />
            <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" />
            <expand macro="use_defaults_no" >
                <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." />
                <param name="fr" type="boolean" checked="false" label="F-R layout?" help="Use Fruchterman-Rheigold layout instead of t-SNE" />
            </expand>
        </section>
        <section name="projback" title="Compute Cell Projections for Randomized Background Distribution" expanded="true" >
            <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" />
            <expand macro="use_defaults_no" >
                <param name="fast" type="boolean" checked="false" label="Use a fast approximate background model to infer links" />
                <param name="rseed" type="integer" value="17000" label="Random seed" />
            </expand>
        </section>
        <section name="comppval" title="Computing P-values for Link Significance" expanded="true" >
            <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." />
            <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" />
        </section>
        <section name="plotgraph" title="StemID2 Lineage Graph" expanded="true" >
            <param name="showcells" type="boolean" checked="false" label="Show Cells" help="Projections of cells are shown in the plot" />
            <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" />
            <expand macro="use_defaults_no">
                <param name="showtsne" type="boolean" checked="true" label="Show tSNE" help="Show transparent t-SNE map of cells in the background" />
                <param name="tp" type="float" min="0" max="1" value="0.5" label="Transparency" help="Level of transparency of t-SNE map" />
            </expand>
        </section>
        <section name="compscore" title="Compute StemID2 score" expanded="true" >
            <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" />
            <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" />
        </section>
    </macro>
    <macro name="trajectory_tests" >
        <test>
            <!-- All defaults -->
            <param name="inputrds" value="out_cluster_default.rdat" />
            <output name="outpdf" value="out_traject_default.pdf" compare="sim_size" delta="15" />
            <output name="outrdat" value="out_traject_default.ltree.rdat" compare="sim_size" delta="15" />
        </test>
        <test>
            <!-- Manually specify the defaults: should ideally give same output as above test -->
            <param name="inputrds" value="out_cluster_default.rdat" />
            <section name="projcell" >
                <param name="knn" value="3" />
                <param name="cthr" value="5" />
                <expand macro="test_nondef" >
                    <param name="nmode" value="true" />
                    <param name="fr" value="false" />
                </expand>
            </section>
            <section name="projback" >
                <param name="pdishuf" value="2000" />
                <expand macro="test_nondef" >
                    <param name="fast" value="false" />
                    <param name="rseed" value="17000" />
                </expand>
            </section>
            <section name="comppval" >
                <param name="pthr" value="0.01" />
                <param name="sensitive" value="false" />
            </section>
            <section name="plotgraph" >
                <param name="showcells" value="false" />
                <param name="scthr" value="0" />
                <expand macro="test_nondef" >
                    <param name="showtsne" value="true" />
                    <param name="tp" value="0.5" />
                </expand>
            </section>
            <section name="compscore" >
                <param name="nn" value="1" />
                <param name="scthr" value="0" />
            </section>
            <output name="outpdf" value="out_traject_default.pdf" compare="sim_size" delta="15" />
            <output name="outrdat" value="out_traject_default.ltree.rdat" compare="sim_size" delta="15" />
        </test>
        <test>
            <!-- Non-defaults -->
            <param name="inputrds" value="out_cluster_default.rdat" />
            <section name="projcell">
                <param name="knn" value="4" />
                <param name="cthr" value="4" />
                <expand macro="test_nondef" >
                    <param name="nmode" value="false" />
                    <param name="fr" value="true" />
                </expand>
            </section>
            <section name="projback">
                <param name="pdishuf" value="1500" />
                <expand macro="test_nondef" >
                    <param name="fast" value="true" />
                    <param name="rseed" value="1500" />
                </expand>
            </section>
            <section name="comppval">
                <param name="pthr" value="0.05" />
                <param name="sensitive" value="true" />
            </section>
            <section name="plotgraph">
                <param name="showcells" value="true" />
                <param name="scthr" value="0.5" />
                <expand macro="test_nondef" >
                    <param name="showtsne" value="false" />
                    <param name="tp" value="0.25" />
                </expand>
            </section>
            <section name="compscore">
                <param name="nn" value="2" />
                <param name="scthr" value="0.5" />
            </section>
            <output name="outpdf" value="out_traject_adv_nondef.pdf" compare="sim_size" delta="15" />
        </test>
    </macro>
    <token name="@TRAJECTORY_CHEETAH@"><![CDATA[

in.rdat = readRDS('${inputrds}')

pstc.projc = formals(projcells)
pstc.projc\$knn = as.integer( '$projcell.knn' )
pstc.projc\$cthr = as.integer( '$projcell.cthr' )
#if str($projcell.use.def) == "no":
pstc.projc\$nmode = as.logical( '$projcell.use.nmode' )
pstc.projc\$fr = as.logical( '$projcell.use.fr' )
#end if

pstc.projb = formals(projback)
pstc.projb\$pdishuf = as.integer( '$projback.pdishuf' )
#if str($projback.use.def) == "no":
pstc.projb\$fast = as.logical( '$projback.use.fast' )
pstc.projb\$rseed = as.integer( '$projback.use.rseed' )
#end if

pstc.comppval = formals(comppvalue)
pstc.comppval\$pthr = as.numeric( '$comppval.pthr' )
pstc.comppval\$sensitive = as.logical( '$comppval.sensitive' )

pstc.plotgraph = formals(plotgraph)
pstc.plotgraph\$showCells = as.logical( '$plotgraph.showcells' )
pstc.plotgraph\$scthr = as.numeric( '$plotgraph.scthr' )
#if str($plotgraph.use.def) == "no":
pstc.plotgraph\$showTsne = as.logical( '$plotgraph.use.showtsne' )
pstc.plotgraph\$tp = as.numeric( '$plotgraph.use.tp' )
#end if

pstc.compscore = formals(compscore)
pstc.compscore\$nn = as.integer( '$compscore.nn' )
pstc.compscore\$scthr = as.numeric( '$compscore.scthr' )

out.pdf='${outpdf}'
out.rdat='${outrdat}'
    ]]>
    </token>
</macros>