-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clincnv #11
Open
BertGalle
wants to merge
5
commits into
nf-cmgg:dev
Choose a base branch
from
BertGalle:clincnv
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Clincnv #11
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,7 @@ | ||
name: ngs-env | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- ngs-bits=2023_02 |
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,44 @@ | ||||||
process BEDANNOTATEGC { | ||||||
|
||||||
conda "${moduleDir}/environment.yml" | ||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||||||
'https://depot.galaxyproject.org/singularity/ngs-bits:2023_02--py311ha0b7adc_2' : | ||||||
'biocontainers/ngs-bits:2023_02--py311ha0b7adc_2' }" | ||||||
|
||||||
publishDir "$params.outdir/clincnv", mode: 'copy' | ||||||
|
||||||
input: | ||||||
tuple val(meta), path(exon_target) | ||||||
tuple val(meta2), path(fasta) | ||||||
tuple val(meta3), path(fai) | ||||||
|
||||||
output: | ||||||
path("*.bed"), emit: annotatedbed | ||||||
path "versions.yml", emit:versions | ||||||
|
||||||
script: | ||||||
def args = task.ext.args ?: '' | ||||||
""" | ||||||
BedAnnotateGC \\ | ||||||
-in $exon_target \\ | ||||||
-out GC_Annotated_$exon_target \\ | ||||||
-ref $fasta \\ | ||||||
|
||||||
awk -F'\\t' '{OFS="\\t"; print \$1, \$2, \$3, \$5, \$4}' GC_Annotated_$exon_target > tmp && mv tmp GC_Annotated_$exon_target | ||||||
|
||||||
cat <<-END_VERSIONS > versions.yml | ||||||
"${task.process}": | ||||||
BedAnnotateGC: \$(BedAnnotateGC --version | sed 's/BedAnnotateGC //g') | ||||||
END_VERSIONS | ||||||
""" | ||||||
|
||||||
stub: | ||||||
""" | ||||||
touch GC_Annotated.bed | ||||||
|
||||||
cat <<-END_VERSIONS > versions.yml | ||||||
"${task.process}": | ||||||
BedCoverage: \$(BedCoverage --version | sed 's/BedCoverage //g') | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: ngs-env | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- ngs-bits=2023_02 |
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,48 @@ | ||
process BEDCOVERAGE { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/ngs-bits:2023_02--py311ha0b7adc_2' : | ||
'biocontainers/ngs-bits:2023_02--py311ha0b7adc_2' }" | ||
|
||
publishDir "$params.outdir/clincnv/counts/$meta.pool", mode: 'copy' | ||
|
||
input: | ||
tuple val(meta), path(bam), path(bai) | ||
tuple val(meta2), path(exon_target) | ||
|
||
output: | ||
tuple val(meta), path("*.cov"), emit: counts | ||
path "versions.yml", emit:versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
""" | ||
BedCoverage \\ | ||
-bam $bam \\ | ||
-in $exon_target \\ | ||
$args \\ | ||
-threads $task.cpus \\ | ||
-out ${meta.id}.cov | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
BedCoverage: \$(BedCoverage --version | sed 's/BedCoverage //g') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
""" | ||
touch ${meta.id}.cov | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
BedCoverage: \$(BedCoverage --version | sed 's/BedCoverage //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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: clincnv | ||
channels: | ||
- bioconda | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- r-base=4.2.3 | ||
- r-rcpp=1.0.11 | ||
- r-optparse=1.7.5 | ||
- r-robustbase=0.95_1 | ||
- r-data.table=1.14.8 | ||
- r-foreach=1.5.2 | ||
- r-doparallel=1.0.17 | ||
- r-mclust=6.0.0 | ||
- r-r.utils=2.12.2 | ||
- r-rcolorbrewer=1.1_3 | ||
- r-party=1.3_13 | ||
- r-dbscan=1.1_11 | ||
- r-umap=0.2.10.0 | ||
- r-mass=7.3_60 |
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,51 @@ | ||
process GERMLINE { | ||
tag "$sample" | ||
|
||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/cmgg/clincnv:1.18.3': | ||
'cmgg/clincnv:1.18.3' }" | ||
conda "${moduleDir}/environment.yml" | ||
|
||
publishDir "$params.outdir/clincnv/calling", mode: 'copy' | ||
|
||
input: | ||
tuple val(meta), val(sample), path(file) | ||
path(bed) | ||
|
||
output: | ||
tuple val(meta), val(sample), path("*.tsv"), emit: tsv | ||
path "versions.yml", emit: versions | ||
|
||
script: | ||
def publishDir = "$params.outdir/clincnv/calling/" | ||
def bedDir = "$params.outdir/clincnv" | ||
def fileDir = "$params.outdir/clincnv/counts/$meta.id" | ||
def args = task.ext.args ?: '' | ||
def VERSION = '1.19.0' | ||
""" | ||
clinCNV.R \\ | ||
--normal ${fileDir}/${file} \\ | ||
--normalSample=${sample} \\ | ||
--bed ${bedDir}/${bed} \\ | ||
--out ${publishDir} \\ | ||
$args | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
ClinCNV: ${VERSION} | ||
R: \$(Rscript --version | sed 's/R scripting front-end //g') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def VERSION = '1.19.0' | ||
""" | ||
touch ${sample}.ready_CNVS.tsv | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
ClinCNV: ${VERSION} | ||
R: \$(Rscript --version | sed 's/R scripting front-end //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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: clincnv | ||
channels: | ||
- bioconda | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- r-base=4.2.3 | ||
- r-rcpp=1.0.11 | ||
- r-optparse=1.7.5 | ||
- r-robustbase=0.95_1 | ||
- r-data.table=1.14.8 | ||
- r-foreach=1.5.2 | ||
- r-doparallel=1.0.17 | ||
- r-mclust=6.0.0 | ||
- r-r.utils=2.12.2 | ||
- r-rcolorbrewer=1.1_3 | ||
- r-party=1.3_13 | ||
- r-dbscan=1.1_11 | ||
- r-umap=0.2.10.0 | ||
- r-mass=7.3_60 |
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,48 @@ | ||
// MERGE COUNT FILES | ||
process COVERAGE_MERGE { | ||
tag "$meta.id" | ||
|
||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/cmgg/clincnv:1.18.3': | ||
'cmgg/clincnv:1.18.3' }" | ||
conda "${moduleDir}/environment.yml" | ||
|
||
publishDir "$params.outdir/clincnv/counts/$meta.id", mode: 'copy' | ||
|
||
input: | ||
tuple val(meta), val(samples), path(file) | ||
|
||
output: | ||
tuple val(meta), val(samples), path("*.txt"), emit: merge | ||
path "versions.yml", emit:versions | ||
|
||
script: | ||
def prefix = task.ext.prefix ?: "${meta.id}.normal" | ||
def args = task.ext.args ?: '' | ||
def VERSION = '1.19.0' | ||
""" | ||
mergeFilesFromFolderDT.R \\ | ||
-i ${file} \\ | ||
-o ${prefix}.txt \\ | ||
$args | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
ClinCNV: ${VERSION} | ||
R: \$(Rscript --version | sed 's/R scripting front-end //g') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
prefix = task.ext.prefix ?: "${meta.id}" | ||
def VERSION = '1.19.0' | ||
""" | ||
touch ${prefix}.txt | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
ClinCNV: ${VERSION} | ||
R: \$(Rscript --version | sed 's/R scripting front-end //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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
process PATHFILE { | ||
tag "$meta.id" | ||
|
||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/coreutils:9.3' : | ||
'biocontainers/coreutils:9.3' }" | ||
|
||
publishDir "$params.outdir/clincnv/counts/$meta.id", mode: 'copy' | ||
|
||
input: | ||
tuple val(meta), val(samples), path(files) | ||
|
||
output: | ||
tuple val(meta), val(samples), path("*.txt"), emit: counts | ||
|
||
script: | ||
def prefix = task.ext.prefix ?: "${meta.id}_paths" | ||
def publishDir = "$params.outdir/clincnv/counts/$meta.id" | ||
def fileList = files.collect(file -> "${publishDir}/${file}").join('\n') | ||
""" | ||
echo -e "${fileList}" > ${prefix}.txt | ||
""" | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding the
CLINCNV_
prefix to all these modules will help in keeping it clear that these modules are part of the clincnv toolkit. Can this be added to each created process here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or NVM this is part of
ngs-bits
. Can this be updated to theNGSBITS_
prefix instead and be moved to a correct subfolder calledngsbits
? This will keep it clear from where the tool comes :)