-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #655 from FriederikeHanssen/intervals_fasta
Fix --intervals false
- Loading branch information
Showing
8 changed files
with
131 additions
and
42 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 |
---|---|---|
@@ -1,22 +1,28 @@ | ||
process BUILD_INTERVALS { | ||
tag "$fasta_fai" | ||
tag "$meta.id" | ||
|
||
conda (params.enable_conda ? "anaconda::gawk=5.1.0" : null) | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/gawk:5.1.0' : | ||
'quay.io/biocontainers/gawk:5.1.0' }" | ||
|
||
input: | ||
path fasta_fai | ||
tuple val(meta), path(fasta_fai) | ||
|
||
output: | ||
path "*.bed", emit: bed | ||
tuple val(meta), path("${fasta_fai.baseName}.bed") , emit: bed | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
""" | ||
awk -v FS='\t' -v OFS='\t' '{ print \$1, \"0\", \$2 }' ${fasta_fai} > ${fasta_fai.baseName}.bed | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
gawk: \$(awk -Wversion | sed '1!d; s/.*Awk //; s/,.*//') | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// PREPARE CNVKIT REFERENCE | ||
// | ||
|
||
// Initialize channels based on params or indices that were just built | ||
// For all modules here: | ||
// A when clause condition is defined in the conf/modules.config to determine if the module should be run | ||
|
||
include { CNVKIT_ANTITARGET } from '../../modules/nf-core/modules/cnvkit/antitarget/main' | ||
include { CNVKIT_REFERENCE } from '../../modules/nf-core/modules/cnvkit/reference/main' | ||
|
||
workflow PREPARE_CNVKIT_REFERENCE { | ||
take: | ||
fasta // channel: [mandatory] fasta | ||
intervals_bed_combined // channel: [] | ||
|
||
main: | ||
|
||
ch_versions = Channel.empty() | ||
|
||
// prepare a antitarget reference files for tumor_only mode of cnvkit | ||
CNVKIT_ANTITARGET(intervals_bed_combined.flatten().map{ it -> [[id:it[0].baseName], it] }) | ||
CNVKIT_REFERENCE(fasta, intervals_bed_combined, CNVKIT_ANTITARGET.out.bed.map{ meta, bed -> [bed]} ) | ||
|
||
ch_versions = ch_versions.mix(CNVKIT_ANTITARGET.out.versions) | ||
ch_versions = ch_versions.mix(CNVKIT_REFERENCE.out.versions) | ||
|
||
emit: | ||
versions = ch_versions | ||
cnvkit_reference = CNVKIT_REFERENCE.out.cnn | ||
} | ||
|
||
|
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