Skip to content

Commit 690169b

Browse files
author
Chenghao Zhu
authored
Merge pull request #30 from uclahs-cds/cz-update-output-dir
fixed error: Unknown method invocation `includeConfig`
2 parents 6f88e2d + 7bed766 commit 690169b

4 files changed

Lines changed: 29 additions & 7 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ Pipelines should be run **WITH A SINGLE SAMPLE AT TIME**. Otherwise resource all
3737

3838
4. See the submission script, [here](https://github.com/uclahs-cds/tool-submit-nf), to submit your pipeline
3939

40+
<b><i> BWA-MEM2 Genome Index </i></b>
41+
The genome index files must be generated by BWA-MEM2 with the correct version. Neither the index from previous version of BWA-MEM2, or from BWA can be accepted. The index files can be generated from a custom genome FASTA using the command below:
42+
43+
```
44+
docker run \
45+
-it --rm \
46+
-v $(pwd):$(pwd) \
47+
-w $(pwd) \
48+
blcdsdockerregistry/align-dna:bwa-mem2-2.1_samtools-1.10 \
49+
bwa-mem2 index genome.fa
50+
```
51+
4052
---
4153

4254
## Flow Diagram

pipeline/align-DNA.nf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ process validate_inputs {
143143
}
144144

145145
// align with bwa mem and convert with samtools
146-
process BWA_mem_SAMtools_Convert_Sam_to_Bam {
146+
process align_BWA_mem_convert_SAM_to_BAM_samtools {
147147
container dockeri_BWA_and_SAMtools
148148

149149
publishDir path: params.bam_output_dir,
@@ -154,7 +154,7 @@ process BWA_mem_SAMtools_Convert_Sam_to_Bam {
154154
publishDir path: params.log_output_dir,
155155
pattern: ".command.*",
156156
mode: "copy",
157-
saveAs: { "BWA_mem_SAMtools_Convert_Sam_to_Bam/${file(read1_fastq).getName()}/log${file(it).getName()}" }
157+
saveAs: { "align_BWA_mem_convert_SAM_to_BAM_samtools/${file(read1_fastq).getSimpleName()}/log${file(it).getName()}" }
158158

159159
memory amount_of_memory
160160
cpus params.bwa_mem_number_of_cpus
@@ -176,7 +176,7 @@ process BWA_mem_SAMtools_Convert_Sam_to_Bam {
176176
tuple(val(library),
177177
val(lane),
178178
file("${library}-${lane}.aligned.bam")
179-
) into och_BWA_mem_SAMtools_Convert_Sam_to_Bam
179+
) into och_align_BWA_mem_convert_SAM_to_BAM_samtools
180180
file ".command.*"
181181

182182
script:
@@ -221,7 +221,7 @@ process PicardTools_SortSam {
221221
tuple(val(library),
222222
val(lane),
223223
file(input_bam)
224-
) from och_BWA_mem_SAMtools_Convert_Sam_to_Bam
224+
) from och_align_BWA_mem_convert_SAM_to_BAM_samtools
225225

226226
// the first value of the tuple will be used as a key to group aligned and filtered bams
227227
// from the same sample and library but different lane together

pipeline/config/align-DNA.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
includeConfig "${projectDir}/config/_pipeline.config"
1+
includeConfig "${projectDir}/config/methods.config"
22

33
params {
44
// sample inputs

pipeline/config/methods.config

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ manifest {
44
name = "align-DNA"
55
author = "Benjamin Carlin"
66
description = "alignment pipeline for paired fastqs DNA samples"
7-
version = "6.0.0"
7+
version = "6.0.1"
88
}
99

1010
params {
@@ -66,7 +66,7 @@ methods {
6666
"Please double check the input.csv: ${params.input_csv} "
6767
)
6868
}
69-
} else {
69+
} else if (params.blcds_registered_dataset_output) {
7070
// TODO: need to valid dataset information
7171
if (!params.containsKey("blcds_disease_id") || !params.containsKey("blcds_dataset_id") ||
7272
!params.containsKey("blcds_patient_id") || !params.containsKey("blcds_sample_id") ||
@@ -147,12 +147,22 @@ methods {
147147
process.cache = params.cache_intermediate_pipeline_steps
148148
}
149149

150+
set_docker_sudo = {
151+
if (params.containsKey("blcds_cluster_slurm") && (!params.blcds_cluster_slurm)) {
152+
docker.sudo = true
153+
}
154+
if (params.containsKey("blcds_mount_dir") && (params.blcds_mount_dir == '/data')) {
155+
docker.sudo = true
156+
}
157+
}
158+
150159
setup = {
151160
methods.set_output_dir()
152161
methods.set_env()
153162
methods.set_process()
154163
methods.set_timeline()
155164
methods.set_trace()
156165
methods.set_report()
166+
methods.set_docker_sudo()
157167
}
158168
}

0 commit comments

Comments
 (0)