Skip to content
Commits on Source (6)
psortb (3.0.6+dfsg-1) unstable; urgency=medium
* New upstream version
* Standards-Version: 4.2.1
-- Andreas Tille <tille@debian.org> Wed, 26 Sep 2018 22:03:35 +0200
psortb (3.0.5+dfsg-2) unstable; urgency=medium
[ Steve Langasek ]
......
......@@ -14,7 +14,7 @@ Build-Depends: debhelper (>= 11~),
libmodhmm-dev,
pkg-config,
pftools
Standards-Version: 4.1.4
Standards-Version: 4.2.1
Vcs-Browser: https://salsa.debian.org/med-team/psortb
Vcs-Git: https://salsa.debian.org/med-team/psortb.git
Homepage: http://www.psort.org/
......
......@@ -5,21 +5,6 @@ Description: Fix path to conf and other binaries
In case it turns out that users need to change this the files should be
moved to /etc/psortb
--- a/psort/bin/psort
+++ b/psort/bin/psort
@@ -59,9 +59,9 @@ MAIN: {
my $psort_analysis = 'psort';
my $psort_output = 'bayes';
- my $root = '/usr/local/psortb-3.0';
- my $blastdir = '/usr/local/bio/blast';
- my $pftools = '/usr/local/bin/';
+ my $root = '/usr/lib/psort';
+ my $blastdir = '/usr/bin';
+ my $pftools = '/usr/bin';
my $pfscan_module = 'Profile';
# Pull any options off of the command line.
--- a/psort/server/startup.pl
+++ b/psort/server/startup.pl
@@ -8,9 +8,9 @@ use Apache ();
......@@ -35,3 +20,18 @@ Description: Fix path to conf and other binaries
our %ENV;
--- a/psort/bin/psort
+++ b/psort/bin/psort
@@ -61,9 +61,9 @@ MAIN: {
my $psort_analysis = 'psort';
my $psort_output = 'bayes';
- my $root = '/usr/local/psortb3';
- my $blastdir = '/usr/local/pkg/blast-2.2.26//bin';
- my $pftools = '/usr/local/bin/';
+ my $root = '/usr/lib/psort';
+ my $blastdir = '/usr/bin';
+ my $pftools = '/usr/bin';
my $pfscan_module = 'Profile';
# Pull any options off of the command line.
#! /usr/bin/perl
use IO::String;
use Getopt::Long;
#use Data::Dumper;
use lib '../lib';
use Bio::Tools::PSort::Report::Formatter;
use Bio::Tools::PSort;
use Bio::SeqIO;
use Bio::Tools::PSort::Constants qw(:all);
use Getopt::Long;
use Data::Dumper;
use strict;
our $ENV;
......@@ -59,8 +61,8 @@ MAIN: {
my $psort_analysis = 'psort';
my $psort_output = 'bayes';
my $root = '/usr/local/psortb-3.0';
my $blastdir = '/usr/local/bio/blast';
my $root = '/usr/local/psortb3';
my $blastdir = '/usr/local/pkg/blast-2.2.26//bin';
my $pftools = '/usr/local/bin/';
my $pfscan_module = 'Profile';
......@@ -361,11 +363,10 @@ MAIN: {
['CWSVM_a', sub {1},
['Signal_a']
]]]]]]]]]); # add a bracket back later
} else {
die "We should never be here.\n";
} else {
die "We should never be here.\n";
}
} else {
# Create a new PSort object.
print(STDERR "* Using \"$server\" as remote PSort server\n")
......@@ -378,18 +379,19 @@ MAIN: {
# Figure out whether or not we're getting the sequences from a file or from
# STDIN and open up a Bio::SeqIO on it.
my $seqfh;
if($fname) {
if((-f $fname) && (-r $fname)) {
print(STDERR "* Reading sequences from file \"$fname\"\n") if($verbose);
open(SEQS, $fname) || die("Error: open $fname: $!\n");
$sio = new Bio::SeqIO(-fh => \*SEQS, -format => $format);
$seqfh = make_seq_input_uppercase($fname);
} else {
die("Error: file \"$fname\" doesn't exist or isn't readable\n");
}
} else {
print(STDERR "* Reading sequences from STDIN\n") if($verbose);
$sio = new Bio::SeqIO(-fh => \*STDIN, -format => $format);
$seqfh = make_seq_input_uppercase();
}
$sio = new Bio::SeqIO(-fh => $seqfh, -format => $format);
# Ready for prime time - go forth and PSort.
my $format = new Bio::Tools::PSort::Report::Formatter();
......@@ -404,3 +406,35 @@ MAIN: {
}
print($format->format($output, {-cutoff => $cutoff, -gram => $gram, -mcutoff => $divergent, -psort => $psort, -skiplocalizations => \@skippedlocalizations}, @reps));
}
sub make_seq_input_uppercase {
my $fname = shift;
my $seqinput;
if (defined $fname) {
open(SEQS, $fname) || die("Error: open $fname: $!\n");
#$seqinput = <SEQS>;
$seqinput = do { local $/; <SEQS> };
}
else {
$seqinput = <>;
}
# hack to convert sequences (not headers) to uppercase (lowercase
# seems to bring back no psortb results)
my @seqs2uc = split(">", $seqinput);
shift(@seqs2uc); # remove blank first element (after doing split on > where > is the first character)
my $uc_seqs;
foreach my $header_seq (@seqs2uc) {
my ($h1, $s1) = split(/[\n\r]+/, $header_seq, 2);
if ($s1 =~ /[a-z]/) {
$s1 = uc($s1);
}
$uc_seqs .= ">$h1\n$s1";
}
my $seqfh = new IO::String($uc_seqs);
return($seqfh);
}