Skip to content

Commit

Permalink
Merge branch 'release/v2.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed May 17, 2016
2 parents ad13d42 + 6beb60f commit 9c528be
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
7 changes: 3 additions & 4 deletions bin/bamToBw.pl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
use PCAP::Threaded;
use version;

const my @VALID_PROCESS => qw(bamToBw mergeBw generateBw);
const my @VALID_PROCESS => qw(bamToBw generateBw);
const my %INDEX_FACTOR => ( 'bamToBw' => -1,
'generateBw' => 1,
);
Expand Down Expand Up @@ -166,9 +166,8 @@ =head1 SYNOPSIS
Targeted processing:
-process -p Only process this step then exit, optionally set -index
bwamem - only applicable if input is bam
mark - Run duplicate marking (-index N/A)
stats - Generates the *.bas file for the final BAM.
bamToBw - Per chromosome BigWigs
generateBw - Generates merged BigWig
-index -i Optionally restrict '-p' to single job
bwamem - 1..<lane_count>
Expand Down
Binary file modified docs.tar.gz
Binary file not shown.
3 changes: 2 additions & 1 deletion lib/PCAP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use base 'Exporter';
use FindBin qw($Bin);
use File::Which qw(which);

our $VERSION = '2.3.0';
our $VERSION = '2.4.0';
our @EXPORT = qw($VERSION _which);

const my $LICENSE =>
Expand Down Expand Up @@ -79,6 +79,7 @@ const my %UPGRADE_PATH => ( # all earlier versions need full upgrade
'2.2.0' => 'biobambam,samtools',
'2.2.1' => '',
'2.3.0' => '',
'2.4.0' => '',
);

sub license {
Expand Down
15 changes: 5 additions & 10 deletions lib/PCAP/BigWig.pm
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,11 @@ sub bamToBw {
my $outfile = q{'}.File::Spec->catfile($options->{'tmp'}, $seq.'.bw').q{'};

my $command = q{bash -c "set pipefail; };
if($options->{'bam'} =~ m/\.bam$/) {
$command .= _which('bam2bedgraph');
$command .= q{ }.$options->{'bam'}.q{ '}.$seq.q{'};
}
else {
$command .= _which('samtools');
$command .= q{ view -T }.$options->{'reference'};
$command .= q{ -ub }.$options->{'bam'}.q{ '}.$seq.q{'};
$command .= ' | '._which('bam2bedgraph').' - ';
}
$command .= _which('samtools');
$command .= q{ view -T }.$options->{'reference'};
$command .= q{ -F 3844}; # don't include data that set these flags
$command .= q{ -ub }.$options->{'bam'}.q{ '}.$seq.q{'};
$command .= ' | '._which('bam2bedgraph').' - ';
$command .= ' | ';
$command .= _which('wigToBigWig');
$command .= ' -fixedSummaries -keepAllChromosomes stdin '.$options->{'reference'}.'.fai '.$outfile;
Expand Down

0 comments on commit 9c528be

Please sign in to comment.