Skip to content

Commit

Permalink
Merge pull request #6212 from nilchia/spacexr
Browse files Browse the repository at this point in the history
add spacexr
  • Loading branch information
bgruening authored Jan 15, 2025
2 parents 273fabe + 94ef79a commit ec96d43
Show file tree
Hide file tree
Showing 4 changed files with 939 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/spacexr/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: spacexr
owner: iuc
description: Cell type identification and cell type-specific differential expression in spatial transcriptomics
homepage_url: https://github.com/dmcable/spacexr/tree/master
long_description: Computational methods for cell type identification (RCTD) and differential expression (C-SIDE) on spatial transcriptomics datasets
remote_repository_url: https://github.com/galaxyproject/tools-iuc/tree/master/tools/spacexr
categories:
- Spatial Omics
- Single Cell
suite:
name: "suite_spacexr"
description: "A suite of Galaxy tools designed to work with the spacexr-tools collection."
type: repository_suite_definition
107 changes: 107 additions & 0 deletions tools/spacexr/macros.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<macros>
<token name="@TOOL_VERSION@">2.2.1</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@PROFILE@">23.0</token>
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">r-spacexr</requirement>
<yield/>
</requirements>
</xml>
<xml name="edam">
<edam_topics>
<edam_topic>topic_4019</edam_topic>
<edam_topic>topic_4028</edam_topic>
<edam_topic>topic_3308</edam_topic>
</edam_topics>
<edam_operations>
<edam_operation>operation_3223</edam_operation>
</edam_operations>
</xml>
<token name="CSIDE_COMMON_RUN"><![CDATA[
#if str($type.cell_types) != '':
cell_types = c($cell_types),
#end if
cell_type_threshold = $type.cell_type_threshold,
gene_threshold = $type.gene_threshold,
doublet_mode = $type.doublet_mode,
#if str($type.weight_threshold) != '':
weight_threshold = $type.weight_threshold,
#end if
sigma_gene = $type.sigma_gene,
PRECISION.THRESHOLD = $type.precision_threshold,
#if str($type.cell_types_present) != '':
cell_types_present = c($cell_types_present),
#end if
fdr = $type.fdr,
test_genes_sig = $type.test_genes_sig,
#if 'log' in $output_selector:
logs = TRUE,
#else:
logs = FALSE,
#end if
]]></token>
<token name="CSIDE_SINGLE_RUN"><![CDATA[
myRCTD <- run.CSIDE.single(myRCTD,
explanatory.variable,
normalize_expr = $type.normalize_expr,
log_fc_thresh = $type.log_FC_thresh,
fdr_method = "BH", # default
medv = $type.medv,
CSIDE_COMMON_RUN
)
]]></token>
<xml name="sanitizer">
<sanitizer invalid_char="">
<valid initial="string.ascii_letters,string.digits">
<add value="_" />
<add value="-" />
<add value="," />
</valid>
</sanitizer>
</xml>
<xml name="barcodes_input" token_help="" token_label="">
<param argument="barcodes" type="data" format="tabular" optional="false" label="@LABEL@" help="@HELP@" />
</xml>
<xml name="radius">
<param argument="radius" type="integer" min="0" value="50" label="Radius" help="The radius of the exponential filter. Approximately, the distance considered to be a relevant interaction."/>
</xml>
<xml name="cside_common_input">
<param argument="cell_types" type="text" optional="true" label="Cell types used for CSIDE" help="(Comma separated) If null, cell types will be chosen with aggregate occurences of at least 'cell type threshold'."/>
<param argument="cell_type_threshold" type="integer" min="0" value="125" label="Cell type threshold" help="Min occurence of number of cells for each cell type to be used."/>
<param argument="gene_threshold" type="float" min="0" value="0.00005" label="Gene threshold" help="Minimum average normalized expression required for selecting genes."/>
<param argument="doublet_mode" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Use RCTD doublet mode weights?" help="Otherwise, uses RCTD full mode weights." />
<param argument="weight_threshold" type="float" min="0" value="" optional="true" label="Weight threshold" help="The threshold of total normalized weights across all cell types in 'cell types' per pixel to be included in the model."/>
<param argument="sigma_gene" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Fit gene specific overdispersion parameter?" help="If FALSE, overdispersion parameter is same across all genes." />
<param argument="precision_threshold" type="float" min="0" value="0.05" label="Precision threshold" help="For checking for convergence, the maximum parameter change per algorithm step."/>
<param argument="cell_types_present" type="text" optional="true" label="Cell types present" help="(Comma separeated) cell types (a superset of 'cell types') to be considered as occuring often enough to consider for gene expression contamination during the step filtering out marker genes of other cell types."/>
<param argument="fdr" type="float" min="0" value="0.01" label="FDR" help="False discovery rate for hypothesis testing."/>
<param argument="test_genes_sig" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Genes will be tested for significance."/>
</xml>
<xml name="cside_single_input">
<expand macro="cside_common_input"/>
<param argument="normalize_expr" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Constrain total gene expression to sum to 1 in each condition?"/>
<param argument="log_FC_thresh" type="float" min="0" value="0.4" label="LogFC threshold" help="The natural log fold change cutoff for differential expression."/>
<param argument="medv" type="float" min="0" value="0.5" label="Explanatory.variable cutoff" help="For determining if enough pixels for each cell type have explanatory-variable greater than or less than this value."/>
</xml>
<xml name="output">
<section name="output" title="Output Options">
<param name="output_selector" type="select" multiple="true" optional="true" display="checkboxes" label="Select / Deselect all">
<option value="rds">RDS file</option>
<option value="rscript">R script</option>
<yield/>
</param>
</section>
</xml>
<xml name="citations">
<citations>
<citation type="doi">10.1038/s41587-021-00830-w</citation>
<citation type="doi">10.1038/s41592-022-01575-3</citation>
<citation type="bibtex">@Manual{github,
title = {SpatialeXpressionR: Cell type identification and cell type-specific differential expression in spatial transcriptomics.},
author = {Dylan Cable},
url = {https://github.com/dmcable/spacexr}}
</citation>
</citations>
</xml>
</macros>
Loading

0 comments on commit ec96d43

Please sign in to comment.