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
5 changes: 0 additions & 5 deletions resources_test_scripts/pbmc_1k_protein_v3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ target/docker/convert/from_10xh5_to_h5mu/from_10xh5_to_h5mu \
--input "${OUT}_filtered_feature_bc_matrix.h5" \
--input_metrics_summary "${OUT}_metrics_summary.csv" \
--output "${OUT}_filtered_feature_bc_matrix.h5mu"

target/docker/convert/from_10xh5_to_h5mu/from_10xh5_to_h5mu \
--input "${OUT}_raw_feature_bc_matrix.h5" \
--input_metrics_summary "${OUT}_metrics_summary.csv" \
--output "${OUT}_raw_feature_bc_matrix.h5mu"

# run single sample
NXF_VER=21.10.6 nextflow \
Expand Down
3 changes: 2 additions & 1 deletion src/correction/cellbender_remove_background/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ functionality:
- type: python_script
path: test.py
# normally cellbender should only be run on unfiltered data, but for the purposes of the unit test the filtered data will do.
- path: /resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_raw_feature_bc_matrix.h5mu
- path: /resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu
platforms:
- type: docker
image: nvcr.io/nvidia/cuda:11.8.0-devel-ubuntu22.04
Expand All @@ -296,6 +296,7 @@ platforms:
packages:
# Use this version of mudata because it is the last one that supports python 3.7
- mudata~=0.2.1
- lxml[html_clean]
- cellbender~=0.3.0
- type: nextflow
directives:
Expand Down
2 changes: 1 addition & 1 deletion src/correction/cellbender_remove_background/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from scipy.sparse import csr_matrix
from cellbender.remove_background.downstream import anndata_from_h5
## VIASH START
file_input = "./resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_raw_feature_bc_matrix.h5mu"
file_input = "./resources_test/pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu"

par = {
# inputs
Expand Down
2 changes: 1 addition & 1 deletion src/correction/cellbender_remove_background/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
## VIASH END

file_input = meta["resources_dir"] + "/pbmc_1k_protein_v3_raw_feature_bc_matrix.h5mu"
file_input = meta["resources_dir"] + "/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu"
file_output = "output.h5mu"

print("> Check whether cellbender works when it should be working")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ REPO_ROOT=$(git rev-parse --show-toplevel)
# ensure that the command below is run from the root of the repository
cd "$REPO_ROOT"

export NXF_VER=21.10.6

nextflow \
run . \
-main-script src/workflows/ingestion/cellranger_postprocessing/test.nf \
Expand Down
14 changes: 4 additions & 10 deletions src/workflows/ingestion/cellranger_postprocessing/test.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ workflow test_wf {
output_ch = Channel.fromList([
[
id: "foo",
input: resources_test.resolve("pbmc_1k_protein_v3/pbmc_1k_protein_v3_raw_feature_bc_matrix.h5"),
input_og: resources_test.resolve("pbmc_1k_protein_v3/pbmc_1k_protein_v3_raw_feature_bc_matrix.h5mu"),
input: resources_test.resolve("pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu"),
input_og: resources_test.resolve("pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu"),
perform_correction: true,
min_genes: 100,
min_counts: 1000,
Expand Down Expand Up @@ -67,21 +67,15 @@ workflow test_wf2 {
output_ch = Channel.fromList([
[
id: "zing",
input: resources_test.resolve("pbmc_1k_protein_v3/pbmc_1k_protein_v3_raw_feature_bc_matrix.h5"),
input_og: resources_test.resolve("pbmc_1k_protein_v3/pbmc_1k_protein_v3_raw_feature_bc_matrix.h5mu"),
input: resources_test.resolve("pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu"),
input_og: resources_test.resolve("pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu"),
perform_correction: false,
min_genes: 100,
min_counts: 1000,
cellbender_epochs: 5
]
])
| map{ state -> [state.id, state] }
// first filter and convert to h5mu
| from_10xh5_to_h5mu.run(
fromState: ["input"],
toState: ["input": "output"]
)

| cellranger_postprocessing.run(
toState: {id, output, state ->
output + [
Expand Down