diff --git a/data/vtlib/alignment_wtsi_stage2_template.json b/data/vtlib/alignment_wtsi_stage2_template.json index 306b4f64..e623f5a2 100644 --- a/data/vtlib/alignment_wtsi_stage2_template.json +++ b/data/vtlib/alignment_wtsi_stage2_template.json @@ -95,24 +95,19 @@ ], "nodes":[ { - "id":"crammerge", - "type":"EXEC", - "use_STDIN": false, - "use_STDOUT": true, - "cmd": [ - "samtools", - "merge", - "-n", - "-O", "BAM", - "-l", "0", - {"select":"s2_input_format", "default":"cram", "select_range":[1], "cases":{ - "cram":["--input-fmt-option", "no_ref=1"], - "bam":["--input-fmt", "bam"] + "id":"preprocess_inputs", + "type":"VTFILE", + "name":{"subst":"s2_preprocess_inputs_method", "required":true, + "ifnull":{ + "select":"s2_ppi_switch", "default":"crammerge","select_range":[1], + "cases":{ + "crammerge":"crammerge.json", + "aviti":"elembio_nanoseq_2_pi.json"} }}, - "-", - {"subst":"incrams"} - ], - "description":"merge individual cram files from a sample into one bam file" + "subst_map":{"input_format":{"subst":"s2_input_format"}}, + "comment":"inputs: NONE; outputs: _stdout_ (bam), subst_map_parameters:[input_format]", + "node_prefix":"ppi_", + "description":"subgraph to preprocess inputs. Default: merge individual cram files from a sample into one bam file" }, { "id":"spatial_filter", diff --git a/data/vtlib/crammerge.json b/data/vtlib/crammerge.json new file mode 100644 index 00000000..3eeca9a5 --- /dev/null +++ b/data/vtlib/crammerge.json @@ -0,0 +1,40 @@ +{ +"version":"2.0", +"description":"run bwa mem to to align input bam to supplied reference genome", +"subgraph_io":{ + "ports":{ + "inputs":{ + }, + "outputs":{ + "_stdout_":"crammerge" + } + } +}, +"subst_params":[], +"nodes":[ + { + "id":"crammerge", + "type":"EXEC", + "use_STDIN": false, + "use_STDOUT": true, + "cmd": [ + "samtools", + "merge", + "-n", + "-O", "BAM", + "-l", "0", + {"select":"input_format", "default":"cram", "select_range":[1], "cases":{ + "cram":["--input-fmt-option", "no_ref=1"], + "bam":["--input-fmt", "bam"] + }}, + "-", + {"subst":"incrams", "required":true} + ], + "description":"merge individual cram files from a sample into one bam file" + } +], +"edges":[ + { "id":"bamtofastq_to_int_fq", "from":"bamtofastq", "to":"bwa_mem:fq" }, + { "id":"bwa_mem_to_s2b", "from":"bwa_mem", "to":"samtobam" } +] +}