Skip to content

Commit

Permalink
Merge pull request #16 from nf-core/dev
Browse files Browse the repository at this point in the history
Get latest dev
  • Loading branch information
jfy133 authored May 14, 2021
2 parents 62a0c29 + 3e571d5 commit 5ad1ef5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## v2.3.5dev - [date]

- [#722](https://github.com/nf-core/eager/issues/722) - Adds bwa `-o` flag for more flexibility in bwa parameters

### `Added`

- [https://github.com/nf-core/eager/issues/736] - Add printing of multiqc run report location on successful completion

### `Fixed`

- [#723](https://github.com/nf-core/eager/issues/723) - Fixes empty fields in TSV resulting in uninformative error
Expand Down
9 changes: 5 additions & 4 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -1160,15 +1160,15 @@ process bwa {
//PE data without merging, PE data without any AR applied
if ( seqtype == 'PE' && ( params.skip_collapse || params.skip_adapterremoval ) ){
"""
bwa aln -t ${task.cpus} $fasta ${r1} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f ${libraryid}.r1.sai
bwa aln -t ${task.cpus} $fasta ${r2} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f ${libraryid}.r2.sai
bwa aln -t ${task.cpus} $fasta ${r1} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -o ${params.bwaalno} -f ${libraryid}.r1.sai
bwa aln -t ${task.cpus} $fasta ${r2} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -o ${params.bwaalno} -f ${libraryid}.r2.sai
bwa sampe -r "@RG\\tID:ILLUMINA-${libraryid}\\tSM:${libraryid}\\tPL:illumina\\tPU:ILLUMINA-${libraryid}-${seqtype}" $fasta ${libraryid}.r1.sai ${libraryid}.r2.sai ${r1} ${r2} | samtools sort -@ ${task.cpus} -O bam - > ${libraryid}_"${seqtype}".mapped.bam
samtools index "${libraryid}"_"${seqtype}".mapped.bam ${size}
"""
} else {
//PE collapsed, or SE data
//PE collapsed, or SE data
"""
bwa aln -t ${task.cpus} ${fasta} ${r1} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f ${libraryid}.sai
bwa aln -t ${task.cpus} ${fasta} ${r1} -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -o ${params.bwaalno} -f ${libraryid}.sai
bwa samse -r "@RG\\tID:ILLUMINA-${libraryid}\\tSM:${libraryid}\\tPL:illumina\\tPU:ILLUMINA-${libraryid}-${seqtype}" $fasta ${libraryid}.sai $r1 | samtools sort -@ ${task.cpus} -O bam - > "${libraryid}"_"${seqtype}".mapped.bam
samtools index "${libraryid}"_"${seqtype}".mapped.bam ${size}
"""
Expand Down Expand Up @@ -3128,6 +3128,7 @@ workflow.onComplete {

if (workflow.success) {
log.info "-${c_purple}[nf-core/eager]${c_green} Pipeline completed successfully${c_reset}-"
log.info "-${c_purple}[nf-core/eager]${c_green} MultiQC run report can be found in ${params.outdir}/multiqc ${c_reset}-"
} else {
checkHostname()
log.info "-${c_purple}[nf-core/eager]${c_red} Pipeline completed with errors${c_reset}-"
Expand Down
3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ params {
bwaalnn = 0.04
bwaalnk = 2
bwaalnl = 1024 // From Schubert et al. 2012 (10.1186/1471-2164-13-178)
bwaalno = 1 // leave at bwa default for now
circularextension = 500
circulartarget = 'MT'
circularfilter = false
Expand Down Expand Up @@ -394,7 +395,7 @@ manifest {
homePage = 'https://github.com/nf-core/eager'
description = 'A fully reproducible and state-of-the-art ancient DNA analysis pipeline'
mainScript = 'main.nf'
nextflowVersion = '!>=20.07.1'
nextflowVersion = '>=20.07.1'
version = '2.3.5dev'
}

Expand Down
7 changes: 7 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,13 @@
"fa_icon": "fas fa-ruler-horizontal",
"help_text": "Configures the length of the seed used in `bwa aln -l`. Default is set to be 'turned off' at the recommendation of Schubert et al. ([2012 _BMC Genomics_](https://doi.org/10.1186/1471-2164-13-178)) for ancient DNA with `1024`.\n\nNote: Despite being recommended, turning off seeding can result in long runtimes!\n\n> Modifies BWA aln parameter: `-l`\n"
},
"bwaalno": {
"type": "integer",
"default": 1,
"fa_icon": "fas fa-people-arrows",
"description": "Specify the -o parameter for BWA aln i.e. the number of gaps allowed.",
"help_text": "Configures the number of gaps used in `bwa aln`. Default is set to `bwa` default.\n\n> Modifies BWA aln parameter: `-o`\n"
},
"circularextension": {
"type": "integer",
"default": 500,
Expand Down

0 comments on commit 5ad1ef5

Please sign in to comment.