Skip to content
Commits on Source (9)
language: perl
perl:
- "5.26"
- "5.24"
- "5.20"
- "5.18"
- "5.16"
matrix:
include:
- perl: 5.18
env: COVERAGE=1 TEST_PARTITION=1
- perl: 5.18
env: COVERAGE=1 TEST_PARTITION=2
- perl: 5.18
env: COVERAGE=1 TEST_PARTITION=3
- perl: 5.18
env: COVERAGE=1 TEST_PARTITION=4
- perl: 5.18
env: COVERAGE=1 TEST_PARTITION=5
- perl: 5.18
env: COVERAGE=1 TEST_PARTITION=6
sudo: false
env:
global:
- PERL_CPANM_OPT="--notest --force --skip-satisfied"
- BIOPERL_NETWORK_TESTING=0 # disables the network tests
- TEST_PARTITIONS=6
addons:
apt:
packages:
- libdb-dev
- graphviz
- libgd2-xpm-dev
- libxml2-dev
before_install:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers
- source ~/travis-perl-helpers/init
- build-perl
- perl -V
- cpanm DBD::mysql DBD::Pg DBD::SQLite 2>&1 | tail -n 1
- cpanm Test::Pod 2>&1 | tail -n 1
- cpanm Bio::ASN1::EntrezGene 2>&1 | tail -n 1
- if [ "$TRAVIS_EVENT_TYPE" = "cron" -a "$BRANCH" = "network-cron-master" ]; then
export BIOPERL_NETWORK_TESTING=1;
git fetch origin master:master; git checkout master;
fi
- if [ "$BIOPERL_NETWORK_TESTING" = "1" ]; then
export TRAVIS_AUTHOR_TESTING=1;
export TRAVIS_RELEASE_TESTING=1;
cpanm LWP::UserAgent LWP::Protocol::https 2>&1 | tail -n 1;
fi
- build-dist
- cd $BUILD_DIR
install:
- cpan-install --deps
- cpan-install --coverage
before_script:
- coverage-setup
script:
- export AUTHOR_TESTING=${TRAVIS_AUTHOR_TESTING:=0}
- export RELEASE_TESTING=${TRAVIS_RELEASE_TESTING:=0}
- prove -l -j$(test-jobs) $(test-files)
after_success:
- coverage-report
- ./travis_scripts/trigger-dockerhub.sh
#TODO - send emails to bioperl-guts-l
notifications:
email:
recipients:
- bioperl-guts-l@lists.open-bio.org
- cjfields1@gmail.com
on_success: change
on_failure: change
# whitelist branches
branches:
only:
- master
- /^release-[1-9]*-[0-9]*-[0-9]*$/
- network-cron-master
......@@ -14,7 +14,7 @@
=item * Hilmar Lapp <hlapp at gmx.net>
=item * Heikki Lehvslaiho <heikki at ebi.ac.uk>
=item * Heikki Lehväslaiho <heikki at ebi.ac.uk>
=item * Aaron Mackey <amackey at pcbi.upenn.edu>
......@@ -145,7 +145,7 @@ for if you see fit)
=item * Arek Kasprzyk <arek at ebi.ac.uk>
=item * Andreas Khri <andreas.kahari at ebi.ac.uk>
=item * Andreas Kähäri <andreas.kahari at ebi.ac.uk>
=item * Charles C. Kim <cckim at stanford.edu>
......
# $Id: BUGS,v 1.7 2006-11-16 10:51:50 sendu Exp $
Known Bugs
Bugs are tracked at this URL:
https://github.com/bioperl/bioperl-live/issues
Bioperl 1.6 series
=============
Though a stable release, some bugs and enhancements remain for this series
that will be addressed in future point releases. For a full list please see:
https://github.com/bioperl/bioperl-live/issues
Bug Summary (additional info)
2247 Have Bio::SearchIO::blast methods available for other BLAST parsers
(enhancement request)
2332 Software for analysis of redundant fragments of affys human mitochip v2
(API hasn't stabilized, may appear in a 1.6 point release)
2439 multiple results HTMLResultWriter.pm and non-redundant entries in SearchIO
(partially implemented)
2463 bp_seqconvert.pl & Bio::SeqIO code cleanup and user friendly interface
(enhancement request)
2476 "Undefined sub-sequence" when processing tblastx output
(related to HSP tiling)
2482 paml4 mlc file fails to parse
(may require refactoring Bio::Tools::Phylo::PAML)
2492 Method "pi" in package Bio::PopGen::Statistics
(awaiting comment from Jason)
2513 creating a Bio::SeqFeature::Annotation object downloads the entire so.obo
(should allow local copies)
2594 Bio::Species memory leak
(fix implemented, but additional leaks likely remain)
2673 original fields not inherited by seq objects in alignment slices
(request for bequest/bequeath behavior for attribute carryover)
2686 WU-BLAST XML support
(partially implemented, but issues remain)
2691 Bio::Microarray::Tools::ReseqChip depends on CPAN module Statistics::Frequency
(related to bug 2332 above)
2696 global verbosity does not propagate to new objects post-set
(requires more specific implementation details)
2700 Refactor Build.PL
(some of the behind-the-scenes stuff is a little klunky)
2702 Scripts recopied upon each call to './Build test'
(minor bug)
2703 Bio::Tools::GuessSeqFormat guesses SELEX as PHYLIP
(minor bug that mistakes format)
2707 Bio::Tools::Run::StandAloneBlast does not quote shell metacharacters in
filenames, but Bio::SearchIO::blast does
(bug within StandAloneBlast)
2715 LocatableSeq symbols are globally set
(bug related to sequence symbol issues; rarely surfaces but needs addressing)
Bioperl 1.5.2
=============
There are no known installation bugs in 1.5.2 per se, but issues with
external programs may cause problems. See the following URL for details:
http://www.bioperl.org/wiki/Release_1.5.2#Notes
Bioperl 1.2
===========
* The StandAloneBlast.t test is failing on cygwin installations (and
nowhere else). We suspect something to do with temporary file
opening. Fixed in 1.4 (set TMPDIR).
Bioperl 0.9.0
=============
* Bio::Tools::Blast continues to cause problems for some people. As
it is not actively maintained there are a slew of reported bugs for
it that have not been fixed.
* Bio::Tools::Run::Alignment::TCoffee - t_coffee binary does not get
all parameters it needs when aligning (two) two DNA sequences
(jitterbug #966).
* Bio::Tools::Run::ClustalW and t/ClustalW will report errors for
clustalw versions 1.8x due to a bug in clustalw.
* Bio::DB::GenBank continues to have intermittent errors. Bio::DB::GDB
is also unreliable at times and one can safely ignore errors from
these during a make test.
Bio::DB::GenBank is unable to download whole contig files as well
as NCBI ref seqs like NT_* numbers unless the -format flag is
passed in and specified as 'fasta' in the constructor.
get_Stream_by_batch() also has intermittent errors which are being
tracked down.
Bioperl 0.7.2
=============
* NCBI has changed some of the cgi scripts for retrieving sequences
online which as resulted in some of the DB methods from not working
consistently. We are addressing these in the 0.9.x and 1.0 series
of releases. We recommend using the Bio::DB::EMBL object that is
part of the later releases.
Additionally RefSeq Contigs are not properly downloaded, please see
the bioperl list archives for information about potential
workarounds and ongoing development effort to address these.
Bioperl 0.7.1
=============
* Bio::Tools::BPlite does not parse and set frame properly for
tblastx reports (Jitterbug bug # 978).
* Bio::Tools::BPlite interface needs to be updated to fix parsing
more than bl2seq report report (Jitterbug bug #940), this has been
fixed on the main code trunk and will be part of the next major
bioperl release.
* If File::Temp is not installed, tempdirs are not cleaned up
properly. This is fixed on main code trunk with the introduction
of rmtree method in Bio::Root::IO, however, it is best to install
File::Temp when running 0.7 branch code.
* Bio::Tools::Blast does not allow users to run blast, instead use
Bio::Tools::Run::StandAloneBlast to run local blasts. To submit
jobs to a remote blast server like NCBI a module
Bio::Tools::Run::RemoteBlast has been written but is part of the
main trunk code and must be obtained through CVS until the next
major bioperl release.
Bioperl 0.7
===========
* Bio::Tools::BPlite doc error lists
code synopsis code as
my $parser = new BPlite(\*FH);
should be
my $parser = new Bio::Tools::BPlite(\*FH);
This diff is collapsed.
#
# BioPerl module for Bio::AlignIO::nexml
#
# Copyright Chase Miller
#
# You may distribute this module under the same terms as perl itself
# POD documentation - main docs before the code
=head1 NAME
Bio::AlignIO::nexml - NeXML format sequence alignment input/output stream driver
=head1 SYNOPSIS
Do not use this module directly. Use it via the L<Bio::AlignIO> class.
=head1 DESCRIPTION
This object can transform L<Bio::SimpleAlign> objects to and from
NeXML format. For more information on NeXML, visit L<http://www.nexml.org>.
=head1 FEEDBACK
=head2 Support
Please direct usage questions or support issues to the mailing list:
I<bioperl-l@bioperl.org>
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
=head2 Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution. Bug reports can be submitted via the
web:
https://github.com/bioperl/bioperl-live/issues
=head1 AUTHORS
Chase Miller
=head1 CONTRIBUTORS
Mark Jensen, maj@fortinbras.us
Rutger Vos, rutgeraldo@gmail.com
=head1 APPENDIX
The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _
=cut
# Let the code begin...
package Bio::AlignIO::nexml;
use strict;
use lib '../..';
use Bio::Nexml::Factory;
use Bio::Phylo::IO qw(parse unparse);
use base qw(Bio::AlignIO);
sub _initialize {
my($self,@args) = @_;
$self->SUPER::_initialize(@args);
$self->{_doc} = undef;
}
=head2 next_aln
Title : next_aln
Usage : $aln = $stream->next_aln
Function: returns the next alignment in the stream.
Returns : Bio::Align::AlignI object - returns 0 on end of file
or on error
Args :
See L<Bio::Align::AlignI>
=cut
sub next_aln {
my ($self) = @_;
unless ( $self->{'_parsed'} ) {
#use a parse function to load all the alignment objects found in the nexml file at once
$self->_parse;
}
return $self->{'_alns'}->[ $self->{'_alnsiter'}++ ];
}
=head2 rewind
Title : rewind
Usage : $alnio->rewind
Function: Resets the stream
Returns : none
Args : none
=cut
sub rewind {
my $self = shift;
$self->{'_alniter'} = 0;
}
=head2 doc
Title : doc
Usage : $treeio->doc
Function: Returns the biophylo nexml document object
Returns : Bio::Phylo::Project
Args : none or Bio::Phylo::Project object
=cut
sub doc {
my ($obj,$value) = @_;
if( defined $value) {
$obj->{'_doc'} = $value;
}
return $obj->{'_doc'};
}
sub _parse {
my ($self) = @_;
$self->{'_parsed'} = 1;
$self->{'_alnsiter'} = 0;
my $fac = Bio::Nexml::Factory->new();
# Only pass filename if filehandle is not available,
# or "Bio::Phylo" will create a new filehandle that ends
# out of scope and can't be closed directly, leaving 2 open
# filehandles for the same file (so file can't be deleted)
my $file_arg;
my $file_value;
if ( exists $self->{'_filehandle'}
and defined $self->{'_filehandle'}
) {
$file_arg = '-handle';
$file_value = $self->{'_filehandle'};
}
else {
$file_arg = '-file';
$file_value = $self->{'_file'};
}
$self->doc(parse(
$file_arg => $file_value,
'-format' => 'nexml',
'-as_project' => '1'
)
);
$self->{'_alns'} = $fac->create_bperl_aln($self);
if(@{ $self->{'_alns'} } == 0) {
self->debug("no seqs in $self->{_file}");
}
}
=head2 write_aln
Title : write_aln
Usage : $stream->write_aln(@aln)
Function: writes the $aln object into the stream in nexml format
Returns : 1 for success and 0 for error
Args : L<Bio::Align::AlignI> object
See L<Bio::Align::AlignI>
=cut
sub write_aln {
my ($self, $aln) = @_;
my $fac = Bio::Nexml::Factory->new();
my $taxa = $fac->create_bphylo_taxa($aln);
my ($matrix) = $fac->create_bphylo_aln($aln, $taxa);
$matrix->set_taxa($taxa);
$self->doc(Bio::Phylo::Factory->create_project());
$self->doc->insert($matrix);
my $ret = $self->_print($self->doc->to_xml());
$self->flush;
return $ret;
}
1;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# $Id: IO.pm 16690 2010-01-14 07:27:29Z kortsch $
#
# BioPerl module for Bio::Assembly::IO
#
# based on the Bio::SeqIO module
# by Ewan Birney <birney@ebi.ac.uk>
# and Lincoln Stein <lstein@cshl.org>
#
# Copyright Robson Francisco de Souza
#
# You may distribute this module under the same terms as perl itself
#
# _history
# POD documentation - main docs before the code
=head1 NAME
Bio::Assembly::IO - Handler for Assembly::IO Formats
=head1 SYNOPSIS
use Bio::Assembly::IO;
$in = Bio::Assembly::IO->new(-file=>"<inputfilename",
-format=>'phrap');
$out = Bio::Assembly::IO->new(-file=>">outputfilename",
-format=>'phrap');
while ( my $scaffold = $in->next_assembly() ) {
# do something with Bio::Assembly::Scaffold instance
# ...
$out->write_assembly(-scaffold => $scaffold);
}
$in->close;
$out->close;
=head1 DESCRIPTION
Bio::Assembly::IO is a handler module for formats in the Assembly::IO set
(e.g. Bio::Assembly::IO::phrap).
=head1 FEEDBACK
=head2 Mailing Lists
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to the
Bioperl mailing lists Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
=head2 Support
Please direct usage questions or support issues to the mailing list:
I<bioperl-l@bioperl.org>
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
=head2 Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution. Bug reports can be submitted via the
web:
https://github.com/bioperl/bioperl-live/issues
=head1 AUTHOR
Robson Francisco de Souza
E-mail: rfsouza@citri.iq.usp.br
=head1 CONTRIBUTORS
#
=head1 APPENDIX
The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _
=cut
package Bio::Assembly::IO;
use strict;
use base qw(Bio::Root::Root Bio::Root::IO);
=head2 new
Title : new
Usage : $stream = Bio::Assembly::IO->new( -file => $filename,
-format =>'format' )
Function: Returns a new assembly stream
Returns : A Bio::Assembly::IO::Handler initialised
with the appropriate format
Args : -file => $filename
-format => format
=cut
sub new {
my ($caller,@args) = @_;
my $class = ref($caller) || $caller;
# or do we want to call SUPER on an object if $caller is an
# object?
if( $class =~ /Bio::Assembly::IO::(\S+)/ ) {
my ($self) = $class->SUPER::new(@args);
$self->_initialize(@args);
return $self;
} else {
my %param = @args;
@param{ map { lc $_ } keys %param } = values %param; # lowercase keys
$class->throw("Need at least a file name to proceed!")
unless (defined $param{'-file'} || defined $ARGV[0]);
my $format = $param{'-format'} ||
$class->_guess_format( $param{-file} || $ARGV[0] );
$format = "\L$format"; # normalize capitalization to lower case
if ($format =~ /-/) {
($format, my $variant) = split('-', $format, 2);
push @args, (-variant => $variant);
}
return unless( $class->_load_format_module($format) );
return "Bio::Assembly::IO::$format"->new(@args);
}
}
=head2 format
Title : format
Usage : $format = $stream->format()
Function: Get the assembly format
Returns : assembly format
Args : none
=cut
# format() method inherited from Bio::Root::IO
# _initialize is chained for all SeqIO classes
sub _initialize {
my($self, @args) = @_;
# initialize the IO part
$self->_initialize_io(@args);
}
=head2 next_assembly
Title : next_assembly
Usage : $scaffold = $stream->next_assembly()
Function: Reads the next assembly object from the stream and returns it.
Returns : a Bio::Assembly::ScaffoldI compliant object
Args : none
=cut
sub next_assembly {
my ($self) = @_;
$self->throw("Cannot read from a generic Bio::Assembly::IO object.");
}
=head2 next_contig
Title : next_contig
Usage : $contig = $stream->next_contig()
Function: Reads the next contig or singlet from the stream and returns it.
Returns : a Bio::Assembly::Contig or Bio::Contig::Assembly::Singlet
Args : none
=cut
sub next_contig {
my ($self) = @_;
$self->throw("Cannot read from a generic Bio::Assembly::IO object.");
}
=head2 write_assembly
Title : write_assembly
Usage : $stream->write_assembly($assembly)
Function: Write the assembly object in desired format. This method calls
write_header(), write_contigs() and write_footer() internally.
Returns : 1 on success, 0 for error
Args : A Bio::Assembly::Scaffold object
=cut
sub write_assembly {
my ($self, @args) = @_;
my ($scaf, $write_singlets) = $self->_rearrange([qw(SCAFFOLD SINGLETS)], @args);
# Sanity check
if ( !$scaf || !$scaf->isa('Bio::Assembly::ScaffoldI') ) {
$self->throw("Must provide a Bio::Assembly::Scaffold object when calling write_assembly");
}
# Write header
$self->write_header($scaf);
# ID-sorted contig and read entries
my @contig_ids = $scaf->get_contig_ids;
if ($write_singlets) {
push @contig_ids, $scaf->get_singlet_ids;
}
@contig_ids = _sort(@contig_ids);
# Write contigs
for my $contig_id ( @contig_ids ) {
my $contig = $scaf->get_contig_by_id($contig_id) ||
$scaf->get_singlet_by_id($contig_id);
$self->write_contig($contig);
}
# Write footer
$self->write_footer($scaf);
return 1;
}
=head2 write_header
Title : write_header
Usage : $stream->write_header($assembly)
Function: Write the start of the assembly file. It can be called at any time,
not when starting to write the assembly file.
Returns : 1 on success, 0 for error
Args : A Bio::Assembly::Scaffold object or ... (check the specific format
driver for more details)
=cut
sub write_header {
my ($self) = @_;
$self->throw("Cannot write from a generic Bio::Assembly::IO object.");
}
=head2 write_contig
Title : write_contig
Usage : $stream->write_contig($contig)
Function: Write a contig object in the desired format.
Returns : 1 on success, 0 for error
Args : A Bio::Assembly::Contig object
=cut
sub write_contig {
my ($self) = @_;
$self->throw("Cannot write from a generic Bio::Assembly::IO object.");
}
=head2 write_footer
Title : write_footer
Usage : $stream->write_footer($assembly)
Function: Write the start of the assembly file.
Returns : 1 on success, 0 for error
Args : A Bio::Assembly::Scaffold object or ... (check the specific format
driver for more details)
=cut
sub write_footer {
my ($self) = @_;
$self->throw("Cannot write from a generic Bio::Assembly::IO object.");
}
=head2 _load_format_module
Title : _load_format_module
Usage : *INTERNAL Assembly::IO stuff*
Function: Loads up (like use) a module at run time on demand
Example :
Returns :
Args :
=cut
sub _load_format_module {
my ($self,$format) = @_;
my $module = "Bio::Assembly::IO::" . $format;
my $ok;
eval {
$ok = $self->_load_module($module);
};
if ( $@ ) {
print STDERR <<END;
$self: could not load $format - for more details on supported formats please see the Assembly::IO docs
Exception $@
END
;
}
return $ok;
}
=head2 _guess_format
Title : _guess_format
Usage : $obj->_guess_format($filename)
Function: guess format based on file suffix
Example :
Returns : guessed format of filename (lower case)
Args :
Notes : formats that _filehandle() will guess includes
ace, phrap and tigr at the moment
=cut
sub _guess_format {
my $class = shift;
my $arg = shift;
return unless defined($arg);
return 'ace' if ($arg =~ /\.ace/i);
return 'phrap' if ($arg =~ /\.phrap/i);
return 'tigr' if ($arg =~ /\.tigr/i);
return 'maq' if ($arg =~ /\.maq/i);
return 'sam' if ($arg =~ /\.[bs]am/i);
return 'bowtie' if ($arg =~ /\.bowtie/i);
}
=head2 _sort
Title : _sort
Usage : @sorted_values = $ass_io->_sort(@values)
Function: Sort a list of values naturally if Sort::Naturally is installed
(nicer), lexically otherwise (not as nice, but safe)
Returns : array of sorted values
Args : array of values to sort
=cut
sub _sort {
my @arr = @_;
my @sorted_arr;
if (eval { require Sort::Naturally }) {
@sorted_arr = Sort::Naturally::nsort( @arr ); # natural sort (better)
} else {
@sorted_arr = sort @arr; # lexical sort (safe)
}
return @sorted_arr;
}
sub DESTROY {
my $self = shift;
$self->close();
}
# I need some direction on these!! The module works so I haven't fiddled with them!
# Me neither! (rfsouza)
sub TIEHANDLE {
my ($class,$val) = @_;
return bless {'seqio' => $val}, $class;
}
sub READLINE {
my $self = shift;
return $self->{'seqio'}->next_seq() || undef unless wantarray;
my (@list, $obj);
push @list, $obj while $obj = $self->{'seqio'}->next_seq();
return @list;
}
sub PRINT {
my $self = shift;
$self->{'seqio'}->write_seq(@_);
}
1;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.