Skip to content

Commit

Permalink
Merge branch 'hotfix/v4.0.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed Feb 5, 2016
2 parents 06ebdfa + 8da24b3 commit 4d9eec6
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 14 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ There are several stages the main component being:

### Pre-requisites

* The C++ code (within this package) requires the presence of pstreams.h (and associated development libraries). This is not handled by the `setup.sh` script.

Perl packages:

* The C++ code requires the presence of pstreams.h (and associated development libraries). This is not handled by the `setup.sh` script.
* [PCAP-core](https://github.com/ICGC-TCGA-PanCancer/PCAP-core/releases)
* [cgpVcf](https://github.com/cancerit/cgpVcf/releases)
* [grass](https://github.com/cancerit/grass/releases)
Expand All @@ -68,14 +69,22 @@ R packages (known to work with 3.1.3), recommend install via package manager:
* [RColorBrewer](https://cran.r-project.org/web/packages/RColorBrewer/index.html)
* [VGAM](https://cran.r-project.org/web/packages/VGAM/index.html)
* [stringr](https://cran.r-project.org/web/packages/stringr/index.html)
* These themselves have further dependancies.

R Bioconductor packages (known to work with 3.1.3)
* [copynumber](https://www.bioconductor.org/packages/release/bioc/html/copynumber.html)

Please also install the **ssearch36** binary from the FASTA package to your path.
Other tools that need to be in path

* [FASTA](https://github.com/wrpearson/fasta36/releases)

### Tools installed by setup.sh
* Many CPAN hosted libraries, see `perl/Makefile.PL` for the list
* [BLAT](http://hgwdev.cse.ucsc.edu/~kent/src/)
* [exonerate](http://www.ebi.ac.uk/about/vertebrate-genomics/software/exonerate)
* [Velvet](https://www.ebi.ac.uk/~zerbino/velvet/)
* [bedtools2](https://github.com/arq5x/bedtools2/releases)

###

## Running BRASS
Expand Down
7 changes: 6 additions & 1 deletion perl/bin/brass.pl
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,13 @@ sub cleanup {
"$basefile.cn_filtered";

for my $to_move(@base_move) {
move($to_move, $intdir);
move($to_move, $intdir) if(-e $to_move);
}

# ascat files may not be in base output folder so copy from inputs:
copy($options->{'ascat'}, $intdir);
copy($options->{'ascat_summary'}, $intdir);

my $tmplogs = File::Spec->catdir($tmpdir, 'logs');
if(-e $tmplogs) {
move($tmplogs, File::Spec->catdir($outdir, 'logs')) or die $!;
Expand Down Expand Up @@ -231,6 +235,7 @@ sub setup {
}

PCAP::Cli::out_dir_check('outdir', $opts{'outdir'});
$opts{'outdir'} = File::Spec->rel2abs( $opts{'outdir'} );
my $intermediates = File::Spec->catdir($opts{'outdir'}, 'intermediates');
if(-e $intermediates) {
die "ERROR: Presence of intermediates directory suggests successful complete analysis, please delete to proceed: $intermediates\n";
Expand Down
8 changes: 5 additions & 3 deletions perl/bin/combineResults.pl
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ sub mergeVcf {
next;
}
else {
my $old_info = $orig_data{$id}->[7];
my $original_info = $orig_data{$id}->[7];
my ($tsrds) = $bits[7] =~ m/(TSRDS=[^;]+)/;

$bits[7] = $old_info.';'.$tsrds;
$bits[1] = $orig_data{$id}->[1];
$bits[3] = $orig_data{$id}->[3];
$bits[4] = $orig_data{$id}->[4];
$bits[7] = $original_info.';'.$tsrds;
$bits[7] .= ';BAS='.$orig_data{$id}->[5];
$bits[5] = q{.};
$bits[-3] .= ':PS';
Expand Down
Binary file modified perl/docs.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion perl/lib/Bio/Brass.pm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ our @EXPORT = qw(find_breakpoints find_dusty_vertices
is_dusty get_isolated_bp_alignment get_isolated_bp_surrounding_region
$VERSION);

our $VERSION = '4.0.11';
our $VERSION = '4.0.12';

=head1 NAME
Expand Down
37 changes: 31 additions & 6 deletions perl/lib/Sanger/CGP/Brass/Implement.pm
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,23 @@ sub split_filtered {
my $split_dir = File::Spec->catdir($tmp, 'split');
remove_tree($split_dir) if(-d $split_dir);
make_path($split_dir);
my $command = sprintf q{grep -v "^#" %s | split --suffix-length=7 --numeric-suffixes --verbose --lines=%s - %s/split.},
$groups, $ASSEMBLE_SPLIT, $split_dir;

PCAP::Threaded::external_process_handler(File::Spec->catdir($tmp, 'logs'), qq{bash -c 'set -o pipefail; $command'}, 0);
my $splitOne = $split_dir.'/split.0000000';
if(! -e $splitOne){
# before running this we need to know if there are any non '#' lines
my ($sto, $ste, $exit) = capture { system([0,1], "grep -vc '^#' $groups"); };

if($exit == 0 && $sto > 0) {
my $command = sprintf q{grep -v "^#" %s | split --suffix-length=7 --numeric-suffixes --verbose --lines=%s - %s/split.},
$groups, $ASSEMBLE_SPLIT, $split_dir;

PCAP::Threaded::external_process_handler(File::Spec->catdir($tmp, 'logs'), qq{bash -c 'set -o pipefail; $command'}, 0);
}
elsif($exit == 1 && $sto == 0) {
my $splitOne = $split_dir.'/split.0000000';
`touch $splitOne`;
warn "No data survived filtering (split_filtered)\n";
}
else {
die "ERROR: Unexpected result when parsing non-header lines from $groups\n";
}

PCAP::Threaded::touch_success(File::Spec->catdir($tmp, 'progress'), 0);
Expand Down Expand Up @@ -632,7 +642,22 @@ sub tabix {
my $tabix = _which('tabix');
$tabix .= sprintf ' -p vcf %s', $vcf_gz;

my @commands = ($header, qq{bash -c 'set -o pipefail; $sort'}, $bgzip, $tabix);
# before running this we need to know if there are any non '#' lines
my ($sto, $ste, $exit) = capture { system([0,1], "grep -vc '^#' $annotated"); };

my @commands = ($header);

if($exit == 0 && $sto > 0) {
push @commands, qq{bash -c 'set -o pipefail; $sort'};
}
elsif($exit == 1 && $sto == 0) {
warn "No data survived (tabix)\n";
}
else {
die "ERROR: Unexpected result when parsing non-header lines from $annotated\n";
}

push @commands, $bgzip, $tabix;

PCAP::Threaded::external_process_handler(File::Spec->catdir($tmp, 'logs'), \@commands, 0);

Expand Down
5 changes: 4 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@


SOURCE_BLAT="http://users.soe.ucsc.edu/~kent/src/blatSrc35.zip"

# Warning bedtools 2.24.0 and 2.25.0 have a swapped usage in coverageBed
# No upgrades until [this ticket](https://github.com/arq5x/bedtools2/issues/319) is resolved
SOURCE_BEDTOOLS="https://github.com/arq5x/bedtools2/releases/download/v2.21.0/bedtools-2.21.0.tar.gz"

done_message () {
Expand Down Expand Up @@ -165,7 +168,7 @@ done

cd $SETUP_DIR

echo -n "Building bedtools ..."
echo -n "Building bedtools2 ..."
if [ -e $SETUP_DIR/bedtools.success ]; then
echo -n " previously installed ...";
else
Expand Down

0 comments on commit 4d9eec6

Please sign in to comment.