Skip to content

Commit

Permalink
Merge branch 'release/v3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed Mar 31, 2016
2 parents 14c2549 + 6ae269e commit d7c023a
Show file tree
Hide file tree
Showing 13 changed files with 151 additions and 196 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/tabix.tar
/tabix/
/perltidy.LOG
/MYMETA.*
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### 3.0.0
* Removed use of legacy Tabix codebase and switches to samtools 1.2+
* Switches to gihub version of vcftools and makes several patches unnecessary
* Several bugfixes
3 changes: 1 addition & 2 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ bin/Admin_EnsemblTranscriptFastaFilter.pl
bin/Admin_GeneRegionBedDumper.pl
bin/AnnotateVcf.pl
bin/cpanm
CHANGES.md
docs.tar.gz
lib/Sanger/CGP/Vagrent.pm
lib/Sanger/CGP/Vagrent/Annotators/AbstractAnnotator.pm
Expand Down Expand Up @@ -41,8 +42,6 @@ LICENSE.TXT
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
patches/tabixPerlLinker.diff
patches/vcfToolsInstLocs.diff
patches/vcfToolsProcessLog.diff
prerelease.sh
README.md
Expand Down
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ WriteMakefile(
bin/AnnotateVcf.pl)],
PREREQ_PM => {
'Attribute::Abstract' => '1.02',
'Bio::DB::Sam' => '1.39',
'Bio::DB::HTS' => '1.11',
'Bio::Root::Version' => '1.006924',# this is the only way to get Bio::Perl to behave
# and return the version correctly
'Capture::Tiny' => 0.24,
Expand Down
80 changes: 40 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
LICENCE
=======

Copyright (c) 2014 Genome Research Ltd.

Author: Cancer Genome Project <[email protected]>

This file is part of VAGrENT.

VAGrENT is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

1. The usage of a range of years within a copyright statement contained within
this distribution should be interpreted as being equivalent to a list of years
including the first and last year specified and all consecutive years between
them. For example, a copyright statement that reads ‘Copyright (c) 2005, 2007-
2009, 2011-2012’ should be interpreted as being identical to a statement that
reads ‘Copyright (c) 2005, 2007, 2008, 2009, 2011, 2012’ and a copyright
statement that reads ‘Copyright (c) 2005-2012’ should be interpreted as being
identical to a statement that reads ‘Copyright (c) 2005, 2006, 2007, 2008,
2009, 2010, 2011, 2012’."


VAGrENT
======

Expand All @@ -45,16 +12,17 @@ as well as Sequence Ontology terms to classify its consequences.
---

###Dependencies/Install
Some of the code included in this package has dependencies on several C packages:
Some of the code included in this package has dependencies on several packages:

* [Samtools](https://github.com/samtools/samtools) - max 0.1.20 until perl bindings are updated
* [tabix](https://github.com/samtools/samtools/tabix)
* [vcftools](http://vcftools.sourceforge.net/)
* [Samtools v1.3+](https://github.com/samtools/samtools)
* [vcftools](https://vcftools.github.io/)
* [Bio::DB::HTS](http://search.cpan.org/~rishidev/Bio-DB-HTS/)

And various perl modules.

Please use `setup.sh` to install the dependencies. Please be aware that this expects basic C
compilation libraries and tools to be available, most are listed in `INSTALL`.
Please use `setup.sh` to install the dependencies. Setting the environment variable `CGP_PERLLIBS` allows you to to append to `PERL5LIB` during install. Without this all dependancies are installed into the target area.

Please be aware that this expects basic C compilation libraries and tools to be available.

---

Expand All @@ -65,9 +33,41 @@ compilation libraries and tools to be available, most are listed in `INSTALL`.

####Cutting the release
1. Update `lib/Sanger/CGP/Vagrent.pm` to the correct version.
2. Update `Changes` to show major items.
2. Update `CHANGES.md` to show major items.
3. Run `./prerelease.sh`
4. Check all tests and coverage reports are acceptable.
5. Commit the updated docs tree and updated module/version.
6. Push commits.
7. Use the GitHub tools to draft a release.

LICENCE
=======

Copyright (c) 2014-2016 Genome Research Ltd.

Author: Cancer Genome Project <[email protected]>

This file is part of VAGrENT.

VAGrENT is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your option) any
later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

1. The usage of a range of years within a copyright statement contained within
this distribution should be interpreted as being equivalent to a list of years
including the first and last year specified and all consecutive years between
them. For example, a copyright statement that reads ‘Copyright (c) 2005, 2007-
2009, 2011-2012’ should be interpreted as being identical to a statement that
reads ‘Copyright (c) 2005, 2007, 2008, 2009, 2011, 2012’ and a copyright
statement that reads ‘Copyright (c) 2005-2012’ should be interpreted as being
identical to a statement that reads ‘Copyright (c) 2005, 2006, 2007, 2008,
2009, 2010, 2011, 2012’."
4 changes: 2 additions & 2 deletions bin/Admin_EnsemblGtf2CacheConverter.pl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
use File::Type;
use Const::Fast qw(const);

use Bio::DB::Sam;
use Bio::DB::HTS;

use Sanger::CGP::Vagrent::Data::Transcript;
use Sanger::CGP::Vagrent::Data::Exon;
Expand Down Expand Up @@ -68,7 +68,7 @@
sub convertGtf {
my ($opts,$lookup,$ccds) = @_;
my $type = getInputFileType($opts->{'g'});
my $fasta = Bio::DB::Sam::Fai->load($opts->{'f'});
my $fasta = Bio::DB::HTS::Fai->load($opts->{'f'});
my ($inFh,$outFh);
if($type eq 'text') {
open $inFh, '<'.$opts->{'g'} || croak("unable to open gtf input file:".$opts->{'g'});
Expand Down
Binary file modified docs.tar.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions lib/Sanger/CGP/Vagrent.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Sanger::CGP::Vagrent;

##########LICENCE##########
# Copyright (c) 2014 Genome Research Ltd.
# Copyright (c) 2014-2016 Genome Research Ltd.
#
# Author: Cancer Genome Project [email protected]
#
Expand All @@ -26,7 +26,7 @@ use strict;
use Const::Fast qw(const);

use base 'Exporter';
our $VERSION = '2.1.3';
our $VERSION = '3.0.0';
our @EXPORT = qw($VERSION);

1;
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ package Sanger::CGP::Vagrent::TranscriptSource::FileBasedTranscriptSource;

##########LICENCE##########
# Copyright (c) 2014 Genome Research Ltd.
#
#
# Author: Cancer Genome Project [email protected]
#
#
# This file is part of VAGrENT.
#
#
# VAGrENT is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option) any
# later version.
#
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
##########LICENCE##########
Expand All @@ -29,14 +29,8 @@ use Log::Log4perl;
use Data::Dumper;
use Const::Fast qw(const);

use Bio::DB::Sam;

# prevent the init warnings from Tabix
BEGIN {
$SIG{__WARN__} = sub {warn $_[0] unless( $_[0] =~ m/^Subroutine Tabix.* redefined/)};
};

use Tabix;
use Bio::DB::HTS;
use Bio::DB::HTS::Tabix;

use Sanger::CGP::Vagrent::Data::Transcript;
use Sanger::CGP::Vagrent::Data::Exon;
Expand Down Expand Up @@ -126,25 +120,23 @@ sub _generateLocationString {

sub _getTranscriptsFromCache {
my ($self,$gp) = @_;
$self->{_cache_tbx} = Tabix->new('-data' => $self->{_cache}) unless defined $self->{_cache_tbx};
$self->{_cache_tbx} = Bio::DB::HTS::Tabix->new(filename => $self->{_cache}) unless defined $self->{_cache_tbx};
my $min;
my $max = $gp->getMaxPos + $SEARCH_BUFFER;
if($gp->getMinPos() < $SEARCH_BUFFER){
$min = 0;
} else {
$min = ($gp->getMinPos - $SEARCH_BUFFER) - 1;
}
my $res = $self->{_cache_tbx}->query($gp->getChr(),$min,$max);
return undef unless defined $res;
my $iter = $self->{_cache_tbx}->query(sprintf '%s:%d-%d', $gp->getChr(),$min,$max);
return undef unless defined $iter;
my $out = undef;
if(defined $res->get){
while(my $ret = $self->{_cache_tbx}->read($res)){
my $raw = (split("\t",$ret))[6];
my $VAR1;
eval $raw;
$VAR1->{_cdnaseq} = $self->_getTranscriptSeq($VAR1);
push @$out, $VAR1;
}
while(my $ret = $iter->next){
my $raw = (split("\t",$ret))[6];
my $VAR1;
eval $raw;
$VAR1->{_cdnaseq} = $self->_getTranscriptSeq($VAR1);
push @$out, $VAR1;
}
return $out;
}
Expand Down Expand Up @@ -185,7 +177,7 @@ sub _setCacheFile {
sub _getTranscriptSeq {
my ($self,$trans) = @_;
unless(defined $self->{_fai_obj}){
$self->{_fai_obj} = Bio::DB::Sam::Fai->load($self->{_cache_fa});
$self->{_fai_obj} = Bio::DB::HTS::Fai->load($self->{_cache_fa});
}
return $self->{_fai_obj}->fetch($trans->getAccession);
}
11 changes: 0 additions & 11 deletions patches/tabixPerlLinker.diff

This file was deleted.

19 changes: 0 additions & 19 deletions patches/vcfToolsInstLocs.diff

This file was deleted.

2 changes: 1 addition & 1 deletion prerelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cd $MY_PATH

echo '########## Running perl tests ##########'

export HARNESS_PERL_SWITCHES=-MDevel::Cover=-db,reports,-ignore,'t/.*\.t,/Bio',
export HARNESS_PERL_SWITCHES=-MDevel::Cover=-db,reports,-select='^lib/*\.pm$',-ignore,'^t/'
rm -rf docs
mkdir -p docs/reports_text
prove -w -I lib t
Expand Down
Loading

0 comments on commit d7c023a

Please sign in to comment.