From 476aba309105d239995881bc7e3365414d2c491f Mon Sep 17 00:00:00 2001 From: tmtabor Date: Mon, 25 Nov 2024 12:19:09 -0800 Subject: [PATCH 1/2] Doc fixes --- docs/v1/index.md | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/docs/v1/index.md b/docs/v1/index.md index db9eb77..5c7b0ea 100644 --- a/docs/v1/index.md +++ b/docs/v1/index.md @@ -1,6 +1,6 @@ # spatialGE.STenrich (v1) -The `spatialGE.Preprocessing` module is part of the spatialGE package. It detects genes showing spatial expression patterns (e.g., hotspots) and tests if spots/cells with a high average expression of a gene set show evidence of spatial aggregation. +The `spatialGE.STenrich` module is part of the spatialGE package. It detects genes showing spatial expression patterns (e.g., hotspots) and tests if spots/cells with a high average expression of a gene set show evidence of spatial aggregation. ## Module Details @@ -8,10 +8,7 @@ The `spatialGE.Preprocessing` module is part of the spatialGE package. It detect - **Categories:** spatial transcriptomics - **Source repository:** [spatialGE.Preprocessing on GitHub](https://github.com/genepattern/spatialGE.STenrich) - **Contact**: [GenePattern Help Forum](https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!forum/genepattern-help) - -**Contact**: [Forum Link](https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!forum/genepattern-help) - -**Algorithm Version**: [spatialGE 1.2.0](https://fridleylab.github.io/spatialGE/) +- **Algorithm Version**: [spatialGE 1.2.0](https://fridleylab.github.io/spatialGE/) ## Summary @@ -31,17 +28,17 @@ Ospina, O. E., Wilson C. M., Soupir, A. C., Berglund, A. Smalley, I., Tsai, K. Y ## Parameters -| Name | Description | Default Value | -----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------| -| input file * | Normalized spatial transcriptomics data coming from the spatialGE.Preprocessing module. | -| gene sets database * | Select a gene set database to test for spatial enrichment. Upload a gene set if your gene set is not listed as a choice from MSigDB. | | -| permutations * | The number of permutations to estimate the null distribution (no-spatial pattern). The more permutations, the longer STenrich takes to complete, but p-values may be more accurate. | 100 | -| random seed * | A seed number to replicate results. It is advisable to run STenrich with different seed values to check for consistency. Different seed values could yield slightly different p-values. | 12345 | -| minumum spots * | The minimum number of high expression ROIs/spots/cells required for a gene set to be tested. If a sample has less than this number of high expression ROIs/spots/cells, the gene set is not tested in that sample. | 5 | -| minimum genes * | The minimum number of genes of a set required to be present in a sample, for that gene set to be tested in that sample. If a sample has less genes of a set than this number, the gene set is ignored in that sample. | 5 | -| standard deviations * | The number of standard deviations to define the high expression threshold. If an ROI/spot/cell has average gene set expression larger than the entire sample average plus this many standard deviations, it will be considered a high-expression ROI/spot/cell. | 1.0 | -| filter p values * | Plot only gene sets whose multiple test adjusted p-value is less than this threshold. | 0.05 | -| filter gene proportion * | Plot only gene sets where the proportional number genes in the set present in the field of view equals or exceeds this threshold. | 0.3 | +| Name | Description | Default Value | +|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------| +| input file * | Normalized spatial transcriptomics data coming from the spatialGE.Preprocessing module. | | +| gene sets database * | Select a gene set database to test for spatial enrichment. Upload a gene set if your gene set is not listed as a choice from MSigDB. | | +| permutations * | The number of permutations to estimate the null distribution (no-spatial pattern). The more permutations, the longer STenrich takes to complete, but p-values may be more accurate. | 100 | +| random seed * | A seed number to replicate results. It is advisable to run STenrich with different seed values to check for consistency. Different seed values could yield slightly different p-values. | 12345 | +| minumum spots * | The minimum number of high expression ROIs/spots/cells required for a gene set to be tested. If a sample has less than this number of high expression ROIs/spots/cells, the gene set is not tested in that sample. | 5 | +| minimum genes * | The minimum number of genes of a set required to be present in a sample, for that gene set to be tested in that sample. If a sample has less genes of a set than this number, the gene set is ignored in that sample. | 5 | +| standard deviations * | The number of standard deviations to define the high expression threshold. If an ROI/spot/cell has average gene set expression larger than the entire sample average plus this many standard deviations, it will be considered a high-expression ROI/spot/cell. | 1.0 | +| filter p values * | Plot only gene sets whose multiple test adjusted p-value is less than this threshold. | 0.05 | +| filter gene proportion * | Plot only gene sets where the proportional number genes in the set present in the field of view equals or exceeds this threshold. | 0.3 | \* required @@ -72,6 +69,6 @@ Requires the [genepattern/spatialge-stenrich:0.4 Docker image](https://hub.docke ## Version Comments -| Version | Release Date | Description | -----------|---------------|-----------------------------------| -| 1 | June 28, 2024 | Initial version | +| Version | Release Date | Description | +|---------|---------------|-----------------| +| 1 | June 28, 2024 | Initial version | From 0fa8212e559c8874f5f7843486012dc90dbf39c8 Mon Sep 17 00:00:00 2001 From: tmtabor Date: Wed, 18 Dec 2024 09:36:06 -0800 Subject: [PATCH 2/2] Write rds to disk --- manifest | 2 +- src/wrapper.R | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/manifest b/manifest index 24a2594..0a83e7d 100644 --- a/manifest +++ b/manifest @@ -147,4 +147,4 @@ quality=development taskDoc= taskType=spatial transcriptomics userid=tabor -version=Initial development release \ No newline at end of file +version=Write stlist rds to disk \ No newline at end of file diff --git a/src/wrapper.R b/src/wrapper.R index 3c178de..39c00fb 100644 --- a/src/wrapper.R +++ b/src/wrapper.R @@ -71,3 +71,5 @@ ggsave( dpi = 300, limitsize = TRUE ) + +saveRDS(stenrich_out, file='enrich_stlist.rds') \ No newline at end of file