Skip to content

Commit

Permalink
add reheader step
Browse files Browse the repository at this point in the history
add --reject-PG flag to reset step
  • Loading branch information
dozy committed Dec 5, 2023
1 parent e26eb64 commit 53b340a
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions data/vtlib/pib_reanalysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
"subst_params":[],
"nodes":[
{
"id":"crammerge",
"id":"merge",
"type":"EXEC",
"use_STDIN": false,
"use_STDOUT": true,
"cmd": [
"samtools",
"merge",
"-c",
"-r",
"-O", "BAM",
"-l", "0",
{"select":"s1_input_format", "default":"cram", "select_range":[1], "cases":{
Expand All @@ -31,10 +32,30 @@
],
"description":"merge individual cram files from a sample into one bam file"
},
{
"id":"reheader",
"type":"EXEC",
"use_STDIN": true,
"use_STDOUT": true,
"comment": "remove unwanted RG header lines",
"cmd": [
{"subst":"samtools_executable", "required":true, "ifnull":"samtools"}, "reheader",
"--no-PG",
"-c",
{"subst":"reheader_script","required":true,
"ifnull":{"subst_constructor":{"vals":[
"perl -ne \"(!/^\\@RG/ || /\\tID:",
{"subst":"reheader_rg_id", "required":true},
"\\t/) && print;\""
], "postproc":{"op":"concat","pad":""}}}},
{"subst":"pib_reanalysis_reheader_extra_flags", "required":false},
"-"
]
},
{
"id":"reset",
"type":"EXEC",
"comment": "WIP",
"comment": "reset bam stream",
"use_STDIN": true,
"use_STDOUT": true,
"cmd": [
Expand All @@ -46,10 +67,16 @@
{"subst":"reset_keep_tags","required":false, "ifnull":{"subst_constructor":{"vals":["RG","BC"], "postproc":{"op":"concat","pad":","}}}}
]
}}},
{"subst":"reset_reject_PG_flag","ifnull":{
"subst_constructor":{
"vals":[
"--reject-PG",
{"subst":"reset_reject_PG_id","required":false, "ifnull":"SCS"}
]
}}},
{"subst":"reset_output_format_flag","ifnull":{"subst_constructor":{"vals":["--output-fmt", {"subst":"reset_output_format", "ifnull":"BAM", "required":false}]}}},
"--threads", {"subst":"reset_threads","required":true,"ifnull":4},
{"subst":"reset_extra_flags", "required":false},
"-",
"-"
]
},
Expand All @@ -68,7 +95,8 @@
}
],
"edges":[
{ "id":"bamtofastq_to_int_fq", "from":"crammerge", "to":"reset" },
{ "id":"bwa_mem_to_s2b", "from":"reset", "to":"name_collate" }
{ "id":"merge_to_reheader", "from":"merge", "to":"reheader" },
{ "id":"reheader_to_reset", "from":"reheader", "to":"reset" },
{ "id":"reset_to_collate", "from":"reset", "to":"name_collate" }
]
}

0 comments on commit 53b340a

Please sign in to comment.