Skip to content

Commit

Permalink
Issue #226 | add --fbopt for freebayes options
Browse files Browse the repository at this point in the history
  • Loading branch information
tseemann committed Aug 25, 2018
1 parent f079574 commit 52f656e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions bin/snippy
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ my(@Options, $quiet, $check, $force, $outdir, $prefix,
$reference, $cpus, $tmpdir, $ram,
$bam, $pe1, $pe2, $se, $peil, $ctgs, $unmapped, $subsample,
$report, $mapqual, $basequal, $maxsoft, $minqual,
$mincov, $minfrac, $rgid, $bwaopt, $targets,
$mincov, $minfrac, $rgid, $bwaopt, $fbopt, $targets,
$cleanup);
setOptions();

Expand Down Expand Up @@ -322,8 +322,9 @@ $bwaopt .= ' -p' if $peil;
# - we can filter on $mincov because later samtools depth will
# replace any sites 0 < mincov < DP with 'N', and 0 with '-'.

my $fbopt = "-p 2 -P 0 -C $mincov --min-repeat-entropy 1.5 --strict-vcf".
" -q $basequal -m $mapqual --min-coverage $mincov -F 0.05";
$fbopt = "-p 2 -P 0 -C $mincov --min-repeat-entropy 1.5 --strict-vcf".
" -q $basequal -m $mapqual --min-coverage $mincov -F 0.05".
" $fbopt"; # append --fbopt from command line to override previous
$fbopt .= "-t '$targets'" if $targets;

# rules to extract good SNPs from the above freebayes
Expand Down Expand Up @@ -717,6 +718,7 @@ sub setOptions {
{OPT=>"minqual=f", VAR=>\$minqual, DEFAULT=>100, DESC=>"Minumum QUALITY in VCF column 6"},
{OPT=>"maxsoft=i", VAR=>\$maxsoft, DEFAULT=>10, DESC=>"Maximum soft clipping to allow"},
{OPT=>"bwaopt=s", VAR=>\$bwaopt, DEFAULT=>'', DESC=>"Extra BWA MEM options, eg. -x pacbio"},
{OPT=>"fbopt=s", VAR=>\$fbopt, DEFAULT=>'', DESC=>"Extra Freebayes options, eg. --theta 1E-6 --read-snp-limit 2"},
);

(!@ARGV) && (usage(1));
Expand Down
2 changes: 1 addition & 1 deletion perl5/Snippy/Version.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use base Exporter;
@EXPORT_OK = qw(version);
%EXPORT_TAGS = ( 'all' => [ @EXPORT_OK ] );

our $VERSION = "4.0.6";
our $VERSION = "4.0.7";

use strict;
use File::Basename;
Expand Down

0 comments on commit 52f656e

Please sign in to comment.