@@ -172,69 +172,6 @@ workflow test_wf4 {
172172
173173 resources_test = file(params. resources_test)
174174
175- input_ch = Channel . fromList([
176- [
177- id : " pbmc" ,
178- input : resources_test. resolve(" pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu" ),
179- rna_min_counts : 2 ,
180- rna_max_counts : 1000000 ,
181- rna_min_genes_per_cell : 1 ,
182- rna_max_genes_per_cell : 1000000 ,
183- rna_min_percentile_counts : 0.05 ,
184- rna_max_percentile_counts : 0.95 ,
185- rna_min_cells_per_gene : 1 ,
186- rna_min_fraction_mito : 0.0 ,
187- rna_max_fraction_mito : 1.0 ,
188- prot_min_counts : 3 ,
189- prot_max_counts : 1000000 ,
190- prot_min_percentile_counts : 0.05 ,
191- prot_max_percentile_counts : 0.95 ,
192- prot_min_proteins_per_cell : 1 ,
193- prot_max_proteins_per_cell : 1000000 ,
194- prot_min_cells_per_protein : 1 ,
195- var_name_mitochondrial_genes : ' mitochondrial' ,
196- obs_name_mitochondrial_fraction : ' fraction_mitochondrial' ,
197- var_name_ribosomal_genes : ' ribosomal' ,
198- obs_name_ribosomal_fraction : ' fraction_ribosomal' ,
199- add_id_to_obs : true ,
200- add_id_make_observation_keys_unique : true ,
201- do_subset : true ,
202- add_id_obs_output : " sample_id" ,
203- intersect_obs : true ,
204- skip_qc_metrics : true ,
205- output : " pbmc_test.h5mu"
206- ]
207- ])
208- | map{ state -> [state. id, state] }
209- | process_singlesample. run(
210- toState : { id , output , state -> output + [orig_input : state. input] }
211- )
212-
213- assert_ch = input_ch
214- | view { output ->
215- assert output. size() == 2 : " outputs should contain two elements; [id, file]"
216- assert output[1 ]. output. toString(). endsWith(" pbmc_test.h5mu" ) : " Output file should be a h5mu file. Found: ${ output[1].output} "
217- " Output: $output "
218- }
219- | toSortedList()
220- | map { output_list ->
221- assert output_list. size() == 1 : " output channel should contain one event, got ${ output_list.size()} "
222- assert output_list[0 ][0 ] == " pbmc" : " Output id should be `pbmc`."
223- }
224-
225- test_ch = input_ch
226- | workflow5_test. run(
227- fromState : [
228- " input" : " output" ,
229- " orig_input" : " orig_input"
230- ],
231- )
232- }
233-
234- workflow test_wf5 {
235-
236- resources_test = file(params. resources_test)
237-
238175 // Shared single-sample processing parameters. QC metrics are calculated
239176 def base_args = [
240177 input : resources_test. resolve(" pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu" ),
@@ -326,3 +263,66 @@ workflow test_wf5 {
326263 }
327264 )
328265}
266+
267+ workflow test_wf5 {
268+
269+ resources_test = file(params. resources_test)
270+
271+ input_ch = Channel . fromList([
272+ [
273+ id : " pbmc" ,
274+ input : resources_test. resolve(" pbmc_1k_protein_v3/pbmc_1k_protein_v3_filtered_feature_bc_matrix.h5mu" ),
275+ rna_min_counts : 2 ,
276+ rna_max_counts : 1000000 ,
277+ rna_min_genes_per_cell : 1 ,
278+ rna_max_genes_per_cell : 1000000 ,
279+ rna_min_percentile_counts : 0.05 ,
280+ rna_max_percentile_counts : 0.95 ,
281+ rna_min_cells_per_gene : 1 ,
282+ rna_min_fraction_mito : 0.0 ,
283+ rna_max_fraction_mito : 1.0 ,
284+ prot_min_counts : 3 ,
285+ prot_max_counts : 1000000 ,
286+ prot_min_percentile_counts : 0.05 ,
287+ prot_max_percentile_counts : 0.95 ,
288+ prot_min_proteins_per_cell : 1 ,
289+ prot_max_proteins_per_cell : 1000000 ,
290+ prot_min_cells_per_protein : 1 ,
291+ var_name_mitochondrial_genes : ' mitochondrial' ,
292+ obs_name_mitochondrial_fraction : ' fraction_mitochondrial' ,
293+ var_name_ribosomal_genes : ' ribosomal' ,
294+ obs_name_ribosomal_fraction : ' fraction_ribosomal' ,
295+ add_id_to_obs : true ,
296+ add_id_make_observation_keys_unique : true ,
297+ do_subset : true ,
298+ add_id_obs_output : " sample_id" ,
299+ intersect_obs : true ,
300+ skip_qc_metrics : true ,
301+ output : " pbmc_test.h5mu"
302+ ]
303+ ])
304+ | map{ state -> [state. id, state] }
305+ | process_singlesample. run(
306+ toState : { id , output , state -> output + [orig_input : state. input] }
307+ )
308+
309+ assert_ch = input_ch
310+ | view { output ->
311+ assert output. size() == 2 : " outputs should contain two elements; [id, file]"
312+ assert output[1 ]. output. toString(). endsWith(" pbmc_test.h5mu" ) : " Output file should be a h5mu file. Found: ${ output[1].output} "
313+ " Output: $output "
314+ }
315+ | toSortedList()
316+ | map { output_list ->
317+ assert output_list. size() == 1 : " output channel should contain one event, got ${ output_list.size()} "
318+ assert output_list[0 ][0 ] == " pbmc" : " Output id should be `pbmc`."
319+ }
320+
321+ test_ch = input_ch
322+ | workflow5_test. run(
323+ fromState : [
324+ " input" : " output" ,
325+ " orig_input" : " orig_input"
326+ ],
327+ )
328+ }
0 commit comments