Skip to content

Commit

Permalink
Merge branch 'release/v1.14.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed Mar 15, 2016
2 parents ab9aa4f + ed19ddf commit b01cc30
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions bin/bwa_mem.pl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ sub setup {
'r|reference=s' => \$opts{'reference'},
'o|outdir=s' => \$opts{'outdir'},
's|sample=s' => \$opts{'sample'},
'c|charts' => \$opts{'charts'},
'n|nomarkdup' => \$opts{'nomarkdup'},
'f|fragment=s' => \$opts{'fragment'},
'p|process=s' => \$opts{'process'},
'i|index=i' => \$opts{'index'},
Expand Down Expand Up @@ -183,7 +183,7 @@ =head1 SYNOPSIS
Optional parameters:
-fragment -f Split input into fragements of X million repairs
-charts -c Generate perl-base-quality plots (+30% runtime on stats step)
-nomarkdup -n Don't mark duplicates
Targeted processing:
-process -p Only process this step then exit, optionally set -index
Expand Down
7 changes: 6 additions & 1 deletion bin/gnos_pull.pl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
use JSON qw(decode_json);
use List::Util qw(first any);
use Proc::PID::File;
use Data::Dumper;

use PCAP;
use PCAP::Cli;
Expand Down Expand Up @@ -97,6 +98,10 @@ sub load_config {
my %bl_donors = map { $_ => 1 } split /\n/, $options->{'COMPOSITE_FILTERS'}->{'manual_donor_blacklist'};
$options->{'COMPOSITE_FILTERS'}->{'manual_donor_blacklist'} = \%bl_donors;
}
if(exists $options->{'COMPOSITE_FILTERS'}->{'not_sanger_workflow'}) {
my %bl_workflows = map { $_ => 1 } split /[\n,]/, $options->{'COMPOSITE_FILTERS'}->{'not_sanger_workflow'};
$options->{'COMPOSITE_FILTERS'}->{'not_sanger_workflow'} = [keys \%bl_workflows];
}

croak sprintf q{'KEY_FILE' Ssection is absent from %s}, $options->{'config'} unless($cfg->SectionExists('KEY_FILES'));
for my $params($cfg->Parameters('KEY_FILES')) {
Expand Down Expand Up @@ -382,7 +387,7 @@ sub pull_calls {

next if(exists $options->{'COMPOSITE_FILTERS'}->{$caller.'_version'} && $options->{'COMPOSITE_FILTERS'}->{$caller.'_version'} ne $donor->{'variant_calling_results'}->{$caller.'_variant_calling'}->{'workflow_details'}->{'variant_workflow_version'});

if(exists $options->{'COMPOSITE_FILTERS'}->{not_sanger_workflow} && $options->{'COMPOSITE_FILTERS'}->{not_sanger_workflow} eq $donor->{'variant_calling_results'}->{'sanger_variant_calling'}->{'workflow_details'}->{'variant_workflow_name'}) {
if(exists $options->{'COMPOSITE_FILTERS'}->{not_sanger_workflow} && first { $donor->{'variant_calling_results'}->{'sanger_variant_calling'}->{'workflow_details'}->{'variant_workflow_name'} eq $_ } @{$options->{'COMPOSITE_FILTERS'}->{not_sanger_workflow}}) {
warn "Skipping version $donor->{donor_unique_id} as version == $options->{COMPOSITE_FILTERS}->{not_sanger_workflow}\n" if($options->{debug});
next;
}
Expand Down
Binary file modified docs.tar.gz
Binary file not shown.
33 changes: 11 additions & 22 deletions lib/PCAP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use strict;
use Const::Fast qw(const);
use base 'Exporter';

our $VERSION = '1.13.2';
our $VERSION = '1.14.0';
our @EXPORT = qw($VERSION);

const my $LICENSE =>
Expand All @@ -35,20 +35,7 @@ const my $LICENSE =>
#################";

const my $DEFAULT_PATH => 'biobambam,samtools,bwa';
const my %UPGRADE_PATH => ( '0.1.0' => 'biobambam,bwa,samtools',
'0.1.1' => 'biobambam,bwa,samtools',
'0.1.2' => 'biobambam,bwa,samtools',
'0.2.0' => 'biobambam,bwa,samtools',
'0.2.99' => 'biobambam,bwa,samtools',
'0.3.0' => 'biobambam,bwa,samtools',
'1.0.0' => 'biobambam,bwa,samtools',
'1.0.1' => 'biobambam,bwa,samtools',
'1.0.2' => 'biobambam,bwa,samtools',
'1.0.3' => 'biobambam,bwa,samtools',
'1.0.4' => 'biobambam,bwa,samtools',
'1.1.0' => 'biobambam,bwa,samtools',
'1.1.1' => 'biobambam,bwa,samtools',
'1.1.2' => 'biobambam,bwa,samtools',
const my %UPGRADE_PATH => ( # all earlier versions need full upgrade
'1.2.0' => 'biobambam,bwa', # if later versions have new versions then all preceding need that tool listing
'1.2.1' => 'biobambam,bwa',
'1.2.2' => 'biobambam,bwa',
Expand All @@ -73,13 +60,15 @@ const my %UPGRADE_PATH => ( '0.1.0' => 'biobambam,bwa,samtools',
'1.9.4' => 'biobambam',
'1.10.0' => 'biobambam',
'1.11.0' => 'biobambam',
'1.11.1' => '',
'1.12.0' => '',
'1.12.1' => '',
'1.12.2' => '',
'1.12.3' => '',
'1.13.0' => '',
'1.13.1' => '',
'1.11.1' => 'biobambam',
'1.12.0' => 'biobambam',
'1.12.1' => 'biobambam',
'1.12.2' => 'biobambam',
'1.12.3' => 'biobambam',
'1.13.0' => 'biobambam',
'1.13.1' => 'biobambam',
'1.13.2' => 'biobambam',
'1.14.0' => 'biobambam',
);

sub license {
Expand Down
30 changes: 18 additions & 12 deletions lib/PCAP/Bam.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ use File::Path qw(make_path);
use PCAP::Threaded;

const my $BAMCOLLATE => q{(%s colsbs=268435456 collate=1 reset=1 exclude=SECONDARY,QCFAIL,SUPPLEMENTARY classes=F,F2 T=%s filename=%s level=1 > %s)};
const my $BAMBAM_DUP => q{ O=%s M=%s tmpfile=%s markthreads=%s rewritebam=1 rewritebamlevel=1 index=1 md5=1};
const my $BAMBAM_DUP => q{ index=1 md5=1 tmpfile=%s O=%s M=%s markthreads=%s };
const my $BAMBAM_MERGE => q{ tmpfile=%s md5filename=%s.md5 indexfilename=%s.bai index=1 md5=1 > %s};
const my $BAM_STATS => q{ -i %s -o %s};

sub new {
Expand Down Expand Up @@ -98,7 +99,6 @@ sub merge_and_mark_dup {
my ($options, $source) = @_;
my $tmp = $options->{'tmp'};
my $marked = File::Spec->catdir($options->{'outdir'}, $options->{'sample'});
my $met = "$marked.met";
$marked .= '.bam';
return $marked if PCAP::Threaded::success_exists(File::Spec->catdir($tmp, 'progress'), 0);
my $helper_threads = $options->{'threads'}-1;
Expand All @@ -107,11 +107,22 @@ sub merge_and_mark_dup {
$helper_threads = 1 if($helper_threads < 1);
# uncoverable branch true
# uncoverable branch false
my $command = which('bammarkduplicates2') || die "Unable to find 'bammarkduplicates' in path";
$command .= sprintf $BAMBAM_DUP, $marked,
$met,
File::Spec->catfile($tmp, 'biormdup'),
$helper_threads;
my $command;
if(defined $options->{'nomarkdup'} && $options->{'nomarkdup'} == 1) {
$command = which('bammerge') || die "Unable to find 'bammarkduplicates' in path";
$command .= sprintf $BAMBAM_MERGE, File::Spec->catfile($tmp, 'biormdup'),
$marked,
$marked,
$marked;
}
else {
my $met = "$marked.met";
$command = which('bammarkduplicates2') || die "Unable to find 'bammarkduplicates' in path";
$command .= sprintf $BAMBAM_DUP, File::Spec->catfile($tmp, 'biormdup'),
$marked,
$met,
$helper_threads;
}

if(defined $source) {
opendir(my $dh, $source);
Expand Down Expand Up @@ -140,11 +151,6 @@ sub bam_stats {
return $bas if PCAP::Threaded::success_exists(File::Spec->catdir($tmp, 'progress'), 0);
my $command = _which('bam_stats') || die "Unable to find 'bam_stats' in path";
$command .= sprintf $BAM_STATS, $bam, $bas;
if(exists $options->{'charts'} && defined $options->{'charts'}) {
my $chart_dir = File::Spec->catdir($options->{'outdir'}, 'charts');
make_path($chart_dir) unless(-d $chart_dir);
$command .= ' -p '.$chart_dir;
}
PCAP::Threaded::external_process_handler(File::Spec->catdir($tmp, 'logs'), $command, 0);
PCAP::Threaded::touch_success(File::Spec->catdir($tmp, 'progress'), 0);
return $bas;
Expand Down
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SOURCE_HTSLIB="https://github.com/samtools/htslib/archive/1.2.1.tar.gz"
SOURCE_JKENT_BIN="https://github.com/ENCODE-DCC/kentUtils/raw/master/bin/linux.x86_64"

# for biobambam
SOURCE_BBB_BIN_DIST="https://github.com/gt1/biobambam2/releases/download/2.0.25-release-20151105154334/biobambam2-2.0.25-release-20151105154334-x86_64-etch-linux-gnu.tar.gz"
SOURCE_BBB_BIN_DIST="https://github.com/gt1/biobambam2/releases/download/2.0.31-release-20160307150858/biobambam2-2.0.31-release-20160307150858-x86_64-etch-linux-gnu.tar.gz"

get_distro () {
if hash curl 2>/dev/null; then
Expand Down

0 comments on commit b01cc30

Please sign in to comment.