Skip to content

Commit

Permalink
remove soft-linking of fasta instead stage in dir (#7081)
Browse files Browse the repository at this point in the history
* remove soft-linking of fasta instead stage in dir

* add comments for fasta stageAs
  • Loading branch information
sateeshperi authored Nov 26, 2024
1 parent 426f3c8 commit 7992214
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 29 deletions.
10 changes: 4 additions & 6 deletions modules/nf-core/bismark/align/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ process BISMARK_ALIGN {

input:
tuple val(meta), path(reads)
tuple val(meta2), path(fasta)
tuple val(meta2), path(fasta, stageAs: 'tmp/*') // This change mounts as directory containing the FASTA file to prevent nested symlinks
tuple val(meta3), path(index)

output:
Expand Down Expand Up @@ -56,13 +56,11 @@ process BISMARK_ALIGN {
}
}
"""
ln -sf \$(readlink $fasta) $index/$fasta
bismark \\
$fastq \\
--genome $index \\
${fastq} \\
--genome ${index} \\
--bam \\
$args
${args}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
12 changes: 4 additions & 8 deletions modules/nf-core/bismark/coverage2cytosine/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ process BISMARK_COVERAGE2CYTOSINE {

input:
tuple val(meta), path(coverage_file)
tuple val(meta2), path(fasta)
tuple val(meta2), path(fasta, stageAs: 'tmp/*') // This change mounts as directory containing the FASTA file to prevent nested symlinks
tuple val(meta3), path(index)

output:
Expand All @@ -25,16 +25,12 @@ process BISMARK_COVERAGE2CYTOSINE {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
if [ ! -f $index/$fasta ]; then
ln -s \$(readlink $fasta) $index/$fasta;
fi
coverage2cytosine \\
$coverage_file \\
--genome $index \\
${coverage_file} \\
--genome ${index} \\
--output ${prefix} \\
--gzip \\
$args
${args}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/bismark/deduplicate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ process BISMARK_DEDUPLICATE {
def seqtype = meta.single_end ? '-s' : '-p'
"""
deduplicate_bismark \\
$args \\
$seqtype \\
--bam $bam
${args} \\
${seqtype} \\
--bam ${bam}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
4 changes: 1 addition & 3 deletions modules/nf-core/bismark/genomepreparation/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ process BISMARK_GENOMEPREPARATION {
def args = task.ext.args ?: ''
"""
bismark_genome_preparation \\
$args \\
${args} \\
BismarkIndex
rm $fasta
cat <<-END_VERSIONS > versions.yml
"${task.process}":
bismark: \$(echo \$(bismark -v 2>&1) | sed 's/^.*Bismark Version: v//; s/Copyright.*\$//')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
"BS_GA.rev.2.bt2:md5,d36044c5dfe37af0411f60d446585bc6",
"genome_mfa.GA_conversion.fa:md5,e529375ec2039112161465b5169fcd59"
]
]
],
"genome.fasta:md5,6e9fe4042a72f2345f644f239272b7e6"
]
]
],
Expand Down Expand Up @@ -134,7 +135,8 @@
"BS_GA.rev.2.bt2:md5,d36044c5dfe37af0411f60d446585bc6",
"genome_mfa.GA_conversion.fa:md5,e529375ec2039112161465b5169fcd59"
]
]
],
"genome.fasta:md5,6e9fe4042a72f2345f644f239272b7e6"
]
]
],
Expand All @@ -144,9 +146,9 @@
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
"nf-test": "0.9.2",
"nextflow": "24.10.1"
},
"timestamp": "2024-10-13T08:26:20.352083082"
"timestamp": "2024-11-25T15:32:55.125985002"
}
}
6 changes: 3 additions & 3 deletions modules/nf-core/bismark/methylationextractor/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ process BISMARK_METHYLATIONEXTRACTOR {
def seqtype = meta.single_end ? '-s' : '-p'
"""
bismark_methylation_extractor \\
$bam \\
${bam} \\
--bedGraph \\
--counts \\
--gzip \\
--report \\
$seqtype \\
$args
${seqtype} \\
${args}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/bismark/report/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ process BISMARK_REPORT {
script:
def args = task.ext.args ?: ''
"""
bismark2report $args
bismark2report ${args}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down

0 comments on commit 7992214

Please sign in to comment.