Skip to content
Snippets Groups Projects
Commit 1189b925 authored by nfontrod's avatar nfontrod
Browse files

src/nf_modules/Hisat2/test/bam_converter.nf : converting sam to bam

parent e4cefc2f
No related branches found
No related tags found
No related merge requests found
/*
* SAMtools :
* Imputs : sam files
* Output : bam files
*/
/* sam to bam */
params.sam = "$baseDir/data/bam/*.sam"
log.info "sam files : ${params.sam}"
Channel
.fromPath( params.sam )
.ifEmpty { error "Cannot find any sam files matching: ${params.sam}" }
.set { sam_files }
process bam_converter {
tag "$sam"
cpus 4
publishDir "results/mapping/bam/", mode: 'copy'
input:
file sam from sam_files
output:
file "*.bam" into bam_files
script:
"""
samtools view -@ ${task.cpus} -bS ${sam} > ${sam.baseName}.bam
"""
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment