Skip to content
Snippets Groups Projects
Unverified Commit c5a7aa0f authored by Laurent Modolo's avatar Laurent Modolo
Browse files

Merge branch 'dev'

parents 03283317 a2f9dcc6
No related branches found
No related tags found
No related merge requests found
params.bam = "$baseDir/data/bam/*.bam"
log.info "bams files : ${params.bam}"
Channel
.fromPath( params.bam )
.ifEmpty { error "Cannot find any bam files matching: ${params.bam}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { bam_files }
process index_bam {
tag "$file_id"
cpus 4
input:
set file_id, file(bam) from bam_files
output:
set file_id, "*.bam*" into indexed_bam_file
script:
"""
sambamba index -t ${task.cpus} ${bam}
"""
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$sort_bam {
container = "sambamba:0.6.7"
}
}
}
sge {
process{
$sort_bam {
beforeScript = "module purge; module load sambamba/0.6.7"
}
}
}
}
params.bam = "$baseDir/data/bam/*.bam"
log.info "bams files : ${params.bam}"
Channel
.fromPath( params.bam )
.ifEmpty { error "Cannot find any bam files matching: ${params.bam}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { bam_files }
process sort_bam {
tag "$file_id"
cpus 4
input:
set file_id, file(bam) from bam_files
output:
set file_id, "*_sorted.bam" into sorted_bam_files
script:
"""
sambamba sort -t ${task.cpus} -o ${file_id}_sorted.bam ${bam}
"""
}
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$split_bam {
container = "sambamba:0.6.7"
}
}
}
sge {
process{
$split_bam {
beforeScript = "module purge; module load sambamba/0.6.7"
}
}
}
}
params.bam = "$baseDir/data/bam/*.bam"
log.info "bams files : ${params.bam}"
Channel
.fromPath( params.bam )
.ifEmpty { error "Cannot find any bam files matching: ${params.bam}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { bam_files }
process split_bam {
tag "$file_id"
cpus 4
input:
set file_id, file(bam) from bam_files
output:
set file_id, "*_forward.bam*" into forward_bam_files
set file_id, "*_reverse.bam*" into reverse_bam_files
script:
"""
sambamba view -t ${task.cpus} -h -F "strand == '+'" ${bam} > ${file_id}_forward.bam
sambamba view -t ${task.cpus} -h -F "strand == '-'" ${bam} > ${file_id}_reverse.bam
"""
}
./nextflow src/nf_modules/sambamba/sort_bams.nf \
-c src/nf_modules/sambamba/sort_bams.config \
-profile docker \
--bam "data/tiny_dataset/map/tiny_v2.bam"
./nextflow src/nf_modules/sambamba/index_bams.nf \
-c src/nf_modules/sambamba/index_bams.config \
-profile docker \
--bam "data/tiny_dataset/map/tiny_v2.sort.bam"
./nextflow src/nf_modules/sambamba/split_bams.nf \
-c src/nf_modules/sambamba/split_bams.config \
-profile docker \
--bam "data/tiny_dataset/map/tiny_v2.bam"
profiles {
docker {
docker.temp = 'auto'
docker.enabled = true
process {
$dedup_sam {
container = "samblaster:0.1.24"
}
}
}
sge {
process{
$dedup_sam {
beforeScript = "module purge; module load samblaster/0.1.24"
}
}
}
}
params.sam = "$baseDir/data/sam/*.sam"
log.info "sams files : ${params.sam}"
Channel
.fromPath( params.sam )
.ifEmpty { error "Cannot find any sam files matching: ${params.sam}" }
.map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
.set { sam_files }
process dedup_sam {
tag "$file_id"
cpus 4
input:
set file_id, file(sam) from sam_files
output:
set file_id, "*_dedup.sam*" into dedup_sam_files
script:
"""
samblaster --addMateTags -i ${sam} -o ${file_id}_dedup.sam
"""
}
./nextflow src/nf_modules/samblaster/dedup_sams.nf \
-c src/nf_modules/samblaster/dedup_sams.config \
-profile docker \
--sam "data/tiny_dataset/map/tiny_v2.sam"
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