-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated to support run_azimuth * azimuth implemented * gene expression done * gene expression done * Finished up azimuth data download cwl/scripts * Add reference data input * Remove gene expression (not part of pr) --------- Co-authored-by: Vicky Daiya <[email protected]>
- Loading branch information
1 parent
4a10afd
commit 5876942
Showing
9 changed files
with
156 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,3 +168,6 @@ containers/*/context/src | |
# Temp directories | ||
tmp/ | ||
temp/ | ||
|
||
# DS Store | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
OUTPUT_DIR=${1:-"./azimuth"} | ||
MAPPING_FILE=${2:-"/organ-mapping.json"} | ||
|
||
mkdir -p "$OUTPUT_DIR" | ||
Rscript /download_reference_data.R "$MAPPING_FILE" "$OUTPUT_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
library(rjson) | ||
library(Seurat) | ||
library(SeuratData) | ||
|
||
args <- commandArgs(trailingOnly = TRUE) | ||
organ_mapping_file <- args[1] | ||
output_dir <- args[2] | ||
|
||
# Load unique reference organs | ||
mapping <- fromJSON(file = organ_mapping_file) | ||
references <- unlist(unique(mapping)) | ||
|
||
# Download and install data | ||
options(timeout=60 * 60) # Probably overkill but the default of 60s is to low for some of the datasets | ||
InstallData(references, lib=output_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"UBERON:0002113": "LK", | ||
"UBERON:0004538": "LK", | ||
"UBERON:0004539": "RK", | ||
"UBERON:0002048": "LL", | ||
"UBERON:0001004": "LL", | ||
"UBERON:0000948": "HT" | ||
} | ||
"UBERON:0002113": "kidneyref", | ||
"UBERON:0004538": "kidneyref", | ||
"UBERON:0004539": "kidneyref", | ||
"UBERON:0002048": "lungref", | ||
"UBERON:0001004": "lungref", | ||
"UBERON:0000948": "heartref" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
library(Azimuth) | ||
library(Seurat) | ||
library(SeuratData) | ||
library(SeuratDisk) | ||
|
||
args <- commandArgs(trailingOnly = TRUE) | ||
|
||
matrix_path <- args[1] | ||
reference <- args[2] | ||
|
||
# Annotate | ||
output_data <- RunAzimuth(matrix_path, reference=reference) | ||
|
||
# Save and convert to h5ad | ||
SaveH5Seurat(output_data, 'result.h5seurat') | ||
Convert('result.h5seurat', dest='h5ad') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env cwl-runner | ||
class: CommandLineTool | ||
cwlVersion: v1.2 | ||
|
||
requirements: | ||
DockerRequirement: | ||
dockerPull: ghcr.io/hubmapconsortium/hra-workflows/azimuth:main | ||
NetworkAccess: | ||
networkAccess: true | ||
|
||
baseCommand: /bin/bash | ||
arguments: | ||
- /download-data.sh | ||
|
||
inputs: | ||
outputDirectory: | ||
type: string | ||
label: Output directory for reference data | ||
default: ./azimuth | ||
inputBinding: | ||
position: 0 | ||
organMappingFile: | ||
type: File? | ||
label: Organ mapping json file | ||
inputBinding: | ||
position: 1 | ||
|
||
outputs: | ||
data: | ||
type: Directory | ||
outputBinding: | ||
glob: $(inputs.outputDirectory) | ||
loadListing: deep_listing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
type: record | ||
name: options | ||
label: Azimuth specific options | ||
fields: {} | ||
fields: | ||
referenceDataDir: | ||
type: Directory | ||
label: Directory with reference data directories | ||
inputBinding: | ||
prefix: --reference-data-dir |