forked from nf-core/atacseq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed nf-core#164 - Introduced 4/5bp shift as it is common for ATAC-s…
…eq data. Fixed nf-core#168 - Always write out genome fa and fai so IGV session file can be opened.
- Loading branch information
Showing
7 changed files
with
216 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
process DEEPTOOLS_ALIGNMENTSIEVE { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda "bioconda::deeptools=3.5.1" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/deeptools:3.5.1--py_0' : | ||
'biocontainers/deeptools:3.5.1--py_0' }" | ||
|
||
input: | ||
tuple val(meta), path(bam), path(bai) | ||
|
||
output: | ||
tuple val(meta), path("*.bam"), emit: bam | ||
path "versions.yml", emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
||
""" | ||
alignmentSieve \\ | ||
$args \\ | ||
-b $bam \\ | ||
-o ${prefix}.bam \\ | ||
--numberOfProcessors $task.cpus | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
deeptools: \$(alignmentSieve --version | sed -e "s/alignmentSieve //g") | ||
END_VERSIONS | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
include { SAMTOOLS_SORT } from '../../modules/nf-core/samtools/sort/main' | ||
include { SAMTOOLS_INDEX } from '../../modules/nf-core/samtools/index/main' | ||
include { DEEPTOOLS_ALIGNMENTSIEVE } from '../../modules/local/deeptools_alignmentsieve' | ||
|
||
workflow BAM_SHIFT_READS { | ||
take: | ||
ch_bam_bai // channel: [ val(meta), [ bam ], [bai] ] | ||
|
||
main: | ||
ch_versions = Channel.empty() | ||
|
||
// | ||
// Shift reads | ||
// | ||
DEEPTOOLS_ALIGNMENTSIEVE ( | ||
ch_bam_bai | ||
) | ||
ch_versions = ch_versions.mix(DEEPTOOLS_ALIGNMENTSIEVE.out.versions) | ||
|
||
// | ||
// Sort reads | ||
// | ||
SAMTOOLS_SORT ( | ||
DEEPTOOLS_ALIGNMENTSIEVE.out.bam | ||
) | ||
ch_versions = ch_versions.mix(SAMTOOLS_SORT.out.versions) | ||
|
||
// | ||
// Index reads | ||
// | ||
SAMTOOLS_INDEX ( | ||
SAMTOOLS_SORT.out.bam | ||
) | ||
ch_versions = ch_versions.mix(SAMTOOLS_INDEX.out.versions) | ||
|
||
emit: | ||
bam = SAMTOOLS_SORT.out.bam // channel: [ val(meta), [ bam ] ] | ||
bai = SAMTOOLS_INDEX.out.bai // channel: [ val(meta), [ bai ] ] | ||
versions = ch_versions // channel: [ versions.yml ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters