Skip to content

Commit 446fd49

Browse files
authored
Merge pull request #690 from alexandregilardet/master
added default -doMajorMinor 1 to output angsd beagle format
2 parents c0002a9 + cb84882 commit 446fd49

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2121
- Added exit code `140` to re-tryable exit code list to account for certain scheduler wall-time limit fails.
2222
- [672](https://github.com/nf-core/eager/issues/672) - Removed java parameter from picard tools which could cause memory issues
2323
- [679](https://github.com/nf-core/eager/issues/679) - Refactor within-process bash conditions to groovy/nextflow, due to incompatibility with some servers environments
24+
- [#690](https://github.com/nf-core/eager/pull/690) - Fixed ANGSD output mode for beagle by setting `-doMajorMinor 1` as default in that case
2425

2526
### `Dependencies`
2627

main.nf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ if (params.run_genotyping){
463463
}
464464

465465
if (params.genotyping_tool == 'angsd' && ! ( params.angsd_glformat == 'text' || params.angsd_glformat == 'binary' || params.angsd_glformat == 'binary_three' || params.angsd_glformat == 'beagle' ) ) {
466-
exit 1, "[nf-core/eager] error: please check your ANGSD genotyping model! Options: 'text', 'binary', 'binary_three', 'beagle'. Found parameter: --angsd_glmodel '${params.angsd_glmodel}'."
466+
exit 1, "[nf-core/eager] error: please check your ANGSD output format! Options: 'text', 'binary', 'binary_three', 'beagle'. Found parameter: --angsd_glformat '${params.angsd_glformat}'."
467467
}
468468

469469
if ( !params.angsd_createfasta && params.angsd_fastamethod != 'random' ) {
@@ -2836,10 +2836,11 @@ process genotyping_angsd {
28362836
}
28372837

28382838
def angsd_fasta = !params.angsd_createfasta ? '' : params.angsd_fastamethod == 'random' ? '-doFasta 1 -doCounts 1' : '-doFasta 2 -doCounts 1'
2839+
def angsd_majorminor = params.angsd_glformat != "beagle" ? '' : '-doMajorMinor 1'
28392840
"""
28402841
echo ${bam} > bam.filelist
28412842
mkdir angsd
2842-
angsd -bam bam.filelist -nThreads ${task.cpus} -GL ${angsd_glmodel} -doGlF ${angsd_glformat} ${angsd_fasta} -out ${samplename}.angsd
2843+
angsd -bam bam.filelist -nThreads ${task.cpus} -GL ${angsd_glmodel} -doGlF ${angsd_glformat} ${angsd_majorminor} ${angsd_fasta} -out ${samplename}.angsd
28432844
"""
28442845
}
28452846

0 commit comments

Comments
 (0)