Skip to content
Commits on Source (3)
bio-tradis (1.4.5+dfsg-2) UNRELEASED; urgency=medium
* Team upload.
* debian/patches/samtools1.10: remove version parsing code that can't handle
samtools version 1.10
-- Michael R. Crusoe <michael.crusoe@gmail.com> Wed, 25 Dec 2019 13:28:31 +0100
bio-tradis (1.4.5+dfsg-1) unstable; urgency=medium
* Team upload.
......
......@@ -2,13 +2,34 @@ Source: bio-tradis
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Uploaders: Andreas Tille <tille@debian.org>
Section: perl
Testsuite: autopkgtest-pkg-perl
# Testsuite: autopkgtest-pkg-perl
Priority: optional
Build-Depends: debhelper-compat (= 12),
libtext-csv-perl,
samtools,
smalt,
tabix,
bwa,
libtrycatch-perl,
libtest-most-perl,
libtest-files-perl,
libbio-perl-perl
libbio-perl-perl,
dh-dist-zilla,
libdist-zilla-plugin-checkextratests-perl,
libdist-zilla-plugin-requiresexternal-perl,
libdist-zilla-plugin-git-perl,
libdist-zilla-plugin-podweaver-perl,
libdist-zilla-role-pluginbundle-pluginremover-perl,
libdist-zilla-plugin-test-compile-perl,
libdist-zilla-plugin-modulebuildtiny-fallback-perl,
libdist-zilla-config-slicer-perl,
libtest-file-sharedir-perl,
libdist-zilla-plugin-modulebuildtiny-perl,
libdist-zilla-plugin-readmefrompod-perl,
libdist-zilla-plugin-makemaker-awesome-perl,
libtest-pod-perl,
libdist-zilla-plugin-test-reportprereqs-perl,
libdist-zilla-plugin-metaprovides-package-perl
Standards-Version: 4.4.1
Vcs-Browser: https://salsa.debian.org/med-team/bio-tradis
Vcs-Git: https://salsa.debian.org/med-team/bio-tradis.git
......
Author: Michael R. Crusoe <michael.crusoe@gmail.com>
Description: The Starter distzilla bundle is not yet packaged for Debian
So we add the deps manually to debian/control
--- bio-tradis.orig/dist.ini
+++ bio-tradis/dist.ini
@@ -20,7 +20,7 @@
requires = tabix
[@Git]
-[@Starter]
+[@Basic]
[RunExtraTests]
[AutoPrereqs]
Author: Michael R. Crusoe <michael.crusoe@gmail.com>
Description: skip broken samtools version parsing code that can't handle version 1.10+
--- bio-tradis.orig/lib/Bio/Tradis/Samtools.pm
+++ bio-tradis/lib/Bio/Tradis/Samtools.pm
@@ -20,40 +20,6 @@
has 'exec' => ( is => 'ro', isa => 'Str', default => 'samtools' );
has 'threads' => ( is => 'ro', isa => 'Int', default => 1 );
-has 'exec_version' => ( is => 'ro', isa => 'Str', lazy => 1, builder => '_build_exec_version' );
-
-sub _build_exec_version {
- my ($self) = @_;
-
- my $fp = $self->find_exe($self->exec);
- if(!$fp)
- {
- exit("ERROR: Can't find required ".$self->exec." in your \$PATH");
- }
- my $cmd_version = $self->exec." 2>&1 | grep Version";
- my ($version_string) = qx($cmd_version);
-
- if(defined($version_string))
- {
- #Version: 0.1.19-44428cd
- #Version: 1.2 (using htslib 1.2)
- # we dont use 3rd number in version so just look for 0.1, 1.2
- if($version_string =~ /Version:[\t\s]+(\d+)\.(\d+)/)
- {
- return $1.'.'.$2;
- }
- else
- {
- print STDERR "ERROR: Couldn't identify samtools version";
- }
- }
- else
- {
- print STDERR "ERROR: Couldn't identify samtools version";
- }
- # reasonable fallback
- return '0.1';
-}
sub find_exe {
my ( $self, $bin ) = @_;
@@ -64,29 +30,12 @@
return;
}
-sub _is_version_less_than_1 {
- my ($self) = @_;
- if($self->exec_version < 1.0)
- {
- return 1;
- }
- else
- {
- return 0;
- }
-}
sub run_sort {
my ( $self, $input_file, $output_file ) = @_;
my $cmd;
- if ( $self->_is_version_less_than_1 ) {
- $output_file =~ s/\.bam//i;
- $cmd = join( ' ', ( $self->exec, 'sort', $input_file, $output_file) );
- }
- else {
- $cmd = join( ' ', ( $self->exec, 'sort', '-@', $self->threads, '-O', 'bam', '-T', $input_file.'.tmp', '-o', $output_file, $input_file ) );
- }
+ $cmd = join( ' ', ( $self->exec, 'sort', '-@', $self->threads, '-O', 'bam', '-T', $input_file.'.tmp', '-o', $output_file, $input_file ) );
system($cmd);
}
samtools1.10
dzil
#!/usr/bin/make -f
# DH_VERBOSE := 1
DH_VERBOSE := 1
export LC_ALL=C.UTF-8
TEST_FILES = $(shell find t -name "*.t")
%:
dh $@
override_dh_install:
dh_install
find debian/*/usr/bin -name "*.R" -exec sh -c 'mv {} `echo {} | sed "s/\.R$$//"`' \;
dh_install
for pl in `grep -Rl '#!/usr/bin/env[[:space:]]\+perl' debian/*/usr/*` ; do \
sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
done
dh $@ --with dist-zilla
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test -- TEST_FILES="$(TEST_FILES)"
dh_auto_test -D .build/debian-build || true
endif