Skip to content

Commit

Permalink
Merge branch 'release/2.0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
am26 committed Apr 14, 2016
2 parents 1836e65 + 6086c4b commit 43f0587
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 11 deletions.
2 changes: 1 addition & 1 deletion perl/config/tophat.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ species=
referenceloc=
referenceindex=genome
transcriptomeindex=transcriptome
tophatpostindex=genome
tophatpostindex=tophatpost.genome
ensgene=ensGene.txt
refgene=refGene.txt
blastdb=blast
Expand Down
2 changes: 1 addition & 1 deletion perl/lib/Sanger/CGP/CgpRna.pm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use strict;
use Const::Fast qw(const);
use base 'Exporter';

our $VERSION = '2.0.8';
our $VERSION = '2.0.9';
our @EXPORT = qw($VERSION);

1;
2 changes: 1 addition & 1 deletion perl/lib/Sanger/CGP/Defuse/Implement.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use PCAP::Bam;
use Sanger::CGP::CgpRna;

const my $DEFUSE => q{ %s -c %s -p %d -o %s -n %s -l %s -s direct -1 %s -2 %s};
const my $BAMFASTQ => q{ exclude=QCFAIL,SECONDARY,SUPPLEMENTARY T=%s S=%s O=%s O2=%s F=%s F2=%s filename=%s};
const my $BAMFASTQ => q{ exclude=SECONDARY,SUPPLEMENTARY T=%s S=%s O=%s O2=%s F=%s F2=%s filename=%s};
const my $FUSIONS_FILTER => q{ -i %s -s %s -n %s -o %s -p defuse};
const my $DEFUSE_MAX_CORES => 16;

Expand Down
25 changes: 23 additions & 2 deletions perl/lib/Sanger/CGP/Star/Implement.pm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ use Sanger::CGP::CgpRna;
use Data::Dumper;

const my $BAMFASTQ => q{ exclude=QCFAIL,SECONDARY,SUPPLEMENTARY T=%s S=%s O=%s O2=%s gz=1 level=1 F=%s F2=%s filename=%s};
const my $BAMFASTQ_ANALYSIS => q{ exclude=SECONDARY,SUPPLEMENTARY T=%s S=%s O=%s O2=%s gz=1 level=1 F=%s F2=%s filename=%s};
const my $FUSIONS_FILTER => q{ -i %s -s %s -n %s -o %s -p star};
const my $STAR_MAX_CORES => 16;
const my $STAR_DEFAULTS_SECTION => 'star-parameters';
Expand Down Expand Up @@ -286,16 +287,36 @@ sub prepare {
my $sample = $options->{'sample'};
my $rg = $input->{'rg'};

my $fusion_mode;

if(exists $options->{'fusion_mode'}){
$fusion_mode = $options->{'fusion_mode'};
}

my $command = _which('bamtofastq') || die "Unable to find 'bamtofastq' in path";
$command .= sprintf $BAMFASTQ, File::Spec->catfile($tmp, "bamtofastq.$sample.$rg"),

if($fusion_mode){
# If the BAM has already been mapped and QCed and is being split for downstream analysis we just want to exclude SECONDARy and SUPPLEMENTARY reads
$command .= sprintf $BAMFASTQ_ANALYSIS, File::Spec->catfile($tmp, "bamtofastq.$sample.$rg"),
File::Spec->catfile($tmp, "bamtofastq.$sample.$rg.s"),
File::Spec->catfile($tmp, "bamtofastq.$sample.$rg.o1"),
File::Spec->catfile($tmp, "bamtofastq.$sample.$rg.o2"),
File::Spec->catfile($inputdir, $sample.'.'.$rg.'_1.fastq.gz'),
File::Spec->catfile($inputdir, $sample.'.'.$rg.'_2.fastq.gz'),
$input->in;
}
else{
# Also exclude QCFAIL reads if the BAM is directory from iRODs or externally imported
$command .= sprintf $BAMFASTQ, File::Spec->catfile($tmp, "bamtofastq.$sample.$rg"),
File::Spec->catfile($tmp, "bamtofastq.$sample.$rg.s"),
File::Spec->catfile($tmp, "bamtofastq.$sample.$rg.o1"),
File::Spec->catfile($tmp, "bamtofastq.$sample.$rg.o2"),
File::Spec->catfile($inputdir, $sample.'.'.$rg.'_1.fastq.gz'),
File::Spec->catfile($inputdir, $sample.'.'.$rg.'_2.fastq.gz'),
$input->in;
}

PCAP::Threaded::external_process_handler(File::Spec->catdir($tmp, 'logs'), $command, $index);
PCAP::Threaded::external_process_handler(File::Spec->catdir($tmp, 'logs'), $command, $index);

}
}
Expand Down
10 changes: 5 additions & 5 deletions perl/lib/Sanger/CGP/Tophat/Implement.pm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use Sanger::CGP::CgpRna;

const my @BOWTIE1_SUFFIXES => qw(.1.ebwt .2.ebwt .3.ebwt .4.ebwt .rev.1.ebwt .rev.2.ebwt .fa .fa.fai);
const my @BOWTIE2_SUFFIXES => qw(.1.bt2 .2.bt2 .3.bt2 .4.bt2 .rev.1.bt2 .rev.2.bt2 .fa .fa.fai);
const my $BAMFASTQ => q{ exclude=QCFAIL,SECONDARY,SUPPLEMENTARY T=%s S=%s O=%s O2=%s gz=1 level=1 F=%s F2=%s filename=%s};
const my $BAMFASTQ => q{ exclude=SECONDARY,SUPPLEMENTARY T=%s S=%s O=%s O2=%s gz=1 level=1 F=%s F2=%s filename=%s};
const my $FUSIONS_FILTER => q{ -i %s -s %s -n %s -o %s -p tophat};
const my $ADD_STRAND => q{ -i %s -s %s -p %s -o %s};
const my $FUSIONS_SPLIT => 50000;
Expand Down Expand Up @@ -132,17 +132,17 @@ sub check_input {

if($options->{'bowtieversion'} == 1){
for $suffix(@BOWTIE1_SUFFIXES){
PCAP::Cli::file_for_reading('bowtie1-ref-index',File::Spec->catfile($ens_refdata,'tophat',$ref_prefix.$suffix));
PCAP::Cli::file_for_reading('bowtie1-ref-index',File::Spec->catfile($ens_refdata,$ref_prefix.$suffix));
PCAP::Cli::file_for_reading('bowtie1-transcriptome-index',File::Spec->catfile($ens_refdata,'tophat',$options->{'genebuild'},$trans_prefix.$suffix));
$options->{'referencepath'} = File::Spec->catfile($ens_refdata,'tophat',$ref_prefix);
$options->{'referencepath'} = File::Spec->catfile($ens_refdata,$ref_prefix);
$options->{'transcriptomepath'} = File::Spec->catfile($ens_refdata,'tophat',$options->{'genebuild'},$trans_prefix);
}
}
else{
for $suffix(@BOWTIE2_SUFFIXES){
PCAP::Cli::file_for_reading('bowtie2-ref-index',File::Spec->catfile($ens_refdata,'tophat',$ref_prefix.$suffix));
PCAP::Cli::file_for_reading('bowtie2-ref-index',File::Spec->catfile($ens_refdata,$ref_prefix.$suffix));
PCAP::Cli::file_for_reading('bowtie2-transcriptome-index',File::Spec->catfile($ens_refdata,'tophat',$options->{'genebuild'},$trans_prefix.$suffix));
$options->{'referencepath'} = File::Spec->catfile($ens_refdata,'tophat',$ref_prefix);
$options->{'referencepath'} = File::Spec->catfile($ens_refdata,$ref_prefix);
$options->{'transcriptomepath'} = File::Spec->catfile($ens_refdata,'tophat',$options->{'genebuild'},$trans_prefix);
}
}
Expand Down
5 changes: 4 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SOURCE_BOWTIE1="https://sourceforge.net/projects/bowtie-bio/files/bowtie/1.1.1/b
VERSION_BOWTIE1="1.1.1"
SOURCE_BOWTIE2="https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.2.3/bowtie2-2.2.3-linux-x86_64.zip/download"
VERSION_BOWTIE2="2.2.3"
SOURCE_TOPHAT="http://ccb.jhu.edu/software/tophat/downloads/tophat-2.1.1.Linux_x86_64.tar.gz"
SOURCE_TOPHAT="http://ccb.jhu.edu/software/tophat/downloads/tophat-2.1.0.Linux_x86_64.tar.gz"
SOURCE_BLASTN="ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.30/ncbi-blast-2.2.30+-x64-linux.tar.gz"
SOURCE_DEFUSE="https://bitbucket.org/dranew/defuse/get/v0.7.0.tar.gz"
VERSION_DEFUSE="0.7.0"
Expand Down Expand Up @@ -284,6 +284,9 @@ else
mkdir -p $INST_PATH/bin/defuse_install
cp -r ./defuse/* $INST_PATH/bin/defuse_install
cp ./defuse/scripts/*pm $INST_PATH/lib/perl5
if [ -e $INST_PATH/bin/defuse.pl ]; then
rm $INST_PATH/bin/defuse.pl
fi
ln -s $INST_PATH/bin/defuse_install/scripts/defuse.pl $INST_PATH/bin/defuse.pl
touch $SETUP_DIR/defuse.success
)>>$INIT_DIR/setup.log 2>&1
Expand Down

0 comments on commit 43f0587

Please sign in to comment.