forked from grbot/cram-qc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.nf
39 lines (29 loc) · 831 Bytes
/
main.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env nextflow
params.input = null
drsuris = Channel.fromList(params.input)
def helpMessage(message) {
log.info"""
${message}
Get the header of a SAM/BAM/CRAM file using samtools head and print to stdout
Usage:
nextflow run yash-puligundla/samtools-head-nf --input \${INPUT}
Mandatory arguments:
--input [string] local path or URL to input SAM/BAM/CRAM
Optional arguments:
--help [flag] display this help message and exit
""".stripIndent()
}
if (params.help) exit 0, helpMessage("")
if (input == null) {
exit 1, helpMessage("ERROR: no --input specified")
}
process samtools_head {
input:
drsuri from drsuris
output:
path "output_samtools_head.txt"
script:
"""
samtools head ${drsuri} > output_samtools_head.txt
"""
}