Skip to content

Commit 7f10eae

Browse files
authored
Merge pull request #639 from jfy133/circularmapper-filter-fix
Circularmapper filter fix
2 parents b760924 + 7e262c9 commit 7f10eae

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1414
- Removed leftover old DockerHub push CI commands.
1515
- [#627](https://github.com/nf-core/eager/issues/627) - Added de Barros Damgaard citation to README
1616
- [#630](https://github.com/nf-core/eager/pull/630) - Better handling of Qualimap memory requirements and error strategy.
17-
- Fixed some imcomplete schema options to ensure users supply valid input values
17+
- Fixed some incomplete schema options to ensure users supply valid input values
18+
- [#638](https://github.com/nf-core/eager/issues/638#issuecomment-748877567) Fixed inverted circularfilter filtering (previously filtering would happen by default, not when requested by user as originally recorded in documentation)
1819

1920
### `Dependencies`
2021

main.nf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def helpMessage() {
8787
--bwaalnl [num] Specify the -l parameter for BWA aln, i.e. length of seeds to be used. Set to 1024 for whole read. Default: ${params.bwaalnl}
8888
--circularextension [num] Specify the number of bases to extend reference by (circularmapper only). Default: ${params.circularextension}
8989
--circulartarget [chr] Specify the FASTA header of the target chromosome to extend(circularmapper only). Default: '${params.circulartarget}'
90-
--circularfilter [bool] Turn on to filter off-target reads (circularmapper only).
90+
--circularfilter [bool] Turn on to remove reads that did not map to the circularised genome (circularmapper only).
9191
--bt2_alignmode [str] Specify the bowtie2 alignment mode. Options: 'local', 'end-to-end'. Default: '${params.bt2_alignmode}'
9292
--bt2_sensitivity [str] Specify the level of sensitivity for the bowtie2 alignment mode. Options: 'no-preset', 'very-fast', 'fast', 'sensitive', 'very-sensitive'. Default: '${params.bt2_sensitivity}'
9393
--bt2n [num] Specify the -N parameter for bowtie2 (mismatches in seed). This will override defaults from alignmode/sensitivity. Default: ${params.bt2n}
@@ -1549,6 +1549,7 @@ process circulargenerator{
15491549
else null
15501550
}
15511551

1552+
15521553
input:
15531554
file fasta from ch_fasta_for_circulargenerator
15541555

@@ -1586,7 +1587,7 @@ process circularmapper{
15861587
params.mapper == 'circularmapper'
15871588

15881589
script:
1589-
def filter = params.circularfilter ? '' : '-f true -x false'
1590+
def filter = params.circularfilter ? '-f true -x true' : ''
15901591
def elongated_root = "${fasta.baseName}_${params.circularextension}.fasta"
15911592
def size = params.large_ref ? '-c' : ''
15921593

nextflow_schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,9 +555,9 @@
555555
},
556556
"circularfilter": {
557557
"type": "boolean",
558-
"description": "Turn on to filter off-target reads (circularmapper only).",
558+
"description": "Turn on to remove reads that did not map to the circularised genome (circularmapper only).",
559559
"fa_icon": "fas fa-filter",
560-
"help_text": "If you want to filter out reads that don't map to a circular chromosome, turn this on. By default this option is turned off.\n"
560+
"help_text": "If you want to filter out reads that don't map to a circular chromosome (and also non-circular chromosome headers) from the resulting BAM file, turn this on. By default this option is turned off.\n> Modifies -f and -x parameters of CircularMapper's realignsamfile\n"
561561
},
562562
"bt2_alignmode": {
563563
"type": "string",
@@ -1601,4 +1601,4 @@
16011601
"$ref": "#/definitions/metagenomic_authentication"
16021602
}
16031603
]
1604-
}
1604+
}

0 commit comments

Comments
 (0)