Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.

Commit eba00bc

Browse files
committed
fixed IGDATA bad substitution issue
1 parent 1c7f62a commit eba00bc

File tree

3 files changed

+40
-26
lines changed

3 files changed

+40
-26
lines changed

conf/base.config

+9
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,20 @@ process {
6868
cpus = 2
6969
memory = { 10.GB * task.attempt }
7070
}
71+
//SIMON CHANGED
72+
/*
7173
withName: tracer_summarise {
7274
queue = 'long'
7375
cpus = 8
7476
memory = { 30.GB * task.attempt }
7577
}
78+
*/
79+
withName: tracer_summarise{
80+
cpus = 16
81+
memory = 256.GB
82+
queue = 'basement'
83+
time = 720.h
84+
}
7685
withName: multiqc {
7786
errorStrategy = { task.exitStatus == 130 ? 'retry' : 'ignore' }
7887
cpus = { 1 * task.attempt }

conf/lsf.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ executor {
77
}
88

99
process {
10-
queue = 'normal'
10+
queue = 'long'
1111
}
1212

main.nf

+30-25
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ vim: syntax=groovy
99
Documentation: https://github.com/cellgeni/rnaseq
1010
This pipeline was forked from https://github.com/nf-core/rnaseq
1111
Post-fork development at Wellcome Sanger Institute:
12+
Simon Murray <[email protected]>
1213
Stijn van Dongen <[email protected]>
1314
Vladimir Kiselev @wikiselev <[email protected]>
1415
Original development by SciLifeLabs
@@ -285,14 +286,15 @@ process get_fastq_files_single {
285286
output:
286287
set val(samplename), file("${samplename}.fastq.gz") optional true into ch_fastqs_dirse
287288
file('numreads.txt') optional true into ch_numreads_fastq_se
288-
shell:
289+
script:
289290
'''
290-
name=!{params.fastqdir}/!{samplename}!{params.se_suffix}
291+
name=${params.fastqdir}/${samplename}${params.se_suffix}
291292
if [[ ! -e $name ]]; then
292293
echo "Fastq file $name not found"
293294
false
294295
else
295-
ln -s $name !{samplename}.fastq.gz
296+
ln -s $name ${samplename}.fastq.gz
297+
# Need single quotes to allow reads calculation to work
296298
echo $(( $(zcat $fname | wc -l) / 4)) > numreads.txt
297299
fi
298300
'''
@@ -313,13 +315,14 @@ process get_fastq_files_from_bam {
313315
set val(samplename), file("${samplename}_?.fastq.gz") optional true into ch_bams_dirpe
314316
file('numreads.txt') optional true into ch_numreads_bam
315317

316-
shell:
318+
script:
317319
'''
318-
bam="!{params.bamdir}/!{samplename}.bam"
319-
f1="!{samplename}_1.fastq.gz"
320-
f2="!{samplename}_2.fastq.gz"
320+
bam="${params.bamdir}/${samplename}.bam"
321+
f1="${samplename}_1.fastq.gz"
322+
f2="${samplename}_2.fastq.gz"
321323
if [[ -e $bam ]]; then
322324
samtools fastq -N -F 0x900 -@ !{task.cpus} -1 $f1 -2 $f2 $bam
325+
# Need single quotes to allow reads calculation to work
323326
echo $(( $(zcat $f1 | wc -l) / 2)) > numreads.txt
324327
else
325328
echo "File $bam not found"
@@ -342,22 +345,23 @@ process get_fastq_files {
342345
set val(samplename), file("${samplename}_?.fastq.gz") optional true into ch_fastqs_dirpe
343346
file('numreads.txt') optional true into ch_numreads_fastq
344347
file('*.lostcause.txt') optional true into ch_lostcause_fastq
345-
shell:
348+
script:
346349
'''
347-
list=( $(ls !{params.fastqdir}/!{samplename}!{params.pe_suffix_pattern}) )
350+
# Need single quotes to allow list generation to work
351+
list=( $(ls ${params.fastqdir}/${samplename}${params.pe_suffix_pattern}) )
348352
if [[ 2 == ${#list[@]} ]]; then
349353
f1=${list[0]}
350354
f2=${list[1]}
351355
numreads=$(( $(zcat $f1 | wc -l) / 4))
352356
echo $numreads > numreads.txt
353-
if (( numreads < !{params.min_reads} )); then
354-
echo -e "!{samplename}\\tfastqdir\\tlowreads" > !{samplename}.lostcause.txt
357+
if (( numreads < ${params.min_reads} )); then
358+
echo -e "${samplename}\\tfastqdir\\tlowreads" > ${samplename}.lostcause.txt
355359
else
356-
ln -s $f1 !{samplename}_1.fastq.gz
357-
ln -s $f2 !{samplename}_2.fastq.gz
360+
ln -s $f1 ${samplename}_1.fastq.gz
361+
ln -s $f2 ${samplename}_2.fastq.gz
358362
fi
359363
else
360-
echo -e "!{samplename}\\tfastqdir\\tnotpaired" > !{samplename}.lostcause.txt
364+
echo -e "${samplename}\\tfastqdir\\tnotpaired" > ${samplename}.lostcause.txt
361365
fi
362366
'''
363367
}
@@ -543,7 +547,8 @@ process tracer_assemble {
543547
fragoptions = "--fragment_length ${params.tracer_fraglength} --fragment_sd ${params.tracer_fragsd}"
544548
ending = params.singleend ? "--single_end $fragoptions" : ""
545549
'''
546-
export IGDATA=${params.IGDATA}
550+
# Need shell rather than script and single quotes to allow reads_stem iteration to work
551+
export IGDATA=!{params.IGDATA}
547552
# ? output created in out_asm/out-${samplename}
548553
for f in !{reads_stem}; do
549554
zcat $f!{params.se_suffix} > $f
@@ -565,13 +570,13 @@ process tracer_summarise {
565570
output:
566571
file('in_asm/filtered_TCRABDG_summary')
567572

568-
shell:
573+
script:
569574
spec = params.tracer_genometag
570-
'''
575+
"""
571576
# all the output directories of the form out-{samplename} are subdirectories of in_asm.
572-
tracer summarise --loci A B D G -p !{task.cpus} -s !{spec} -c /tracer/docker_helper_files/docker_tracer.conf in_asm
577+
tracer summarise --loci A B D G -p ${task.cpus} -s ${spec} -c /tracer/docker_helper_files/docker_tracer.conf in_asm
573578
echo done
574-
'''
579+
"""
575580
}
576581

577582

@@ -1001,17 +1006,17 @@ process merge_featureCounts {
10011006
output:
10021007
file '*-fc-genecounts.txt'
10031008

1004-
shell:
1009+
script:
10051010
suffix=['star':'.star.gene.fc.txt', 'hisat2':'.hisat2.gene.fc.txt']
10061011
aligner = metafile.baseName // not strictly necessary
10071012
outputname = "${params.runtag}-${aligner}-fc-genecounts.txt"
10081013
thesuffix = suffix[aligner] ?: '.txt'
1009-
'''
1010-
python3 !{workflow.projectDir}/bin/merge_featurecounts.py \\
1011-
--rm-suffix !{thesuffix} \\
1014+
"""
1015+
python3 ${workflow.projectDir}/bin/merge_featurecounts.py \\
1016+
--rm-suffix ${thesuffix} \\
10121017
-c 1 --skip-comments --header \\
1013-
-o !{outputname} -I !{metafile}
1014-
'''
1018+
-o ${outputname} -I ${metafile}
1019+
"""
10151020
}
10161021

10171022
process merge_salmoncounts {

0 commit comments

Comments
 (0)