Skip to content

Commit 2e34943

Browse files
authored
Add methods to benchmark workflow (#50)
* Add methods to benchmark workflow * Renaming of some methods
1 parent a5ad238 commit 2e34943

File tree

6 files changed

+53
-30
lines changed

6 files changed

+53
-30
lines changed

src/methods_transcript_assignment/clustermap_transcript_assignment/config.vsh.yaml renamed to src/methods_transcript_assignment/clustermap/config.vsh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__merge__: /src/api/comp_method_transcript_assignment.yaml
22

3-
name: clustermap_transcript_assignment
3+
name: clustermap
44
label: "Clustermap Transcript Assignment"
55
summary: "Assign transcripts to cells based on the ClusterMap method from He et al. 2021"
66
description: "Clusters RNA transcripts using density peak clustering."

src/methods_transcript_assignment/clustermap_transcript_assignment/script.py renamed to src/methods_transcript_assignment/clustermap/script.py

File renamed without changes.

src/methods_transcript_assignment/pciSeq_transcript_assignment/config.vsh.yaml renamed to src/methods_transcript_assignment/pciseq/config.vsh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__merge__: /src/api/comp_method_transcript_assignment.yaml
22

3-
name: pciseq_transcript_assignment
3+
name: pciseq
44
label: "pciSeq Transcript Assignment"
55
summary: "Assign transcripts to cells using the pciSeq method from Qian et. al. (2020)"
66
description: "Uses a reference sc-RNAseq dataset to probabalistically assign cell types and transcripts to cells ."

src/methods_transcript_assignment/pciSeq_transcript_assignment/script.py renamed to src/methods_transcript_assignment/pciseq/script.py

File renamed without changes.

src/workflows/run_benchmark/config.vsh.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,24 @@ dependencies:
5656
- name: control_methods/identity
5757
- name: control_methods/permute_celltype_annotations
5858
- name: methods_segmentation/custom_segmentation
59+
- name: methods_segmentation/cellpose
60+
- name: methods_segmentation/binning
61+
- name: methods_segmentation/stardist
62+
- name: methods_segmentation/watershed
5963
- name: methods_transcript_assignment/basic_transcript_assignment
64+
- name: methods_transcript_assignment/baysor
65+
- name: methods_transcript_assignment/clustermap
66+
- name: methods_transcript_assignment/pciseq
6067
- name: methods_count_aggregation/basic_count_aggregation
6168
- name: methods_qc_filter/basic_qc_filter
6269
- name: methods_calculate_cell_volume/alpha_shapes
6370
- name: methods_normalization/normalize_by_volume
71+
- name: methods_normalization/spanorm
6472
- name: methods_cell_type_annotation/ssam
73+
- name: methods_cell_type_annotation/tacco
74+
- name: methods_cell_type_annotation/moscot
6575
- name: methods_expression_correction/gene_efficiency_correction
76+
- name: methods_expression_correction/resolvi_correction
6677
- name: metrics/similarity
6778

6879
runners:

src/workflows/run_benchmark/main.nf

Lines changed: 40 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ workflow run_wf {
7171
segm_methods = [
7272
custom_segmentation.run(
7373
args: [labels_key: "cell_labels"]
74-
)
74+
),
75+
cellpose,
76+
binning,
77+
stardist,
78+
watershed
7579
]
7680
segm_ch = init_ch
7781
| runEach(
@@ -101,7 +105,10 @@ workflow run_wf {
101105
transcripts_key: "transcripts",
102106
coordinate_system: "global"
103107
]
104-
)
108+
),
109+
baysor,
110+
clustermap,
111+
pciseq
105112
]
106113
segm_ass_ch = segm_ch
107114
| runEach(
@@ -280,30 +287,32 @@ workflow run_wf {
280287
****************************************/
281288

282289
// TODO: implement this when direct normalization methods are added
283-
direct_norm_methods = []
284-
direct_norm_ch = Channel.empty()
285-
// direct_norm_ch = qc_filter_ch
286-
// | runEach(
287-
// components: direct_norm_methods,
288-
// id: { id, state, comp ->
289-
// id + "/norm_" + comp.name
290-
// },
291-
// fromState: [
292-
// input: "output_count_aggregation"
293-
// ],
294-
// toState: { id, out_dict, state, comp ->
295-
// state + [
296-
// steps: state.steps + [[
297-
// type: "normalization",
298-
// run_id: id,
299-
// component_id: comp.name,
300-
// input_state: state,
301-
// output_dict: out_dict
302-
// ]],
303-
// output_normalization: out_dict.output
304-
// ]
305-
// }
306-
// )
290+
direct_norm_methods = [
291+
spanorm
292+
]
293+
//direct_norm_ch = Channel.empty()
294+
direct_norm_ch = qc_filter_ch
295+
| runEach(
296+
components: direct_norm_methods,
297+
id: { id, state, comp ->
298+
id + "/norm_" + comp.name
299+
},
300+
fromState: [
301+
input: "output_count_aggregation"
302+
],
303+
toState: { id, out_dict, state, comp ->
304+
state + [
305+
steps: state.steps + [[
306+
type: "normalization",
307+
run_id: id,
308+
component_id: comp.name,
309+
input_state: state,
310+
output_dict: out_dict
311+
]],
312+
output_normalization: out_dict.output
313+
]
314+
}
315+
)
307316

308317
/****************************************
309318
* COMBINE NORMALIZATION *
@@ -315,7 +324,9 @@ workflow run_wf {
315324
* CELL TYPE ANNOTATION *
316325
****************************************/
317326
cta_methods = [
318-
ssam
327+
ssam,
328+
tacco,
329+
moscot
319330
]
320331
cta_ch = normalization_ch
321332
| runEach(
@@ -344,7 +355,8 @@ workflow run_wf {
344355
* EXPRESSION CORRECTION *
345356
****************************************/
346357
expr_corr_methods = [
347-
gene_efficiency_correction
358+
gene_efficiency_correction,
359+
resolvi_correction
348360
]
349361
expr_corr_ch = cta_ch
350362
| runEach(

0 commit comments

Comments
 (0)