Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## Description


## Dependencies (Issues/PRs)


## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation

## Task Checklist
- [ ] documentation updated
- [ ] `miniwdl check` passed
- [ ] `womtool validate` passed


## Testing
### Workflow Engine Tested On
- [ ] HealthOmics, Amazon Web Services
- [ ] Google Cloud Platform, Cromwell
- [ ] Google Cloud Platform
- [ ] Microsoft Azure, Cromwell
- [ ] GA4GH Workflow Execution Service, On Premises and Multi Cloud
- [ ] Other

### Successful Workflow IDs
*
2 changes: 1 addition & 1 deletion .github/workflows/lint-test-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
workbench-workflow-service-url: ${{ secrets.WORKBENCH_WORKFLOW_SERVICE_URL }}
workbench-ewes-refresh-token: ${{ secrets.WORKBENCH_EWES_REFRESH_TOKEN }}
workbench-workflow-service-refresh-token: ${{ secrets.WORKBENCH_WORKFLOW_SERVICE_REFRESH_TOKEN }}
wdl-ci-custom-test-wdl-dir: pmdbs-spatial-transcriptomics-wdl-ci-custom-test-dir
wdl-ci-custom-test-wdl-dir: spatial-transcriptomics-wdl-ci-custom-test-dir

60 changes: 30 additions & 30 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docker/spatial_py/scripts/geomx_merge_and_prep
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def main(args):
hvg_features = hvg_adata.var.copy()

sc.pl.highly_variable_genes(
hvg_adata,
merged_adata,
)
fig = plt.gcf()
fig.suptitle(f"Highly variable genes dispersion plot - {args.output_prefix}", va="center", ha="center", fontsize=16)
Expand Down
19 changes: 15 additions & 4 deletions docker/spatial_py/scripts/integrate_harmony
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,21 @@ def main(args):
##################################
adata = sc.read_h5ad(args.adata_input)

sc.external.pp.harmony_integrate(
adata,
key=args.batch_key,
)
n_cells = adata.n_obs
if n_cells < 100:
nclust = min(10, max(3, n_cells // 5))
print(f"[INFO] Detected small dataset (n={n_cells}). Setting nclust={nclust}.")
sc.external.pp.harmony_integrate(
adata,
key=args.batch_key,
nclust=nclust,
)
else:
print(f"[INFO] Running Harmony with default settings (n={n_cells}).")
sc.external.pp.harmony_integrate(
adata,
key=args.batch_key,
)

# Save outputs
adata.write_h5ad(filename=args.adata_output, compression="gzip")
Expand Down
2 changes: 1 addition & 1 deletion docker/spatial_py/scripts/visium_process
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def main(args):
hvg_features = hvg_adata.var.copy()

sc.pl.highly_variable_genes(
hvg_adata,
adata,
)
fig = plt.gcf()
fig.suptitle(f"Highly variable genes dispersion plot - {args.output_prefix}", va="center", ha="center", fontsize=16)
Expand Down
10 changes: 6 additions & 4 deletions docker/spatial_r/scripts/geomx_counts_to_rds
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ geomxdata <- readNanoStringGeoMxSet(dccFiles = dcc_files,
## ADD METADATA ##
##################
metadata <- read.csv(args$sample_metadata, header = TRUE, stringsAsFactors = FALSE)
slide_filename_parts <- strsplit(args$slide_id, "_")[[1]]
slide_filename_batch <- tail(slide_filename_parts, 1)
slide_filename_batch <- sub(".*BATCH_", "", args$slide_id)
# Per slide by batch/run
filtered_metadata <- metadata[metadata$batch == slide_filename_batch, ]
if (nrow(filtered_metadata) == 0) {
stop("No metadata found for batch: ", slide_filename_batch)
}
filtered_metadata$sample <- paste0(filtered_metadata$ASAP_sample_id, "_", filtered_metadata$replicate)
filtered_metadata <- filtered_metadata[, c("sample_id", "batch", "sample")]
# Some batches contain multiple replicates for the same ROI which will be in one DCC file, need to group
Expand All @@ -107,8 +109,8 @@ merged_pdata <- merge(
sort = FALSE
)
merged_pdata$batch_id <- paste0(args$team_id, "_", args$dataset_id, "_", merged_pdata$batch)
num_pdata_rows = length(rownames(pData(geomxdata)))
num_metadata_rows = length(rownames(merged_pdata))
num_pdata_rows = nrow(pData(geomxdata))
num_metadata_rows = nrow(merged_pdata)
if (num_pdata_rows != num_metadata_rows) {
message(glue(
"DCC files AKA RDS object row names:\n",
Expand Down
Loading