Skip to content

Commit

Permalink
adds option to keep hom-ref variants
Browse files Browse the repository at this point in the history
  • Loading branch information
brwnj committed Aug 21, 2019
1 parent 36f8f48 commit 686f67e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ nextflow run brwnj/smoove-nf -latest \
+ `--sexchroms`
+ Comma delimited names of the sex chromosome(s) used to infer sex, e.g. `--sexchroms 'chrX,chrY'`
+ **default:** 'X,Y'
+ `--homref`
+ Keep hom-ref variants that are normally filtered when using `smoove genotype`
+ **default:** false

#### [covviz](https://github.com/brwnj/covviz) params
+ `--zthreshold`
Expand Down
4 changes: 4 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ params.knownsites = false
params.ped = false

// variables
homref = params.homref ?: false
project = params.project ?: 'sites'
sexchroms = params.sexchroms ?: 'X,Y'
sexchroms = sexchroms.replaceAll(" ", "")
Expand Down Expand Up @@ -137,7 +138,10 @@ process smoove_genotype {
file("${sample}-smoove.genotyped.vcf.gz") into genotyped_vcfs

script:
include_homref = params.homref ? "export SMOOVE_KEEP_ALL=KEEP" : ""
"""
$include_homref
wget -q https://raw.githubusercontent.com/samtools/samtools/develop/misc/seq_cache_populate.pl
perl seq_cache_populate.pl -root \$(pwd)/cache $fasta 1> /dev/null 2> err || (cat err; exit 2)
export REF_PATH=\$(pwd)/cache/%2s/%2s/%s:http://www.ebi.ac.uk/ena/cram/md5/%s
Expand Down
4 changes: 3 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ params {
zthreshold = 3.5
distancethreshold = 150000
slop = 500000
// true/false; true saves hom-ref variants in the VCF when genotyping
homref = false
}

process {
Expand Down Expand Up @@ -69,7 +71,7 @@ manifest {
name = 'brwnj/smoove-nf'
author = 'Joe Brown'
description = "run smoove smoover and with additional QC packaged"
version = '1.0.3'
version = '1.0.4'
nextflowVersion = '>=0.32.0'
homePage = 'https://github.com/brwnj/smoove-nf'
mainScript = 'main.nf'
Expand Down

0 comments on commit 686f67e

Please sign in to comment.