-
Notifications
You must be signed in to change notification settings - Fork 1k
Update parabricks minimap2 for scnanoseq #10788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
ed5cf65
c5ceb35
213668f
f7c508b
db98d56
4de0f17
b170df6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,15 +10,14 @@ process PARABRICKS_MINIMAP2 { | |
| input: | ||
| tuple val(meta), path(reads) | ||
| tuple val(meta2), path(fasta) | ||
| tuple val(meta3), path(intervals) | ||
| tuple val(meta4), path(known_sites) | ||
| tuple val(meta3), path(index) | ||
| tuple val(meta4), path(intervals) | ||
| tuple val(meta5), path(known_sites) | ||
| val output_fmt | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.bam"), emit: bam, optional: true | ||
| tuple val(meta), path("*.bai"), emit: bai, optional: true | ||
| tuple val(meta), path("*.cram"), emit: cram, optional: true | ||
| tuple val(meta), path("*.crai"), emit: crai, optional: true | ||
| tuple val(meta), path("*.{bam,cram}"), emit: bam, optional: true | ||
| tuple val(meta), path("*.{bai,crai}"), emit: index, optional: true | ||
| tuple val(meta), path("*.table"), emit: bqsr_table, optional: true | ||
| tuple val(meta), path("*_qc_metrics"), emit: qc_metrics, optional: true | ||
| tuple val(meta), path("*.duplicate-metrics.txt"), emit: duplicate_metrics, optional: true | ||
|
|
@@ -49,6 +48,7 @@ process PARABRICKS_MINIMAP2 { | |
| } | ||
| def extension = "${output_fmt}" | ||
|
|
||
| def index_command = index ? "--index ${index}" : "" | ||
| def known_sites_command = known_sites ? (known_sites instanceof List ? known_sites.collect { knownSite -> "--knownSites ${knownSite}" }.join(' ') : "--knownSites ${known_sites}") : "" | ||
| def known_sites_output_cmd = known_sites ? "--out-recal-file ${prefix}.table" : "" | ||
| def intervals_command = intervals ? (intervals instanceof List ? intervals.collect { interval -> "--interval-file ${interval}" }.join(' ') : "--interval-file ${intervals}") : "" | ||
|
|
@@ -60,11 +60,25 @@ process PARABRICKS_MINIMAP2 { | |
| --ref ${fasta} \\ | ||
| ${in_command} \\ | ||
| --out-bam ${prefix}.${extension} \\ | ||
| ${index_command} \\ | ||
| ${known_sites_command} \\ | ||
| ${known_sites_output_cmd} \\ | ||
| ${intervals_command} \\ | ||
| ${num_gpus} \\ | ||
| ${args} | ||
|
|
||
| # Capture the full version output once and store it in a variable | ||
| pbrun_version_output=\$(pbrun minimap2 --version 2>&1) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? Does the tool take a long time to give the version information? |
||
|
|
||
| # We handle this different to the other modules because minimap does not begin with an Uppercase letter | ||
|
|
||
| # Generate compatible_versions.yml | ||
| cat <<EOF > compatible_versions.yml | ||
|
Comment on lines
+73
to
+76
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you swap to a topic channel please, which may make this unnecessary. |
||
| "${task.process}": | ||
| pbrun_version: \$(echo "\$pbrun_version_output" | grep "pbrun:" | awk '{print \$2}') | ||
| compatible_with: | ||
| \$(echo "\$pbrun_version_output" | tr '\\t' ' ' | awk -F':' '/Compatible With:/,/^---/ { if (\$0 !~ /Compatible With:/ && \$0 !~ /^---\$/ && index(\$0,":")>0) { key=\$1; val=\$2; gsub(/^[ ]+|[ ]+\$/, "", key); gsub(/^[ ]+|[ ]+\$/, "", val); printf " %s: %s\\n", key, val } }') | ||
|
Comment on lines
+79
to
+80
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this really really long expression doing?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This extracts the compatible version of the non-gpu tool so that you can directly see that in the snapshot. There is no reason to have this as a topic because this is specific for parabricks modules. |
||
| EOF | ||
| """ | ||
|
|
||
| stub: | ||
|
|
@@ -85,7 +99,6 @@ process PARABRICKS_MINIMAP2 { | |
| ${known_sites_output} | ||
| ${qc_metrics_output} | ||
| ${duplicate_metrics_output} | ||
|
|
||
| # Capture the full version output once and store it in a variable | ||
| pbrun_version_output=\$(pbrun minimap2 --version 2>&1) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -43,13 +43,22 @@ input: | |||||
| type: map | ||||||
| description: | | ||||||
| Groovy Map containing index information | ||||||
| - index: | ||||||
| type: file | ||||||
| description: (optional) minimap2 index file for the reference | ||||||
| pattern: "*.mmi" | ||||||
| ontologies: [] | ||||||
| - - meta4: | ||||||
| type: map | ||||||
| description: | | ||||||
| Groovy Map containing intervals information | ||||||
| - intervals: | ||||||
| type: file | ||||||
| description: (optional) file(s) containing genomic intervals for use in base | ||||||
| quality score recalibration (BQSR) | ||||||
| pattern: "*.{bed,interval_list,picard,list,intervals}" | ||||||
| ontologies: [] | ||||||
| - - meta4: | ||||||
| - - meta5: | ||||||
| type: map | ||||||
| description: | | ||||||
| Groovy Map containing known sites information | ||||||
|
|
@@ -72,44 +81,22 @@ output: | |||||
| description: | | ||||||
| Groovy Map containing sample information | ||||||
| e.g. [ id:'test', single_end:false ] | ||||||
| - "*.bam": | ||||||
| - "*.{bam,cram}": | ||||||
| type: file | ||||||
| description: Sorted BAM file | ||||||
| pattern: "*.bam" | ||||||
| description: Sorted BAM or CRAM file | ||||||
| pattern: "*.{bam,cram}" | ||||||
| ontologies: | ||||||
| - edam: "http://edamontology.org/format_2572" # BAM | ||||||
| bai: | ||||||
| - - meta: | ||||||
| type: map | ||||||
| description: | | ||||||
| Groovy Map containing sample information | ||||||
| e.g. [ id:'test', single_end:false ] | ||||||
| - "*.bai": | ||||||
| type: file | ||||||
| description: index corresponding to sorted BAM file | ||||||
| pattern: "*.bai" | ||||||
| ontologies: [] | ||||||
| cram: | ||||||
| - - meta: | ||||||
| type: map | ||||||
| description: | | ||||||
| Groovy Map containing sample information | ||||||
| e.g. [ id:'test', single_end:false ] | ||||||
| - "*.cram": | ||||||
| type: file | ||||||
| description: Sorted CRAM file | ||||||
| pattern: "*.cram" | ||||||
| ontologies: [] | ||||||
| crai: | ||||||
| index: | ||||||
| - - meta: | ||||||
| type: map | ||||||
| description: | | ||||||
| Groovy Map containing sample information | ||||||
| e.g. [ id:'test', single_end:false ] | ||||||
| - "*.crai": | ||||||
| - "*.{bai,crai}": | ||||||
| type: file | ||||||
| description: index corresponding to sorted CRAM file | ||||||
| pattern: "*.crai" | ||||||
| description: Index corresponding to sorted BAM or CRAM file | ||||||
| pattern: "*.{bai,crai}" | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| ontologies: [] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should have some ontologies, as should several of the others. |
||||||
| bqsr_table: | ||||||
| - - meta: | ||||||
|
|
@@ -178,3 +165,4 @@ authors: | |||||
| - "@haidyi" | ||||||
| maintainers: | ||||||
| - "@haidyi" | ||||||
| - "@gburnett-nvidia" | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.