Skip to content

Commit c86dcc3

Browse files
committed
debugged - bismark dedup
1 parent 6f4f8f9 commit c86dcc3

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ work/
22
.nextflow*
33
.DS_Store
44
.nextflow/
5-
pipeline_info/
5+
pipeline_info/
6+
docs/

main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ workflow {
6666

6767
// Read processing
6868
READ_PROCESSING(ch_samples)
69-
READ_PROCESSING.out.trimmed_reads.view { meta, reads -> "Trimmed: ${meta.id}, Reads: ${reads}" }
69+
//READ_PROCESSING.out.trimmed_reads.view { meta, reads -> "Trimmed: ${meta.id}, Reads: ${reads}" }
7070

7171
// Bismark analysis
7272
BISMARK_ANALYSIS(READ_PROCESSING.out.trimmed_reads, ch_index.collect())

modules/bismark.nf

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@ process BISMARK_GENOME_PREPARATION {
1515
script:
1616
"""
1717
mkdir -p genome_dir
18-
mv $genome genome_dir/
18+
cp -L $genome genome_dir/
1919
bismark_genome_preparation --verbose genome_dir
2020
mkdir -p bismark_index
2121
mv genome_dir/* bismark_index/
22+
23+
# Ensure the genome file is not a symlink in the final index
24+
if [ -L bismark_index/$(basename $genome) ]; then
25+
rm bismark_index/$(basename $genome)
26+
cp -L $genome bismark_index/
27+
fi
2228
2329
cat <<-END_VERSIONS > versions.yml
2430
"${task.process}":
@@ -82,7 +88,7 @@ process BISMARK_DEDUPLICATE {
8288
tuple val(meta), path(bam)
8389

8490
output:
85-
tuple val(meta), path("*.deduplicated.bam"), emit: bam
91+
tuple val(meta), path("*.deduplicated.bam"), emit: deduplicated_bam
8692
tuple val(meta), path("*_deduplication_report.txt"), emit: report
8793
path "versions.yml" , emit: versions
8894

@@ -114,7 +120,7 @@ process BISMARK_METHYLATION_EXTRACTOR {
114120
// 'quay.io/biocontainers/bismark:0.23.0--hdfd78af_1' }"
115121

116122
input:
117-
tuple val(meta), path(bam)
123+
tuple val(meta), path(deduplicated_bam)
118124

119125
output:
120126
tuple val(meta), path("*.bedGraph.gz"), emit: bedgraph
@@ -124,7 +130,7 @@ process BISMARK_METHYLATION_EXTRACTOR {
124130

125131
script:
126132
"""
127-
bismark_methylation_extractor --bedGraph --gzip $bam
133+
bismark_methylation_extractor --bedGraph --gzip $deduplicated_bam
128134
cat <<-END_VERSIONS > versions.yml
129135
"${task.process}":
130136
bismark: \$( bismark --version | sed -e "s/Bismark Version: v//g" )

0 commit comments

Comments
 (0)