bio-2.0.6/ 0000755 0001750 0001751 00000000000 14764611416 011631 5 ustar nilesh nilesh bio-2.0.6/LEGAL 0000644 0001750 0001751 00000011040 14764611416 012374 0 ustar nilesh nilesh LEGAL NOTICE INFORMATION
------------------------
All the files in this distribution are covered under either the Ruby's
license (see the file COPYING) or public-domain except some files
mentioned below.
sample/any2fasta.rb:
Copyright (C) 2006 Pjotr Prins
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
sample/biofetch.rb:
Copyright (C) 2002-2004 KATAYAMA Toshiaki
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
sample/enzymes.rb:
Copyright (C) 2006 Pjotr Prins and
Trevor Wennblom
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
sample/fasta2tab.rb:
sample/fsplit.rb:
sample/gb2tab.rb:
sample/genes2nuc.rb:
sample/genes2pep.rb:
sample/genes2tab.rb:
sample/genome2tab.rb:
sample/gt2fasta.rb:
sample/ssearch2tab.rb:
sample/tfastx2tab.rb:
sample/vs-genes.rb:
Copyright (C) 2001 KATAYAMA Toshiaki
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
sample/fastagrep.rb:
sample/fastasort.rb:
Copyright (C) 2008 KATAYAMA Toshiaki & Pjotr Prins
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
sample/gb2fasta.rb:
Copyright (C) 2001 KATAYAMA Toshiaki
Copyright (C) 2002 Yoshinori K. Okuji
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
sample/gbtab2mysql.rb:
sample/genome2rb.rb:
sample/pmfetch.rb:
sample/pmsearch.rb:
Copyright (C) 2002 KATAYAMA Toshiaki
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
sample/tdiary.rb:
Copyright (C) 2003 KATAYAMA Toshiaki
Mitsuteru C. Nakao
Itoshi NIKAIDO
Takeya KASUKAWA
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
test/data/uniprot/p53_human.uniprot:
This Swiss-Prot entry is copyright. It is produced through a collaboration
between the Swiss Institute of Bioinformatics and the EMBL outstation -
the European Bioinformatics Institute. There are no restrictions on its
use as long as its content is in no way modified and this statement is not
removed.
test/data/uniprot/P03589.uniprot:
test/data/uniprot/P28907.uniprot:
test/data/uniprot/P49144.uniprot:
Copyrighted by the UniProt Consortium, see https://www.uniprot.org/terms
Distributed under the Creative Commons Attribution (CC BY 4.0) License
https://www.uniprot.org/help/license
https://creativecommons.org/licenses/by/4.0/
GPL:
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
LGPL:
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
bio-2.0.6/KNOWN_ISSUES.rdoc 0000644 0001750 0001751 00000014352 14764611416 014476 0 ustar nilesh nilesh = KNOWN_ISSUES.rdoc - Known issues and bugs in BioRuby
Copyright:: Copyright (C) 2009-2020 Naohisa Goto
License:: The Ruby License
= Known issues and bugs in BioRuby
Below are known issues and bugs in BioRuby. Patches to fix them are welcome.
We hope they will be fixed in the future.
Items marked with (WONT_FIX) tags would not be fixed within BioRuby because
they are not BioRuby's issues and/or it is very difficult to fix them.
== 1. Ruby version specific issues
==== String encodings
Currently, BioRuby do not care string encodings. In some cases,
Encoding::CompatibilityError or "ArgumentError: invalid byte sequence in
(encoding name)" may be raised.
=== End-of-life Ruby versions
==== Ruby 1.9.0
(WONT_FIX) Ruby 1.9.0 is NOT supported because it isn't a stable release.
==== Ruby 1.9.1 or earlier (including Ruby 1.8.7)
(WONT_FIX) Problems observed only with Ruby 1.9.1 or earlier will not be
fixed. Note that Ruby 1.9.1 or earlier is no longer supported, as described
in README.rdoc.
==== Ruby 1.8.2 or earlier
(WONT_FIX) In some cases, temporary files and directories may not be
removed because of the lack of FileUtils.remove_entry_secure.
=== Problem with REXML DoS vulnerability patch before 09-Nov-2008
(WONT_FIX) If you have applied a patch taken from
http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/
before 09 Nov 2008 12:40 +0900, because of the bug in the patch,
parsing of Blast XML results with REXML parser may fail. The bug is already
fixed and new patch is available on the above URL. Note that some Linux
distributions would have incorporated the patch in their manners, and may
have the same problem.
=== RubyGems 0.8.11 or earlier
(WONT_FIX) With very old version of RubyGems, use 'require_gem' which was
deprecated in RubyGems 0.9.0 and removed in RubyGems 1.0.1.
#!/usr/bin/env ruby
require 'rubygems'
require_gem 'bio'
=== JRuby
On JRuby, errors may be raised due to the following unfixed bugs in JRuby.
* {JRUBY-6195}[http://jira.codehaus.org/browse/JRUBY-6195] Process.spawn
(and related methods) ignore option hash
* {JRUBY-6818}[http://jira.codehaus.org/browse/JRUBY-6818] Kernel.exec,
Process.spawn (and IO.popen etc.) raise error when program is an array
containing two strings
(WONT_FIX) With older version of JRuby, you may be bothered by the following
bugs that have already been fixed in the head of JRuby.
* {JRUBY-6658}[http://jira.codehaus.org/browse/JRUBY-6658] Problem when
setting up an autoload entry, defining a class via require, then redefining
the autoload entry
* {JRUBY-6666}[http://jira.codehaus.org/browse/JRUBY-6666] Open3.popen3
failing due to missing handling for [path, argv[0]] array
* {JRUBY-6819}[http://jira.codehaus.org/browse/JRUBY-6819]
java.lang.ArrayIndexOutOfBoundsException in String#each_line
(WONT_FIX) Due to JRUBY-5678 (resolved issue) and the difference of behavior
between CRuby and JRuby written in the comments of the issue tracking page,
when running BioRuby on JRuby with sudo or root rights, TMPDIR environment
variable should be set to a directory that is not world-writable. Currently,
the workaround is needed for running BioRuby tests with JRuby on Travis-CI.
* {JRUBY-5678}[http://jira.codehaus.org/browse/JRUBY-5678] tmpdir cannot
be delete when jruby has sudo/root rights
=== Rubinius
According to Travis-CI, unit tests have failed on 1.9 mode of Rubinius.
(WONT_FIX) With older version of Rubinius, you may be bothered by the
following bugs that have already been fixed in the head of Rubinius.
* {Rubinius Issue #1693}[https://github.com/rubinius/rubinius/issues/1693]
String#split gives incorrect output when splitting by /^/
* {Rubinius Issue #1724}[https://github.com/rubinius/rubinius/issues/1724]
Creating Struct class with length attribute
== 2. OS and/or architecture-dependent issues
=== Microsoft Windows
==== Text mode issues
Following 4 tests failed on mswin32 (and maybe on mingw32 and bccwin32)
because of the conversion of line feed codes in the text mode.
* test_ended_pos and test_start_pos in test/unit/bio/io/test_flatfile.rb
* test_pos in test/unit/bio/io/flatfile/test_buffer.rb
* test_entry_pos in test/unit/bio/appl/blast/test_rpsblast.rb
This indicates that br_bioflat.rb and Bio::FlatFileIndex may create
incorrect indexes on mswin32, mingw32, and bccwin32. In addition,
Bio::FlatFile may return incorrect data.
==== String escaping of command-line arguments
After BioRuby 1.4.1, in Ruby 1.9.X running on Windows, escaping of
command-line arguments are processed by the Ruby interpreter. Before BioRuby
1.4.0, the escaping is executed in Bio::Command#escape_shell_windows, and
the behavior is different from the Ruby interpreter's one.
Curreltly, due to the change, test/functional/bio/test_command.rb may fail
on Windows with Ruby 1.9.X.
==== Windows 95/98/98SE/ME
(WONT_FIX) Some methods that call external programs may not work in
Windows 95/98/98SE/ME because of the limitation of COMMAND.COM.
=== OpenVMS, BeOS, OS/2, djgpp, Windows CE
(WONT_FIX) BioRuby may not work on these platforms.
== 3. Known issues and bugs in BioRuby
=== Bio::UniProtKB
Bio::UniProtKB should be updated to follow UniProtKB format changes described
in http://www.uniprot.org/docs/sp_news.htm .
=== Bio::PDB
Bio::PDB should be updated to follow PDB format version 3.3.
=== Bio::Blast::Report
NCBI announces that that they are makeing a new version of BLAST XML data
format. BioRuby should support it.
=== Bio::Blast::Default::Report
Bio::Blast::Default::Report currently supports legacy BLAST only.
It may be better to support BLAST+ text output format, although NCBI
do not recommend to do so because the format is unstable.
== 4. Compatibility issues with other libraries/extensions
=== Ruby on Rails
BioRuby Shell on Web uses Ruby on Rails, but the author of the document does
not know which version is suitable.
== 5. Historical descriptions
=== CVS
For historical purposes: the anonymous CVS was provided at
* http://cvs.bioruby.org/
and could be obtained by the following procedure.
% cvs -d :pserver:cvs@code.open-bio.org:/home/repository/bioruby login
CVS password: cvs (login with a password 'cvs' for the first time)
% cvs -d :pserver:cvs@code.open-bio.org:/home/repository/bioruby co bioruby
These may be closed without any prior notice.
bio-2.0.6/appveyor.yml 0000644 0001750 0001751 00000001322 14764611416 014217 0 ustar nilesh nilesh ---
version: "{build}"
image: Visual Studio 2019
branches:
only:
- master
- incoming
clone_depth: 10
install:
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
- bundle config set --local path vendor\bundle
- bundle install --retry 5 --jobs=%NUMBER_OF_PROCESSORS%
build: off
before_test:
- ruby --version
- gem --version
- bundle --version
test_script:
- bundle exec rake
environment:
matrix:
- ruby_version: "27"
- ruby_version: "27-x64"
- ruby_version: "30"
- ruby_version: "30-x64"
- ruby_version: "31"
# - ruby_version: "31-x64"
cache:
# If one of the files after the right arrow changes, cache will be invalidated
- 'vendor\bundle -> appveyor.yml,Gemfile,bioruby.gemspec'
bio-2.0.6/bioruby.gemspec.erb 0000644 0001750 0001751 00000006137 14764611416 015427 0 ustar nilesh nilesh Gem::Specification.new do |s|
s.name = 'bio'
s.version = "<% ###### Below is executed in ERB environment ######
# Version can be specified by the environment variable
env_ver = ENV['BIORUBY_GEM_VERSION']
env_ver = nil if env_ver.to_s.strip.empty?
# By default, determined from lib/bio/version.rb
load "./lib/bio/version.rb" unless defined?(BIO_VERSION_RB_LOADED)
ver = Bio::BIORUBY_VERSION.dup
case Bio::BIORUBY_EXTRA_VERSION
when nil
# does nothing
when /\A\.(pre)\z/
ver.push $1
ver.push Time.now.strftime("%Y%m%d")
when /\A\.(.+)\z/
ver.push $1
else
raise "unsupported BIORUBY_EXTRA_VERSION"
end
%><%=
(env_ver || ver.join('.'))
###### Above is executed in ERB environment ######
%>"
s.author = "BioRuby project"
s.email = "staff@bioruby.org"
s.homepage = "http://bioruby.org/"
s.license = "Ruby"
s.summary = "Bioinformatics library"
s.description = "BioRuby is a library for bioinformatics (biology + information science)."
s.platform = Gem::Platform::RUBY
s.files = [
<% ###### Below is executed in ERB environment ######
# Gets file list from the "git ls-files" command.
files = (`git ls-files` rescue nil).to_s.split(/\r?\n/)
files.delete_if { |x| x.empty? }
# When git-ls-files isn't available, creates a list from current files.
if !$? or !($?.success?) or files.size <= 0 then
files =
[ "README.rdoc", "README_DEV.rdoc",
"ChangeLog", "KNOWN_ISSUES.rdoc",
"RELEASE_NOTES.rdoc",
"Rakefile", "bioruby.gemspec.erb",
"bioruby.gemspec", "setup.rb",
"extconf.rb", "LEGAL",
"COPYING", "COPYING.ja", "GPL", "LGPL"
] + Dir.glob("{doc,etc,gemfiles,lib,sample,test}/**/*").delete_if do |item|
case item
when /(\A|\/)CVS(\z|\/)/, /(\A|\/)rdoc(\z|\/)/, /\~\z/
true
else
false
end
end
end
%><%=
files.sort.collect { |x| x.dump }.join(",\n ")
###### Above is executed in ERB environment ######
%>
]
s.extra_rdoc_files = [
<%= ###### Below is executed in ERB environment ######
# Files whose suffix are .rdoc are selected.
rdoc_files = files.find_all { |item| /\.rdoc\z/ =~ item }
# Fail safe settings
if rdoc_files.empty? then
rdoc_files = [ 'README.rdoc', 'README_DEV.rdoc',
'RELEASE_NOTES.rdoc',
'doc/Changes-1.3.rdoc',
]
end
def rdoc_files.add_file(name)
self.push(name) unless self.include?(name)
end
#rdoc_files.add_file "ChangeLog"
#rdoc_files.add_file "LEGAL"
rdoc_files.sort.collect { |x| x.dump }.join(",\n ")
###### Above is executed in ERB environment ######
%>
]
s.rdoc_options << '--main' << 'README.rdoc'
s.rdoc_options << '--title' << 'BioRuby API documentation'
s.rdoc_options << '--exclude' << '\.yaml\z'
s.rdoc_options << '--line-numbers' << '--inline-source'
s.require_path = 'lib'
end
bio-2.0.6/ChangeLog 0000644 0001750 0001751 00000212150 14764611416 013404 0 ustar nilesh nilesh commit a5fdb471873ec9f9f11eea627d76dbd4c2e4efc5
Author: Naohisa Goto
Date: Fri Mar 7 18:26:32 2025 +0900
ruby.yml: update ruby versions and other descriptions
.github/workflows/ruby.yml | 23 +++++++----------------
1 file changed, 7 insertions(+), 16 deletions(-)
commit 98c24b6ed9fb508b5bfc72ff965fb77e0ec7c35d
Author: Naohisa Goto
Date: Fri Mar 7 16:58:56 2025 +0900
change recommended Ruby versions
README.rdoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 948377e3fa198e24ac2655f924b903f5296b4955
Author: Naohisa Goto
Date: Fri Mar 7 16:55:20 2025 +0900
update release notes for upcoming BioRuby 2.0.6
RELEASE_NOTES.rdoc | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
commit 123910e5d18caa247c40ecede67015c2e23c0538
Author: Naohisa Goto
Date: Fri Mar 7 16:25:44 2025 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
commit 6c110b23d446f5926579a8e92b260a71948689eb
Author: Naohisa Goto
Date: Fri Mar 7 16:20:26 2025 +0900
prepare for BioRuby 2.0.6 release
lib/bio/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 5c39d4c6a56c4fd2dc108d3350e9f60f26591ac4
Author: Naohisa Goto
Date: Fri Mar 7 16:14:13 2025 +0900
Fix test failure due to data changes of the KEGG databases
test/network/bio/db/kegg/test_genes_hsa7422.rb | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
commit 6f314341e303c25385027355c3365cf0a0d2ef9a
Author: Naohisa Goto
Date: Fri Mar 7 03:56:27 2025 +0900
Ruby 3.4 support: Use URI::RFC2396_PARSER if possible.
* Suppress warning: "URI::RFC3986_PARSER.unescape is obsolete.
Use URI::RFC2396_PARSER.unescape explicitly." shown in Ruby 3.4.
lib/bio/db/gff.rb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
commit d9b83a068fbf061c7b8072e7ab2479509f9ba130
Author: Naohisa Goto
Date: Fri Mar 7 03:18:10 2025 +0900
Bug fix: Bio::PROSITE.pa2re should not modify argument string
* For suppressing "literal string will be frozen in the future" warning
in Ruby 3.4, Bio::PROSITE.pa2re(string) is changed not to modify
the given string in the argument. Modifying argument objects by a method
should generally be avoided because this behavior may cause subtle bugs
and I think this behavior is a bug.
lib/bio/db/prosite.rb | 2 ++
1 file changed, 2 insertions(+)
commit cca91ac0fa39d63b85a28d72e9b2afb56a40b984
Author: Naohisa Goto
Date: Fri Mar 7 03:07:11 2025 +0900
Ruby 3.4 support: suppress "literal string will be frozen" warnings
* Suppress "literal string will be frozen in the future" warning messages
in Ruby 3.4.
* Add "frozen_string_literal: true" magic comment in each file.
lib/bio/appl/clustalw/report.rb | 5 ++--
lib/bio/appl/iprscan/report.rb | 3 +-
lib/bio/appl/meme/mast.rb | 3 +-
lib/bio/appl/paml/common.rb | 3 +-
lib/bio/db.rb | 9 +++---
lib/bio/db/embl/common.rb | 7 +++--
lib/bio/db/fastq.rb | 5 ++--
lib/bio/db/gff.rb | 15 +++++-----
lib/bio/db/newick.rb | 11 ++++----
lib/bio/db/pdb/chain.rb | 3 +-
lib/bio/db/pdb/pdb.rb | 3 +-
lib/bio/io/flatfile/buffer.rb | 3 +-
lib/bio/io/flatfile/splitter.rb | 3 +-
lib/bio/pathway.rb | 3 +-
lib/bio/sequence/common.rb | 3 +-
.../range/sequence_range/fragment.rb | 5 ++--
lib/bio/util/sirna.rb | 5 ++--
test/unit/bio/appl/iprscan/test_report.rb | 5 ++--
test/unit/bio/io/flatfile/test_splitter.rb | 11 +++++---
test/unit/bio/sequence/test_common.rb | 5 ++--
test/unit/bio/test_alignment.rb | 33 +++++++++++-----------
test/unit/bio/test_sequence.rb | 5 ++--
22 files changed, 87 insertions(+), 61 deletions(-)
commit 89129b6045ebda95363e58f8724e30225aa62d27
Author: Naohisa Goto
Date: Fri Aug 30 16:32:33 2024 +0900
Add Tutorial.md and Tutorial_ja.md
converted from Tutorial.rd and Tutorial.rd.ja
* Add Tutorial.md and Tutorial_ja.md converted
from Tutorial.rd and Tutorial.rd.ja
by using customized rd2markdown
(https://github.com/ngoto/rd2markdown-app )
* The following command line is used
(Note: rd2markdown-app repository is downloaded to ../tmp):
$ env RUBYLIB=../tmp/rd2markdown-app/lib \
rd2 -r rd/rd2markdown-lib.rb Tutorial.rd > Tutorial.md
doc/Tutorial.md | 1274 ++++++++++++++++++++++++++
doc/Tutorial_ja.md | 2595 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 3869 insertions(+)
create mode 100644 doc/Tutorial.md
create mode 100644 doc/Tutorial_ja.md
commit 7a1809f1e8b45fa8e38a6c8970b6319d04fa800e
Author: Naohisa Goto
Date: Wed Sep 27 23:09:03 2023 +0900
BioRuby 2.0.5 is released
ChangeLog | 287 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 287 insertions(+)
commit 1bf3a415b694e34f112ed082184c5bdf21157d3b
Author: Naohisa Goto
Date: Wed Sep 27 22:54:17 2023 +0900
update release notes for upcoming BioRuby 2.0.5
RELEASE_NOTES.rdoc | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
commit e7cd12319f207da77cfcde822bfc7e158897a42b
Author: Naohisa Goto
Date: Wed Sep 27 22:18:54 2023 +0900
README.rdoc: change recommended Ruby versions
README.rdoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 631f2546ca5fa9e499d55bd20053e81bb3efa206
Author: Naohisa Goto
Date: Wed Sep 27 21:58:24 2023 +0900
PTS1 site seems to be migrated to https
lib/bio/appl/pts1.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit f31fbbaa27532cd29c2f7303e729a97a6843b297
Author: Naohisa Goto
Date: Wed Sep 27 21:40:26 2023 +0900
POST path seems to be changed in remote BLAST in genome.jp (GenomeNet)
lib/bio/appl/blast/genomenet.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
commit 9013c2f8b90fc1f56d410d78007dc500af87ee45
Author: Naohisa Goto
Date: Wed Sep 27 18:41:32 2023 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
commit 6681c10f947290fc90b410c7620968164d777c85
Author: Naohisa Goto
Date: Wed Sep 27 18:29:40 2023 +0900
appveyor.yml: disable 31-x64 because of stringio 3.0.8 build failure
appveyor.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 002227f52b05144668214b5c460055d002d865a1
Author: Naohisa Goto
Date: Wed Sep 27 18:11:53 2023 +0900
remove files/dirs only used from older appveyor.yml
gemfiles/Gemfile.windows | 6 ------
1 file changed, 6 deletions(-)
delete mode 100644 gemfiles/Gemfile.windows
commit e47f4dc8026cf78ab9daaa59e023512081aa88a1
Author: Naohisa Goto
Date: Wed Sep 27 18:01:26 2023 +0900
update appveyor.yml
* Visual Studio 2019 image is specified
* Branch "incoming" is added
* Not to use customized Gemfile
* Not to build and install gem but only to execute rake normally
* Update ruby versions
* Add installation retry and caching, copied from jekyll repository
* References:
* https://www.appveyor.com/docs/lang/ruby/
* https://github.com/jekyll/jekyll/blob/master/appveyor.yml
appveyor.yml | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
commit b3977e58cde42f0c56fd3dccd6847d162dc349e8
Author: Naohisa Goto
Date: Wed Sep 27 17:03:33 2023 +0900
remove files only used for Travis-CI, mentioned in .travis.yml
gemfiles/Gemfile.travis-jruby1.8 | 6 ------
gemfiles/Gemfile.travis-jruby1.9 | 5 -----
gemfiles/Gemfile.travis-rbx | 10 ----------
gemfiles/Gemfile.travis-ruby1.8 | 6 ------
gemfiles/Gemfile.travis-ruby1.9 | 5 -----
gemfiles/modify-Gemfile.rb | 28 ----------------------------
gemfiles/prepare-gemspec.rb | 29 -----------------------------
7 files changed, 89 deletions(-)
delete mode 100644 gemfiles/Gemfile.travis-jruby1.8
delete mode 100644 gemfiles/Gemfile.travis-jruby1.9
delete mode 100644 gemfiles/Gemfile.travis-rbx
delete mode 100644 gemfiles/Gemfile.travis-ruby1.8
delete mode 100644 gemfiles/Gemfile.travis-ruby1.9
delete mode 100644 gemfiles/modify-Gemfile.rb
delete mode 100644 gemfiles/prepare-gemspec.rb
commit f7a2063353351f1b7341e98857f25e182c41adaa
Author: Naohisa Goto
Date: Wed Sep 27 16:44:58 2023 +0900
remove .travis.yml
* Also remove webhook for Travis-CI in GitHub settings
* Thanks to Travis-CI to run CI for a long time.
* Thanks to Open Bioinformatics Foundation for funding to
automatic testing of pull requests for a long time.
(https://www.open-bio.org/2012/07/30/travis-ci-for-testing/ ).
.travis.yml | 71 -------------------------------------------------------------
1 file changed, 71 deletions(-)
delete mode 100644 .travis.yml
commit 3ea8ecdd482ca2b5c8525959f37ed8f0f9a881e6
Author: Naohisa Goto
Date: Wed Sep 27 16:10:15 2023 +0900
ruby.yml: add "incoming" branch
.github/workflows/ruby.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit 350587b2b16532078e8bd5f303df96a5dc5a0d70
Author: Naohisa Goto
Date: Wed Sep 27 16:04:48 2023 +0900
ruby.yml: add ruby 3.1 and 3.2
.github/workflows/ruby.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 6a0de6744b7324a3a04e5c3d7468d5aec84608b1
Author: Naohisa Goto
Date: Wed Sep 27 15:43:27 2023 +0900
prepare for BioRuby 2.0.5 release
lib/bio/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 1c77ef24514e87f98be72792646910285be8498f
Author: Naohisa Goto
Date: Wed Sep 27 14:42:57 2023 +0900
Create ruby.yml
Create ruby.yml from the template by GitHub
.github/workflows/ruby.yml | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 .github/workflows/ruby.yml
commit 22b7217c5c830013cb53cb297e6a07e940d60ddc
Author: Naohisa Goto
Date: Wed Sep 27 13:55:50 2023 +0900
add .gitignore
* References:
* https://www.gitignore.io/api/ruby
* https://github.com/github/gitignore/blob/main/Ruby.gitignore
.gitignore | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 .gitignore
commit 1244da434f1a46d85a3204f9ba74d038c9535631
Author: Naohisa Goto
Date: Wed Sep 27 11:06:49 2023 +0900
added gems that are no longer "default" gems in recent Ruby versions
* Added gems that are no longer the default gems:
* "rexml" -- since Ruby 3.0
* "matrix" -- since Ruby 3.1
Gemfile | 3 +++
1 file changed, 3 insertions(+)
commit bd77c7a25eca7681f0176c2425d84415461bcc61
Author: Naohisa Goto
Date: Tue Sep 26 17:52:03 2023 +0900
update tests to reflect changes of hsa:7422 (KEGG GENES)
test/network/bio/db/kegg/test_genes_hsa7422.rb | 38 ++++++++++++++++++--------
1 file changed, 26 insertions(+), 12 deletions(-)
commit 0eca7bba8ee26f2bc4db86b10053e291cd1ab8a9
Author: Naohisa Goto
Date: Tue Sep 26 17:50:31 2023 +0900
add assertions to suppress warnings when ruby -v
test/functional/bio/test_command.rb | 2 ++
1 file changed, 2 insertions(+)
commit 34f56a39baadd5247423588579330f279ab220f5
Author: Naohisa Goto
Date: Tue Sep 26 17:48:24 2023 +0900
update test/data/uniprot/P49144.uniprot and change related tests
test/data/uniprot/P49144.uniprot | 13 +++++++++----
test/unit/bio/db/embl/test_uniprotkb_P49144.rb | 4 ++--
2 files changed, 11 insertions(+), 6 deletions(-)
commit 2a9f6b0b0bf10a376dff48da58b74eecb40e8553
Author: Naohisa Goto
Date: Tue Sep 26 17:34:23 2023 +0900
Bug fix: Bio::UniProtKB#oh: OH lines parser error occurred for P03589
lib/bio/db/embl/uniprotkb.rb | 51 +++++++++++++++++++++++++++++++-------------
1 file changed, 36 insertions(+), 15 deletions(-)
commit 5a644566891b274cc9532b926d4380899b7725af
Author: Naohisa Goto
Date: Tue Sep 26 17:28:54 2023 +0900
Add a test class to parse UniProtKB P03589 with the data
LEGAL | 1 +
test/data/uniprot/P03589.uniprot | 127 +++++++++
test/unit/bio/db/embl/test_uniprotkb_P03589.rb | 378 +++++++++++++++++++++++++
3 files changed, 506 insertions(+)
create mode 100644 test/data/uniprot/P03589.uniprot
create mode 100644 test/unit/bio/db/embl/test_uniprotkb_P03589.rb
commit 3273d1e9f7fa625fa1120ab17b85a222f9142cff
Author: Naohisa Goto
Date: Thu Oct 6 23:17:17 2022 +0900
Bug fix: suppress NoMethodError when parsing CC lines
* Bio::UniProtKB#cc: When parsing a nonexistent CC topic,
"NoMethodError: undefined method `join' for nil:NilClass"
was raised. To suppress the error, changed to return nil
if the given data is nil.
lib/bio/db/embl/uniprotkb.rb | 8 ++++++++
1 file changed, 8 insertions(+)
commit c426a71de2ed6bb58cd097cecc221f12c0a0ab8a
Author: Naohisa Goto
Date: Thu Oct 6 23:10:42 2022 +0900
Another tests for the FT lines format change since UniProt release 2019_11
LEGAL | 1 +
test/data/uniprot/P49144.uniprot | 227 ++++++++++++++++
test/unit/bio/db/embl/test_uniprotkb_P49144.rb | 359 +++++++++++++++++++++++++
3 files changed, 587 insertions(+)
create mode 100644 test/data/uniprot/P49144.uniprot
create mode 100644 test/unit/bio/db/embl/test_uniprotkb_P49144.rb
commit a9af82b3c61ebaa4351c7dfdfa3d1a1c09581b73
Author: Naohisa Goto
Date: Thu Oct 6 23:00:37 2022 +0900
more fix for FT lines format change since UniProt release 2019_11
* Bio::UniProtKB#ft: When the end position is empty, end position
is regarded as the same as start position.
This fix the bug:
https://github.com/bioruby/bioruby/issues/147#issuecomment-1246458688
lib/bio/db/embl/uniprotkb.rb | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
commit 5d1cc85ff9e028f4663d6a4ac1e312b50eb50c72
Author: Naohisa Goto
Date: Tue Sep 13 21:20:12 2022 +0900
BioRuby 2.0.4 is released
ChangeLog | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
commit 1bc877e557e165b42eea992d89f19a63996cb586
Author: Naohisa Goto
Date: Tue Sep 13 21:19:01 2022 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
commit 190e4751b84cc45cbce636c4414482a8169b08df
Author: Naohisa Goto
Date: Tue Sep 13 21:18:06 2022 +0900
prepare for BioRuby 2.0.4 release
lib/bio/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit a666639e0393e96b2de0bbcb447c13f8a14ad06d
Author: Naohisa Goto
Date: Tue Sep 13 21:17:11 2022 +0900
update release notes for upcoming BioRuby 2.0.4
RELEASE_NOTES.rdoc | 14 ++++++++++++++
1 file changed, 14 insertions(+)
commit c0d197343dd7fd8999d04083c9e8f24fa37a2f93
Author: Naohisa Goto
Date: Tue Sep 13 21:13:40 2022 +0900
License of UniProt data is CC BY 4.0
LEGAL | 9 +++++++++
1 file changed, 9 insertions(+)
commit e670102e6d4deb04c1fcae62459cc02861132d25
Author: Naohisa Goto
Date: Tue Sep 13 21:01:50 2022 +0900
Bug fix: Bio::UniProtKB#protein_name and #synonyms may raise error
* Bug fix: Bio::UniProtKB#protein_name and #synonyms may raise error
after calling Bio::UniProtKB#de method.
lib/bio/db/embl/uniprotkb.rb | 25 ++++++++++++++++++-------
test/unit/bio/db/embl/test_uniprotkb_P28907.rb | 11 +++++++++++
2 files changed, 29 insertions(+), 7 deletions(-)
commit 9c04e08e8d1316ffd7fc15ab311cea5dd6937d36
Author: Naohisa Goto
Date: Tue Sep 13 20:44:46 2022 +0900
Supports format change of FT lines since UniProt release 2019_11
* Bio::UniProtKB#ft: Supports text format change of FT lines since
UniProt release 2019_11. (Details of the format changes:
https://www.uniprot.org/release-notes/2019-12-18-release#text%5Fft )
This closes https://github.com/bioruby/bioruby/issues/147 .
* Tests are added with a new test data
lib/bio/db/embl/uniprotkb.rb | 122 +++++-
test/data/uniprot/P28907.uniprot | 551 +++++++++++++++++++++++++
test/unit/bio/db/embl/test_uniprotkb_P28907.rb | 314 ++++++++++++++
3 files changed, 983 insertions(+), 4 deletions(-)
create mode 100644 test/data/uniprot/P28907.uniprot
create mode 100644 test/unit/bio/db/embl/test_uniprotkb_P28907.rb
commit b18ee463d4328b5ef619733b46f568b18459be7a
Author: Naohisa Goto
Date: Fri Nov 5 23:49:18 2021 +0900
BioRuby 2.0.3 is released
ChangeLog | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 136 insertions(+)
commit c16e230d15cf30478a3739563b4e4745dc57ef82
Author: Naohisa Goto
Date: Fri Nov 5 23:44:45 2021 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
commit 1a8c44dc5b8d24342550273a594e5f75e41f41df
Author: Naohisa Goto
Date: Fri Nov 5 23:41:29 2021 +0900
prepare for BioRuby 2.0.3 release
lib/bio/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 863242cdb9a748ba9efb3be3b39f92c17ed3ea84
Author: Naohisa Goto
Date: Fri Nov 5 23:36:27 2021 +0900
update release notes for upcoming BioRuby 2.0.3
RELEASE_NOTES.rdoc | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
commit b97794d632c73dc45639cec000fb11238740eb30
Author: Naohisa Goto
Date: Fri Nov 5 23:26:20 2021 +0900
Ruby 3.0 compatibility fix: Bio::Sequence::*#partition, #rpartiton
* Behaviors of Bio::Sequence::*#partition and #rpartition in Ruby 3.0
are changed to mimic those in Ruby 2.x.
lib/bio/sequence/common.rb | 17 +++++++
test/unit/bio/sequence/test_ruby3.rb | 94 ++++++++++++++++++++++++++++++++++++
2 files changed, 111 insertions(+)
commit 7ff79cd449ee03e0063120fb9abec50d9b08e979
Author: Naohisa Goto
Date: Fri Nov 5 22:24:16 2021 +0900
remove resolved Ruby 3.0 issue
KNOWN_ISSUES.rdoc | 8 --------
1 file changed, 8 deletions(-)
commit 24bb3c3cf417837ad63a27913db7237aef1414c6
Author: Naohisa Goto
Date: Fri Nov 5 21:24:26 2021 +0900
Bio::Sequence::NA,AA,Generic: workaround for Ruby 3.0.0 incompatible change
* Since Ruby 3.0.0, over 30 methods in subclass of String class are
changed to return/yield String instance instead of the subclass
instance. (https://github.com/ruby/ruby/blob/v3_0_0/NEWS.md )
* In this commit, workaround is made for the following methods:
* *
* capitalize
* center
* chomp
* chop
* delete
* delete_prefix
* delete_suffix
* downcase
* each_char
* each_grapheme_cluster
* each_line
* gsub
* gsub!
* ljust
* lstrip
* revserse
* rjust
* rstrip
* slice!
* slice / []
* split
* squeeze
* strip
* sub
* sub!
* succ / next
* swapcase
* tr
* tr_s
* upcase
* Note: sub! and gsub! are not described in the NEWS.md
but are also affected by this Ruby 3.0.0 incompatible changes.
* The following methods are not patched i.e. they return/yield
String instances.
* dump
* partition
* rpartition
* scrub
* Note: In Ruby 2.7 or earlier, Bio::Sequence::NA#partition
and #rpartition methods return an array that may contain
mixture of Bio::Sequence::NA instances and String instances.
* test/unit/bio/sequence/test_ruby3.rb: unit tests for the
above methods.
* Close https://github.com/bioruby/bioruby/issues/137
lib/bio/sequence/common.rb | 95 +++++++++
test/unit/bio/sequence/test_ruby3.rb | 368 +++++++++++++++++++++++++++++++++++
2 files changed, 463 insertions(+)
create mode 100644 test/unit/bio/sequence/test_ruby3.rb
commit 0efc0a54685d43645daa9c53d7140bfb81577777
Author: kojix2 <2xijok@gmail.com>
Date: Tue Aug 31 19:39:25 2021 +0900
Fix typos: Retrun -> Return
lib/bio/appl/iprscan/report.rb | 6 +++---
lib/bio/appl/sosui/report.rb | 2 +-
lib/bio/db/embl/uniprotkb.rb | 2 +-
lib/bio/db/go.rb | 4 ++--
lib/bio/tree.rb | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
commit a291b5a72da12a5cc8b006d1dd63d002fda5dff3
Author: Naohisa Goto
Date: Thu Dec 31 23:52:54 2020 +0900
BioRuby 2.0.2 is released
ChangeLog | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
commit fd420b713ca364e677ef3551919ec907791df86d
Author: Naohisa Goto
Date: Thu Dec 31 23:51:08 2020 +0900
RELEASE_NOTES.rdoc: change some description
RELEASE_NOTES.rdoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 0ed9b37f38fa1b00dcc1d422914e4cbdbbc5f6ab
Author: Naohisa Goto
Date: Thu Dec 31 23:46:46 2020 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit fa84b8fac653c26b9f8db429321ef49202554a69
Author: Naohisa Goto
Date: Thu Dec 31 23:45:38 2020 +0900
prepare for BioRuby 2.0.2 release
lib/bio/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 32c5efccbad4e0d3440726383f863520ee242cc5
Author: Naohisa Goto
Date: Thu Dec 31 23:39:18 2020 +0900
update release notes for upcoming BioRuby 2.0.2
RELEASE_NOTES.rdoc | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
commit c2f6e62ab64bc532f442bccc0d76ced5380664ec
Author: Naohisa Goto
Date: Thu Dec 31 23:38:43 2020 +0900
add a known issue about Ruby 3.0
KNOWN_ISSUES.rdoc | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
commit a733c0816da7c97ca0c23016b473b004fb755f54
Author: Naohisa Goto
Date: Thu Dec 31 23:04:55 2020 +0900
remove deprecation warning of Gem::Specification#has_rdoc=
Gem::Specification#has_rdoc= have been deprecated since RubyGems 1.3.3
in 2009. (https://blog.rubygems.org/2009/05/04/1.3.3-released.html )
RDoc is always generated regardless of the value, and the line is
safely removed.
This fixes https://github.com/bioruby/bioruby/issues/138 .
Thanks to @jaysonvirissimo for reporting the issue.
bioruby.gemspec | 1 -
bioruby.gemspec.erb | 1 -
2 files changed, 2 deletions(-)
commit bed6746ce62059795996eeb6e5ac65655bab12b5
Author: Naohisa Goto
Date: Thu Dec 31 22:51:56 2020 +0900
require ruby's date library to avoid NameError for Date
In Bio::Sequence#output(:embl), NameError (uninitialized constant
Bio::Sequence::Format::INSDFeatureHelper::Date) is observed.
The error message is misleading because Date is provided by Ruby's
standard date library.
This fixes https://github.com/bioruby/bioruby/issues/135 .
Thanks to Dr. Mark Wilkinson for reporting the issue.
lib/bio/sequence/format.rb | 1 +
1 file changed, 1 insertion(+)
commit 5f3aa79fdaf6dd5551d51663ca2e9b6f5e56d855
Author: Naohisa Goto
Date: Fri Nov 6 17:45:12 2020 +0900
fix mistaken URLs
README.rdoc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
commit d5e1670ee4863cc60d3aa08432a7ee3b1e445439
Author: Naohisa Goto
Date: Fri Sep 6 15:48:45 2019 +0900
BioRuby 2.0.1 is released
ChangeLog | 185 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 185 insertions(+)
commit 21bf51a1ec8c18c9cdf8528ffc3c59c503cef042
Author: Naohisa Goto
Date: Fri Sep 6 15:45:47 2019 +0900
RELEASE_NOTES.rdoc: describe notable changes since 2.0.0
RELEASE_NOTES.rdoc | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
commit 9092a629e0e28b416ee7288d349fb9d73dd2b961
Author: Naohisa Goto
Date: Fri Sep 6 15:06:11 2019 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
commit 59e24b6e55d2c9a8887e8e01a91999d33a008042
Author: Naohisa Goto
Date: Fri Sep 6 15:04:33 2019 +0900
prepare for BioRuby 2.0.1 release
lib/bio/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 9635a38a158db434fd2b6aff7a2ee75622ddecef
Author: Naohisa Goto
Date: Fri Sep 6 14:51:23 2019 +0900
sample/fastq2html.rb: A html visualization of FASTQ sequences
* sample/fastq2html: A html visualization of FASTQ sequences.
Each sequence is colored with the quality score.
* sample/fastq2html.cwl: CWL workflow for the above sample script
* sample/fastq2html.testdata.yaml: Test data for the above workflow
sample/fastq2html.cwl | 23 ++++++++++
sample/fastq2html.rb | 94 +++++++++++++++++++++++++++++++++++++++++
sample/fastq2html.testdata.yaml | 5 +++
3 files changed, 122 insertions(+)
create mode 100644 sample/fastq2html.cwl
create mode 100644 sample/fastq2html.rb
create mode 100644 sample/fastq2html.testdata.yaml
commit 6bbcf8b66310c225d686f2c59359680a0bc0b4b6
Author: Naohisa Goto
Date: Fri Sep 6 14:42:19 2019 +0900
sample/rev_comp.rb: Generates reverse-complement sequences
* sample/rev_comp.rb: Generates reverse-complement sequences of
the given nucleotide sequences.
* sample/rev_comp.cwl: CWL cowkflow for the sample script
* sample/rev_comp.testdata.yaml: Test data for the above CWL workflow
sample/rev_comp.cwl | 23 +++++++++++++++++++++++
sample/rev_comp.rb | 20 ++++++++++++++++++++
sample/rev_comp.testdata.yaml | 7 +++++++
3 files changed, 50 insertions(+)
create mode 100644 sample/rev_comp.cwl
create mode 100644 sample/rev_comp.rb
create mode 100644 sample/rev_comp.testdata.yaml
commit ff0e6c3c6b6f1b56d81b5a4b579a6d0984bfc607
Author: Naohisa Goto
Date: Fri Sep 6 14:40:45 2019 +0900
sample/color_scheme_(na|aa).rb: use String#each_char instead of each_byte
sample/color_scheme_aa.rb | 6 +++---
sample/color_scheme_na.rb | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
commit 6f7c1be09aa3d6cdb76fd029fc0f84efda31c907
Author: Naohisa Goto
Date: Thu Sep 5 17:32:07 2019 +0900
sample/color_scheme_aa.rb: new sample based on color_scheme_na.rb
sample/color_scheme_aa.rb | 82 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 sample/color_scheme_aa.rb
commit 51864c3857178f58133b759f7608b8d6d8991c44
Author: Naohisa Goto
Date: Thu Sep 5 17:13:20 2019 +0900
sample/color_scheme_na.rb: use const_get instead of eval
sample/color_scheme_na.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit ba0b554971a9a387a54fc04c5002853d91357347
Author: Naohisa Goto
Date: Thu Sep 5 17:02:20 2019 +0900
sample/na2aa.cwl: inputBinding position -1 for the script
* sample/na2aa.cwl: inputBinding position -1 is used for the script
to emphasize that the argument is the first one.
sample/na2aa.cwl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 26a27ec261e2251f3ff3a85007147d33682778d0
Author: Naohisa Goto
Date: Thu Sep 5 16:56:08 2019 +0900
sample/color_scheme_na.rb: Supports more file formats
* sample/color_scheme_na.rb: Supports more file formats other than
fasta format, by using Bio::Flatfile.
sample/color_scheme_na.rb | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
commit 5c053a606382bb578a2b6884ee639805154433e5
Author: Naohisa Goto
Date: Thu Sep 5 12:32:00 2019 +0900
sample/na2aa.cwl: use inputBinding
sample/na2aa.cwl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
commit 6a3c3e02f08549d47dda00dca92d55bbadfc468f
Author: Naohisa Goto
Date: Wed Sep 4 22:59:21 2019 +0900
Sample CWL workflow to run sample/na2aa.rb
* na2aa.cwl: A sample CWL workflow to run na2aa.rb in sample/ dir
* na2aa.testdata.yaml: Test data for the workflow
sample/na2aa.cwl | 20 ++++++++++++++++++++
sample/na2aa.testdata.yaml | 7 +++++++
2 files changed, 27 insertions(+)
create mode 100644 sample/na2aa.cwl
create mode 100644 sample/na2aa.testdata.yaml
commit 960b885036f549863e3cfe9c693c90f9bef27d3d
Author: Naohisa Goto
Date: Wed Sep 4 21:00:50 2019 +0900
LEGAL: na2aa.rb is now Ruby's License
LEGAL | 1 -
1 file changed, 1 deletion(-)
commit 7af9e81988939007eb36dab6b102a7422e8196d8
Author: Naohisa Goto
Date: Wed Sep 4 14:34:05 2019 +0900
sample/na2aa.rb: Completely rewritten
* sample/na2aa.rb: Completely rewritten. License is changed because
old code is completely wiped out. Note that the old code always
raises error due to a bug in the code.
* The old code was trying to replace 'X' (any) to '-' (gap) but
the new code does not modify translated sequences anymore.
sample/na2aa.rb | 36 +++++++++++-------------------------
1 file changed, 11 insertions(+), 25 deletions(-)
commit cf8cac5e32db42b6683c1a837adc9e1c04994062
Author: Naohisa Goto
Date: Mon Sep 2 17:11:08 2019 +0900
Bug fix: Bio::GFF::GFF2::Record.parse did not return correct object
lib/bio/db/gff.rb | 4 +++-
test/unit/bio/db/test_gff.rb | 5 +++++
2 files changed, 8 insertions(+), 1 deletion(-)
commit 80b387e7e2bb8570d9204e389b6c5d90c6ea31de
Author: Naohisa Goto
Date: Fri Jun 14 14:33:19 2019 +0900
BioRuby 2.0.0 is released
ChangeLog | 1051 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 1043 insertions(+), 8 deletions(-)
commit 2e4046517fd8ee1c105ef53131e69f787d790099
Author: Naohisa Goto
Date: Fri Jun 14 14:23:19 2019 +0900
Add "Recommended Plugins" section and description is moved to it
README.rdoc | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
commit 7a533e4f57edcebb5dfe15fdddc9fbc986d2b7ec
Author: Naohisa Goto
Date: Fri Jun 14 14:17:08 2019 +0900
fix directory name
README.rdoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 805266c9c900903156efd0baa8c1e6ee524a8147
Author: Naohisa Goto
Date: Fri Jun 14 14:14:52 2019 +0900
add description about recommended plugins
README.rdoc | 11 +++++++++++
1 file changed, 11 insertions(+)
commit 02b7d8b9bc5dcd56f501a15e5e820f450153aa1c
Author: Naohisa Goto
Date: Fri Jun 14 13:33:30 2019 +0900
prepare to release BioRuby 2.0.0
lib/bio/version.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit f1fed8dacb425d19c12abec5d4faeb733827f80f
Author: Naohisa Goto
Date: Fri Jun 14 13:31:08 2019 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
commit 3952ec9d5ce1e3ceea9734f667d36595808c4989
Author: Naohisa Goto
Date: Fri Jun 14 13:28:19 2019 +0900
Remove xmlparser dependency from Gemfile and gemfiles/Gemfile.*
Gemfile | 2 --
gemfiles/Gemfile.travis-rbx | 2 --
gemfiles/Gemfile.travis-ruby1.8 | 2 --
gemfiles/Gemfile.travis-ruby1.9 | 2 --
gemfiles/Gemfile.windows | 2 --
5 files changed, 10 deletions(-)
commit d4a8ee7ae3d3b13a8be4c57c1f8db5b29f2c4a13
Author: Naohisa Goto
Date: Fri Jun 14 12:34:45 2019 +0900
RELEASE_NOTES.rdoc: update aboue new features and improvements
RELEASE_NOTES.rdoc | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
commit 2d4170a2a0262f5d75cef5a54b5d6f3da298f145
Author: Naohisa Goto
Date: Fri Jun 14 12:24:12 2019 +0900
Tests added in the previous commit is moved and modified
* test/network/bio/db/kegg/test_genes_hsa7422.rb: tests added in the
previous commit is moved to the file and modified to get data
from the internet for avoiding KEGG data license issue.
Note that some of the tests might be fail in the near future due to
the database entry updates.
test/network/bio/db/kegg/test_genes_hsa7422.rb | 91 ++++++++++++++++++++++++++
test/unit/bio/db/kegg/test_genes.rb | 51 ---------------
2 files changed, 91 insertions(+), 51 deletions(-)
create mode 100644 test/network/bio/db/kegg/test_genes_hsa7422.rb
commit 67f8105acf22e88a7624305743ad13802ffed124
Author: kojix2 <2xijok@gmail.com>
Date: Mon Oct 22 00:46:31 2018 +0900
add DiseasesAsHash to KEGG/Common
lib/bio/db/kegg/common.rb | 14 ++++++++++
lib/bio/db/kegg/genes.rb | 26 +++++++++++++++++++
lib/bio/db/kegg/pathway.rb | 16 ++++--------
test/unit/bio/db/kegg/test_genes.rb | 51 +++++++++++++++++++++++++++++++++++++
4 files changed, 96 insertions(+), 11 deletions(-)
commit 9dbb655e1c3ec7460b77f1d0ea475531ac3a9361
Author: Naohisa Goto
Date: Fri Jun 14 11:37:11 2019 +0900
update documents for upcoming new release
KNOWN_ISSUES.rdoc | 14 +++-----
LEGAL | 9 ------
README.rdoc | 92 +++++++----------------------------------------------
README_DEV.rdoc | 10 +++---
RELEASE_NOTES.rdoc | 93 +++++++++++++++++++++++++++++++++++++++++++-----------
5 files changed, 96 insertions(+), 122 deletions(-)
commit 6f388019a035a41a8867c6a03ef7e2707d1edce4
Author: Naohisa Goto
Date: Fri Jun 14 11:32:40 2019 +0900
.travis.yml: move 1.8.7 and 1.9.3 to allow_failures; update ruby versions
.travis.yml | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
commit f2cbe9db9b78df653d774a7676e00f6f1a212b23
Author: Naohisa Goto
Date: Fri Jun 14 11:18:27 2019 +0900
.travis.yml: Remove jobs using "tar-integration-test"
.travis.yml | 9 ---------
1 file changed, 9 deletions(-)
commit 68f28e81e3fa566843b548f1899549adcad5225a
Author: Naohisa Goto
Date: Fri Jun 14 11:10:18 2019 +0900
remove "rake tar-install" and "rake tar-integration-test" tasks
* Rakefile: Remove "tar-install" and "tar-integration-test" tasks
because they use setup.rb that is removed from the repository.
Rakefile | 34 ----------------------------------
1 file changed, 34 deletions(-)
commit 0cbdb4586f2231a68579105dbc7f0fb413b38a96
Author: Naohisa Goto
Date: Fri Jun 14 10:48:15 2019 +0900
next bioruby version will be 2.0.0
lib/bio/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 300d10b9791b7f0c0eff1d0544cae63fecc3b31a
Author: Naohisa Goto
Date: Fri Jun 14 10:41:12 2019 +0900
Remove setup.rb. Use RubyGems to install BioRuby.
setup.rb | 1600 --------------------------------------------------------------
1 file changed, 1600 deletions(-)
delete mode 100644 setup.rb
commit a74683d9acfc16d0d715b020839839afc8b43350
Author: Naohisa Goto
Date: Fri Jun 14 02:28:31 2019 +0900
try to require "bio-blast-xmlparser" provided by separete gem
lib/bio/appl/blast/report.rb | 8 ++++++++
1 file changed, 8 insertions(+)
commit de1c1e33aed392d4e2265a028b8acb50501f56bd
Author: Naohisa Goto
Date: Sat Sep 16 04:49:21 2017 +0900
check existance of a private method instead of XMLParser constant
test/unit/bio/appl/blast/test_report.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
commit 3f54d19c44411e845b32c522fc0deca4288dcf07
Author: Naohisa Goto
Date: Sat Sep 16 04:39:19 2017 +0900
xml_set_parameter is moved from xmlparser.rb etc.
* The method xml_set_parameter is moved from
lib/bio/appl/blast/xmlparser.rb because it is used by
the REXML parser.
* The method Bio::Blast::Report.xmlparser is move to
lib/bio/appl/blast/xmlparser.rb in the separate repo.
* Use "defined? xmlparser_parse" for checking existance of
the blast xmlparser component.
* Removed line to require bio/appl/blast/xmlparser.
lib/bio/appl/blast/report.rb | 40 ++++++++++++++++++++++++++++++++--------
1 file changed, 32 insertions(+), 8 deletions(-)
commit b19cd507c432739c5aaac700e222e6e4ecc63ddc
Author: Naohisa Goto
Date: Sat Sep 16 03:32:54 2017 +0900
lib/bio/appl/blast/xmlparser.rb is removed and moved to separate gem
* lib/bio/appl/blast/xmlparser.rb is removed and moved to separate gem
to eliminate dependency to xmlparser that includes native extension.
lib/bio/appl/blast/xmlparser.rb | 236 ----------------------------------------
1 file changed, 236 deletions(-)
delete mode 100644 lib/bio/appl/blast/xmlparser.rb
commit 525d3450ad3440bfbbe3a1540fe60d83c3845ec7
Author: Naohisa Goto
Date: Sat Dec 15 11:33:08 2018 +0900
.travis.yml: remove jruby-18mode and jruby-19mode; add jruby and truffleruby
.travis.yml | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
commit 5bc0042b7fc39c62222534e0e4129d3f9794fd8c
Author: Naohisa Goto
Date: Fri Dec 14 22:46:08 2018 +0900
appveyor.yml: regenerate bioruby.gemspec before creating gem
appveyor.yml | 1 +
1 file changed, 1 insertion(+)
commit 5582dc1db60ffc812211d9803d5adce9c0dd70d3
Author: Naohisa Goto
Date: Fri Dec 14 22:39:35 2018 +0900
appveyor.yml: modify gemfile/Gemfile.windows after bundle install
appveyor.yml | 1 +
1 file changed, 1 insertion(+)
commit 09031bcae0a42fe93d07b46eb489ffbabc8c1319
Author: Naohisa Goto
Date: Fri Dec 14 22:30:09 2018 +0900
appveyor.yml: give up using vendor/bundle; set BUNDLE_GEMFILE
appveyor.yml | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
commit 44fb6c67aef1b0311d32ac806fc9a62f09d401d5
Author: Naohisa Goto
Date: Fri Dec 14 21:59:44 2018 +0900
appveyor.yml: Specify gemfiles/Gemfile.windows
* appveyor.yml: Specify gemfiles/Gemfile.windows in which xmlparser gem
is excluded because of build failure of the xmlparser gem on Windows.
* gemfiles/Gemfile.windows: Gemfile for Appveyor, running on Microsoft
Windows.
appveyor.yml | 2 +-
gemfiles/Gemfile.windows | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 gemfiles/Gemfile.windows
commit fe55e52b42660dda1d21749bf714e989e7db754e
Author: Naohisa Goto
Date: Fri Dec 14 21:48:06 2018 +0900
appveyor.yml: update ruby versions and test procedure
appveyor.yml | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
commit 739f5c9a512074a7de25d87e8104ed15bdb28b5d
Author: Naohisa Goto
Date: Fri Dec 14 11:57:43 2018 +0900
.travis.yml: change default Gemfile
* Change default Gemfile to Gemfile
* Move old Ruby versions to "include" matrix.
* Change ruby version for gem-integration-test and tar-integration-test
.travis.yml | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
commit 2f54a9cbf8fb6d8580d488b20007d5ce4562e5e9
Author: Naohisa Goto
Date: Fri Dec 14 11:42:58 2018 +0900
.travis.yml: No more limit to master branch. Instead, add blocklist.
.travis.yml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
commit 9ac3e44318c67fd4415a2118dd5631902e784e12
Author: Kozo Nishida
Date: Thu Dec 13 22:47:54 2018 +0900
ci(travis): Add rvm versions
.travis.yml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
commit 258dd67c9d65f1247e56d5c5228cc6f9c019d133
Author: Naohisa Goto
Date: Mon Dec 10 21:56:16 2018 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 3920483d6b5a3759e6c610d7ee9fb1a63dcc9ce4
Author: Naohisa Goto
Date: Mon Dec 10 21:55:19 2018 +0900
Simplify version number processing
bioruby.gemspec.erb | 14 +++++++-------
lib/bio/version.rb | 12 +++++-------
2 files changed, 12 insertions(+), 14 deletions(-)
commit 80949a10ea5e4f88d21d893905b720925f5a9e7b
Author: Naohisa Goto
Date: Mon Dec 10 18:54:00 2018 +0900
next bioruby version will be 1.6.0
lib/bio/version.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 2b542865a4d4af2684ace41f79e273ebceb51807
Merge: 02a96424 d71e07a0
Author: Toshiaki Katayama
Date: Fri Oct 19 06:45:49 2018 +0900
Merge pull request #125 from kojix2/master
update TogoWS documentation. genbank -> ncbi-nucleotide
commit d71e07a0cb1cc441241be91273bd44e3717b8773
Author: kojix2 <2xijok@gmail.com>
Date: Thu Oct 18 19:10:29 2018 +0900
update TogoWS documentation. genbank -> ncbi-nucleotide
lib/bio/io/togows.rb | 10 +++++-----
sample/test_restriction_enzyme_long.rb | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
commit 02a964241b79e2307d0a00473427ea6bc2ea6932
Author: Naohisa Goto
Date: Thu Sep 20 07:06:08 2018 +0900
Improvement documentation
* Improve documentation.
* Close https://github.com/bioruby/bioruby/pull/120 .
lib/bio/db/aaindex.rb | 79 +++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 74 insertions(+), 5 deletions(-)
commit 6bfef40ae87099565371abf94cf2cc8bfac76b12
Author: Naohisa Goto
Date: Thu Sep 20 05:01:12 2018 +0900
Bug fix: Bio::Command.new_https should support proxy
lib/bio/command.rb | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
commit 4e3251d2172f58239f103e7edf8f4c351140f378
Author: Naohisa Goto
Date: Thu Sep 20 04:58:56 2018 +0900
https support for Bio::Blast::Remote::GenomeNet::Information
lib/bio/appl/blast/genomenet.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
commit 6dd1f9fb8c2b4ba95086eab7bffc01583feccf3a
Author: ramadis
Date: Sat Jul 7 15:12:33 2018 -0300
Add https requests in command. Fix genomenet query by allowing https requests.
lib/bio/appl/blast/genomenet.rb | 2 +-
lib/bio/command.rb | 14 ++++++++++++++
2 files changed, 15 insertions(+), 1 deletion(-)
commit 4b6f87c9fd2dc62418ddfc4b57bcc4b73287a603
Author: Tomoaki NISHIYAMA
Date: Sat Mar 31 13:08:07 2018 +0900
directly refer to the given hash
lib/bio/data/codontable.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 25636ffa08c6ea9a9e4d1b451a456bc1f482ad40
Author: Tomoaki NISHIYAMA
Date: Sat Jun 2 15:10:12 2018 +0900
precalculated ambiguity codontable
lib/bio/data/codontable.rb | 55 +++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 52 insertions(+), 3 deletions(-)
commit b2d924045202ec3aa4e1b79341fd939a881d4c2e
Author: Tomoaki NISHIYAMA
Date: Sat Mar 31 11:55:57 2018 +0900
construct ambiguity nucleotide to amino acid table
lib/bio/data/codontable.rb | 49 ++++++++++++++++++++++++++++++++++-
test/unit/bio/data/test_codontable.rb | 3 +++
2 files changed, 51 insertions(+), 1 deletion(-)
commit a7378b6b269ea1c0391e259dd8e4868f03b064ea
Author: markwilkinson
Date: Tue Dec 12 14:13:51 2017 +0100
fixing Fasta Report parser for fasta36 -m10
lib/bio/appl/fasta/format10.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
commit c89c40c29c3c92f8e548c79d2d04698123559007
Author: Naohisa Goto
Date: Fri Sep 15 16:33:19 2017 +0900
Remove settings about executables
* Definitions and settings about executables are removed because
all files in bin/ have been moved to separate gem packages
(bio-shell and bio-executables).
bioruby.gemspec | 13 -------------
bioruby.gemspec.erb | 21 +--------------------
2 files changed, 1 insertion(+), 33 deletions(-)
commit b5a8d385da8f2c1b6e1caf77295e590f55595944
Author: Naohisa Goto
Date: Fri Sep 15 16:20:03 2017 +0900
bin/br_*.rb is moved to bio-executables gem
* The following executable files are moved to "bio-executables" gem.
* bin/br_biofetch.rb
* bin/br_bioflat.rb
* bin/br_biogetseq.rb
* bin/br_pmfetch.rb
bin/br_biofetch.rb | 71 ---------
bin/br_bioflat.rb | 293 ------------------------------------
bin/br_biogetseq.rb | 45 ------
bin/br_pmfetch.rb | 422 ----------------------------------------------------
4 files changed, 831 deletions(-)
delete mode 100755 bin/br_biofetch.rb
delete mode 100755 bin/br_bioflat.rb
delete mode 100755 bin/br_biogetseq.rb
delete mode 100755 bin/br_pmfetch.rb
commit eb61d89a366437570a0590a629cb75718866b236
Author: Naohisa Goto
Date: Fri Sep 15 09:31:14 2017 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 44 +-------------------------------------------
1 file changed, 1 insertion(+), 43 deletions(-)
commit 6d40721d039fdb6b77af656f32ccabeabc427409
Author: Naohisa Goto
Date: Fri Sep 15 09:29:33 2017 +0900
Remove BioRuby Shell files that are released as independent gem package
bin/bioruby | 47 --
lib/bio/shell.rb | 44 --
lib/bio/shell/core.rb | 578 ---------------------
lib/bio/shell/demo.rb | 146 ------
lib/bio/shell/interface.rb | 217 --------
lib/bio/shell/irb.rb | 94 ----
lib/bio/shell/object.rb | 71 ---
lib/bio/shell/plugin/blast.rb | 42 --
lib/bio/shell/plugin/codon.rb | 218 --------
lib/bio/shell/plugin/das.rb | 58 ---
lib/bio/shell/plugin/emboss.rb | 23 -
lib/bio/shell/plugin/entry.rb | 137 -----
lib/bio/shell/plugin/flatfile.rb | 101 ----
lib/bio/shell/plugin/midi.rb | 430 ---------------
lib/bio/shell/plugin/ncbirest.rb | 68 ---
lib/bio/shell/plugin/obda.rb | 45 --
lib/bio/shell/plugin/psort.rb | 56 --
lib/bio/shell/plugin/seq.rb | 248 ---------
lib/bio/shell/plugin/togows.rb | 40 --
.../generators/bioruby/bioruby_generator.rb | 29 --
.../generators/bioruby/templates/_classes.rhtml | 4 -
.../generators/bioruby/templates/_log.rhtml | 27 -
.../generators/bioruby/templates/_methods.rhtml | 11 -
.../generators/bioruby/templates/_modules.rhtml | 4 -
.../generators/bioruby/templates/_variables.rhtml | 7 -
.../generators/bioruby/templates/bioruby-bg.gif | Bin 1431 -> 0 bytes
.../generators/bioruby/templates/bioruby-gem.png | Bin 6951 -> 0 bytes
.../generators/bioruby/templates/bioruby-link.gif | Bin 2758 -> 0 bytes
.../generators/bioruby/templates/bioruby.css | 368 -------------
.../generators/bioruby/templates/bioruby.rhtml | 47 --
.../bioruby/templates/bioruby_controller.rb | 144 -----
.../generators/bioruby/templates/bioruby_helper.rb | 47 --
.../generators/bioruby/templates/commands.rhtml | 8 -
.../generators/bioruby/templates/history.rhtml | 10 -
.../generators/bioruby/templates/index.rhtml | 26 -
.../generators/bioruby/templates/spinner.gif | Bin 1542 -> 0 bytes
lib/bio/shell/script.rb | 25 -
lib/bio/shell/setup.rb | 108 ----
lib/bio/shell/web.rb | 102 ----
test/unit/bio/shell/plugin/test_seq.rb | 187 -------
test/unit/bio/test_shell.rb | 20 -
41 files changed, 3837 deletions(-)
delete mode 100755 bin/bioruby
delete mode 100644 lib/bio/shell.rb
delete mode 100644 lib/bio/shell/core.rb
delete mode 100644 lib/bio/shell/demo.rb
delete mode 100644 lib/bio/shell/interface.rb
delete mode 100644 lib/bio/shell/irb.rb
delete mode 100644 lib/bio/shell/object.rb
delete mode 100644 lib/bio/shell/plugin/blast.rb
delete mode 100644 lib/bio/shell/plugin/codon.rb
delete mode 100644 lib/bio/shell/plugin/das.rb
delete mode 100644 lib/bio/shell/plugin/emboss.rb
delete mode 100644 lib/bio/shell/plugin/entry.rb
delete mode 100644 lib/bio/shell/plugin/flatfile.rb
delete mode 100644 lib/bio/shell/plugin/midi.rb
delete mode 100644 lib/bio/shell/plugin/ncbirest.rb
delete mode 100644 lib/bio/shell/plugin/obda.rb
delete mode 100644 lib/bio/shell/plugin/psort.rb
delete mode 100644 lib/bio/shell/plugin/seq.rb
delete mode 100644 lib/bio/shell/plugin/togows.rb
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/bioruby_generator.rb
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_classes.rhtml
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_log.rhtml
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_methods.rhtml
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_modules.rhtml
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/_variables.rhtml
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby-bg.gif
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby-gem.png
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby-link.gif
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby.css
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby.rhtml
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_controller.rb
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_helper.rb
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/commands.rhtml
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/history.rhtml
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/index.rhtml
delete mode 100644 lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/spinner.gif
delete mode 100644 lib/bio/shell/script.rb
delete mode 100644 lib/bio/shell/setup.rb
delete mode 100644 lib/bio/shell/web.rb
delete mode 100644 test/unit/bio/shell/plugin/test_seq.rb
delete mode 100644 test/unit/bio/test_shell.rb
commit ab9feb6f1f495a2b3ca350005c6162c51178aecb
Author: Naohisa Goto
Date: Wed Sep 13 22:13:59 2017 +0900
Suppress warning "assigned but unused variable"
lib/bio/io/flatfile/autodetection.rb | 5 +++++
1 file changed, 5 insertions(+)
commit cf486e327c253482f54e59b2e18f73db27641135
Author: Naohisa Goto
Date: Wed Sep 13 22:10:53 2017 +0900
Suppress warning: "instance variable @top_strand not initialized"
* Suppress warning: "instance variable @top_strand not initialized".
To do so, force to raise NoMethodError when @top_strand is not
initialized or is nil. This should be changed to appropriate
exception in the future.
lib/bio/util/sirna.rb | 2 ++
1 file changed, 2 insertions(+)
commit 88477698f0e1b5a74f9682f26e97c5f90f6912b4
Author: Naohisa Goto
Date: Wed Sep 13 21:31:38 2017 +0900
Suppress warning in Ruby 2.4: "constant ::Fixnum is deprecated"
lib/bio/db/soft.rb | 4 ++--
.../util/restriction_enzyme/range/sequence_range/calculated_cuts.rb | 2 +-
test/unit/bio/test_alignment.rb | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
commit f8cff14179cfeea0d685f4df756db71ceb6d5fab
Author: Naohisa Goto
Date: Wed Sep 13 21:19:12 2017 +0900
Suppress warning "parentheses after method name is interpreted as an argument list, not a decomposed argument" in Ruby 2.4
lib/bio/map.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
commit ddb25c2bf3872c6306a91e407d95caa2e136cee9
Author: Jun Aruga
Date: Fri Nov 18 11:14:38 2016 +0100
Gemfile for local development.
.travis.yml | 8 ++++----
gemfiles/Gemfile.travis-ruby2.2 => Gemfile | 0
bioruby.gemspec | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
rename gemfiles/Gemfile.travis-ruby2.2 => Gemfile (100%)
commit 16faf6473b74eb172716b713ab757cb2ab2bcacc
Author: Jun Aruga
Date: Thu Nov 17 17:50:40 2016 +0100
Fixes ruby1.8 Travis failure that is because rdoc 4.3.0 requires Ruby >= 1.9.3.
gemfiles/Gemfile.travis-jruby1.8 | 3 ++-
gemfiles/Gemfile.travis-ruby1.8 | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
commit 146fd66b3a14972bcfd0e9bf8ec007d38c55ac39
Author: Naohisa Goto
Date: Sat Aug 13 08:22:22 2016 +0900
Update URLs and use https for NCBI REST web services
lib/bio/io/ncbirest.rb | 50 ++++++++++++++++++++++++++------------------------
1 file changed, 26 insertions(+), 24 deletions(-)
commit 7abd46f058a17ac34b263714449756383622012d
Author: Naohisa Goto
Date: Sat Aug 13 08:12:08 2016 +0900
New method Bio::Command#start_http_uri(uri) with tests
* lib/bio/command.rb: New method Bio::Command#start_http_uri(uri)
that supports HTTPS. Note that this method is intended to be
called only from BioRuby internals.
* lib/bio/command.rb: Bio::Command#post and #post_form are changed
to use the start_http_uri().
* test/network/bio/test_command.rb: tests for start_http_uri().
lib/bio/command.rb | 42 ++++++++++++++++++++++++++++++++++++++--
test/network/bio/test_command.rb | 17 ++++++++++++++++
2 files changed, 57 insertions(+), 2 deletions(-)
commit 11c680f6d64a60bdc0f4248951bf2d2ebafbc433
Author: Naohisa Goto
Date: Fri Jun 17 20:40:41 2016 +0900
gemfiles/Gemfile.*: remove dependency on libxml-ruby
* gemfiles/Gemfile.*: remove dependency on libxml-ruby.
Bio::PhyloXML required libxml-ruby but was already removed.
gemfiles/Gemfile.travis-jruby1.8 | 3 ---
gemfiles/Gemfile.travis-jruby1.9 | 3 ---
gemfiles/Gemfile.travis-rbx | 1 -
gemfiles/Gemfile.travis-ruby1.8 | 1 -
gemfiles/Gemfile.travis-ruby1.9 | 1 -
gemfiles/Gemfile.travis-ruby2.2 | 1 -
6 files changed, 10 deletions(-)
commit 09fa57f987445e8654de6a0d0cf7c45f7625600c
Author: Naohisa Goto
Date: Fri Jun 17 16:16:40 2016 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
commit 87812d119820bf66767c7767cfec7554d7a00f3b
Author: Naohisa Goto
Date: Fri Jun 17 15:45:46 2016 +0900
README.rdoc: about bioruby-phyloxml and bio-biosql
README.rdoc | 10 ++++++++++
1 file changed, 10 insertions(+)
commit 2294f255f5f05f9f629a1e88c0e1f59bb74b32bc
Author: Naohisa Goto
Date: Fri Jun 17 15:42:46 2016 +0900
KNOWN_ISSUES.rdoc: remove descriptions about Bio::SQL
KNOWN_ISSUES.rdoc | 5 -----
1 file changed, 5 deletions(-)
commit 35a6f761dc5fa493b8311747dde7f2a54d8aee75
Author: Naohisa Goto
Date: Fri Jun 17 15:40:57 2016 +0900
README.rdoc: remove descriptions about Bio::SQL
README.rdoc | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
commit 46a5bf7acdc803b7e75225c41b23396c4619f25d
Author: Naohisa Goto
Date: Fri Jun 17 14:59:41 2016 +0900
remove autoload of Bio::SQL
lib/bio.rb | 1 -
1 file changed, 1 deletion(-)
commit 57bf535da34715beafccb902404cf1bb35b18af4
Author: Naohisa Goto
Date: Fri Jun 17 14:48:46 2016 +0900
Removed Bio::SQL that have been moved to separate repository
* Bio::SQL is moved to https://github.com/bioruby/bioruby-biosql
and removed from this repository.
* List of deleted files:
* deleted: lib/bio/db/biosql/biosql_to_biosequence.rb
* deleted: lib/bio/db/biosql/sequence.rb
* deleted: lib/bio/io/biosql/ar-biosql.rb
* deleted: lib/bio/io/biosql/biosql.rb
* deleted: lib/bio/io/biosql/config/database.yml
* deleted: lib/bio/io/sql.rb
* deleted: test/unit/bio/db/biosql/tc_biosql.rb
* deleted: test/unit/bio/db/biosql/ts_suite_biosql.rb
lib/bio/db/biosql/biosql_to_biosequence.rb | 78 -----
lib/bio/db/biosql/sequence.rb | 444 -----------------------------
lib/bio/io/biosql/ar-biosql.rb | 257 -----------------
lib/bio/io/biosql/biosql.rb | 39 ---
lib/bio/io/biosql/config/database.yml | 21 --
lib/bio/io/sql.rb | 79 -----
test/unit/bio/db/biosql/tc_biosql.rb | 114 --------
test/unit/bio/db/biosql/ts_suite_biosql.rb | 8 -
8 files changed, 1040 deletions(-)
delete mode 100644 lib/bio/db/biosql/biosql_to_biosequence.rb
delete mode 100644 lib/bio/db/biosql/sequence.rb
delete mode 100644 lib/bio/io/biosql/ar-biosql.rb
delete mode 100644 lib/bio/io/biosql/biosql.rb
delete mode 100644 lib/bio/io/biosql/config/database.yml
delete mode 100644 lib/bio/io/sql.rb
delete mode 100644 test/unit/bio/db/biosql/tc_biosql.rb
delete mode 100644 test/unit/bio/db/biosql/ts_suite_biosql.rb
commit 476dcdbe2b21cd5adb641952ee3da92c2d593121
Author: Naohisa Goto
Date: Wed Jun 8 12:38:22 2016 +0900
appveyor.yml: eliminate old Ruby versions and add Ruby 2.3
appveyor.yml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
commit c26e2b77b75b5505a274822f53c6c5a8f842f6c0
Author: Naohisa Goto
Date: Wed Jun 8 01:50:19 2016 +0900
.travis.yml: fix to use rbx-3.29
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit b524abedac9c85d4f8259191b973bc38a9fc557c
Author: Naohisa Goto
Date: Wed Jun 8 01:45:48 2016 +0900
gemfiles/Gemfile.travis-jruby1.8: use old gem versions supporting Ruby 1.8
gemfiles/Gemfile.travis-jruby1.8 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
commit c5df9268b77f1d4dc2b29e7cfb7baf3c528c1558
Author: Naohisa Goto
Date: Wed Jun 8 01:42:40 2016 +0900
.travis.yml: use rbx-3.29 instead of rbx-3
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit b51b54894ca2d76d9c13680fd72b87951a10a1df
Author: Naohisa Goto
Date: Wed Jun 8 01:25:18 2016 +0900
Workaround to avoid bug in old versions of Bundler
* gemfiles/prepare-gemspec.rb: execute "gem update bundler" to avoid
"NoMethodError: undefined method `spec' for nil:NilClass"
during "bundle install". This error may be due to a bug of Bundler
and the bug seems to be fixed in the latest version of Budler.
gemfiles/prepare-gemspec.rb | 4 ++++
1 file changed, 4 insertions(+)
commit a82424b4864e243ebf1f8cc7f181044798b34b5a
Author: Naohisa Goto
Date: Wed Jun 8 01:20:15 2016 +0900
.travis.yml: add Ruby 2.3.1; use Ruby 2.2.5 instead of 2.2
.travis.yml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
commit ae927514a5c2853d3839750af86bfcc1fc53e4f1
Author: Naohisa Goto
Date: Wed Jun 8 00:54:22 2016 +0900
.travis.yml: add "sudo: false" for faster testing
.travis.yml | 1 +
1 file changed, 1 insertion(+)
commit 832c4dd94a5602a9deadf599ce1778fac870ac81
Author: Naohisa Goto
Date: Wed Jun 8 00:46:26 2016 +0900
gemfiles/Gemfile.travis-ruby1.8: use old gem versions supporting Ruby 1.8
gemfiles/Gemfile.travis-ruby1.8 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
commit 6cf0ab84cd67aab0f6f4012438c1852a19f3ac7a
Author: Naohisa Goto
Date: Wed Jun 8 00:04:36 2016 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
commit 8e986984892d661b4f09a06158a634554d931718
Author: Naohisa Goto
Date: Tue Jun 7 23:59:35 2016 +0900
.travis.yml: Update ruby versions and remove temporary workaround
* Update Ruby versions to 2.2, 2.1.10, and rbx-3.
* Remove temporary workaround about RubyGems introduced in
e92e09edf5904f51d3e73e61d13fce4159a543c5.
.travis.yml | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
commit 90e678d6d74d86c45631128c0f16181679f0d599
Author: Naohisa Goto
Date: Tue Jun 7 23:37:45 2016 +0900
Test bug: fix gem version mismatch error on Travis-CI
* Rakefile: prefer to use spec read from existing bioruby.gemspec file
instead of that of generated from bioruby.gemspec.erb.
This fixes "can't activate bio (= 1.5.1.2016XXXX), already activated
bio-1.5.1.2015NNNN" occurred on Travis-CI during gem integration tests.
Rakefile | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
commit bdb33fe752b7dddcb35f57d826f85dbdd512c3c1
Author: Kozo Nishida
Date: Wed Nov 4 12:08:24 2015 +0900
add appveyor.yml
appveyor.yml | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 appveyor.yml
commit 8b0fa73c57232a6a86d2d6fd0711f51bc50aa333
Author: Naohisa Goto
Date: Thu Sep 17 23:34:34 2015 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
commit 813fc808e9a235e03ed2d5bad2d15f74946bd65a
Author: Naohisa Goto
Date: Thu Sep 17 23:30:46 2015 +0900
Tutorial.rd.html is regenerated by rake retutorial2html
doc/Tutorial.rd.html | 117 +++++++++------------------------------------------
1 file changed, 19 insertions(+), 98 deletions(-)
commit 756f14122a45973289172a88241490a1bcc0054a
Author: Naohisa Goto
Date: Thu Sep 17 23:25:07 2015 +0900
Delete Bio::PhyloXML tutorial
* Tutorial for Bio::PhyloXML is deleted from BioRuby core.
It is now moved to bio-phyloxml gem. New tutorial for
Bio::PhyloXML is available at:
https://github.com/bioruby/bioruby-phyloxml/blob/master/doc/Tutorial.rd
doc/Tutorial.rd | 114 +++-----------------------------------------------------
1 file changed, 6 insertions(+), 108 deletions(-)
commit bb42efdd2eec380c99cbd3e505577a550dda8ce7
Author: Naohisa Goto
Date: Thu Sep 17 23:20:50 2015 +0900
Delete description of Bio::PhyloXML and its dependency libxml-ruby.
README.rdoc | 6 ------
1 file changed, 6 deletions(-)
commit 4202ae936baf0f4c8a722af240a6613f4e8a8cee
Author: Naohisa Goto
Date: Thu Sep 17 22:48:23 2015 +0900
Remove PhyloXML (split out bio-phyloxml gem)
* Bio::PhyloXML is removed from BioRuby core.
It will soon be released as separate bio-phyloxml gem.
The development repository of the new Bio::PhyloXML is
https://github.com/bioruby/bioruby-phyloxml
lib/bio/db/phyloxml/phyloxml.xsd | 582 ------
lib/bio/db/phyloxml/phyloxml_elements.rb | 1194 -----------
lib/bio/db/phyloxml/phyloxml_parser.rb | 1001 ----------
lib/bio/db/phyloxml/phyloxml_writer.rb | 227 ---
sample/test_phyloxml_big.rb | 205 --
test/data/phyloxml/apaf.xml | 666 -------
test/data/phyloxml/bcl_2.xml | 2097 --------------------
test/data/phyloxml/made_up.xml | 144 --
.../data/phyloxml/ncbi_taxonomy_mollusca_short.xml | 65 -
test/data/phyloxml/phyloxml_examples.xml | 415 ----
test/unit/bio/db/test_phyloxml.rb | 821 --------
test/unit/bio/db/test_phyloxml_writer.rb | 334 ----
12 files changed, 7751 deletions(-)
delete mode 100644 lib/bio/db/phyloxml/phyloxml.xsd
delete mode 100644 lib/bio/db/phyloxml/phyloxml_elements.rb
delete mode 100644 lib/bio/db/phyloxml/phyloxml_parser.rb
delete mode 100644 lib/bio/db/phyloxml/phyloxml_writer.rb
delete mode 100644 sample/test_phyloxml_big.rb
delete mode 100644 test/data/phyloxml/apaf.xml
delete mode 100644 test/data/phyloxml/bcl_2.xml
delete mode 100644 test/data/phyloxml/made_up.xml
delete mode 100644 test/data/phyloxml/ncbi_taxonomy_mollusca_short.xml
delete mode 100644 test/data/phyloxml/phyloxml_examples.xml
delete mode 100644 test/unit/bio/db/test_phyloxml.rb
delete mode 100644 test/unit/bio/db/test_phyloxml_writer.rb
commit e3a85ad9eb6d258e79fdfbe600711a5296a20e8c
Author: Naohisa Goto
Date: Thu Sep 17 22:45:32 2015 +0900
Delete autoload of Bio::PhyloXML
* Delete autoload of Bio::PhyloXML, for preparation of spliting
out Bio::PhyloXML.
lib/bio.rb | 7 -------
1 file changed, 7 deletions(-)
commit 422ffe6fedecf41d83327c01f7a55ebce4afd70d
Author: Naohisa Goto
Date: Tue Sep 15 22:33:14 2015 +0900
Incompatible change about deprecated Bio::Taxonomy is described.
RELEASE_NOTES.rdoc | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
commit 3ea10d73340d8ad571ab6ca386cffca18ec725d1
Author: Naohisa Goto
Date: Tue Sep 15 21:06:29 2015 +0900
Bio::Taxonomy is removed and merged to Bio::PhyloXML::Taxonomy
* Bio::Taxonomy in lib/bio/db/phyloxml/phyloxml_elements.rb was
written for PhyloXML, but it was intended to become general
taxonomy data class in BioRuby. However, no efforts have been
made to improve the Bio::Taxonomy class, and it still remains
to be a PhyloXML specific class. As the first step to split out
Bio::PhyloXML to a new Gem (Biogem) package, we now decide to
remove Bio::Taxonomy and merge it to Bio::PhyloXML::Taxonomy.
* Codes using Bio::Taxonomy should be modified. Changing
Bio::Taxonomy to Bio::PhyloXML::Taxonomy, or adding the
following monkey patch is needed.
module Bio
unless defined? Taxonomy
Taxonomy = Bio::PhyloXML::Taxonomy
end
end
lib/bio.rb | 2 --
lib/bio/db/phyloxml/phyloxml_elements.rb | 21 +++++++++------------
2 files changed, 9 insertions(+), 14 deletions(-)
commit f89f49223f7d6ed74a8fc50aa2355fb5912c885f
Author: Naohisa Goto
Date: Mon Sep 14 15:15:56 2015 +0900
regenerate bioruby.gemspec with rake regemspec
bioruby.gemspec | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
commit 809e190d710caceee1c213da1aa067dee87e6ebd
Author: Naohisa Goto
Date: Mon Sep 14 15:14:05 2015 +0900
New RELEASE_NOTES.rdoc for the next release version
RELEASE_NOTES.rdoc | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
create mode 100644 RELEASE_NOTES.rdoc
commit a44257e933165509f3d2b164ea547ed8fba18ea5
Author: Naohisa Goto
Date: Mon Sep 14 15:10:42 2015 +0900
move RELEASE_NOTES.rdoc to doc/RELEASE_NOTES-1.5.0.rdoc
RELEASE_NOTES.rdoc => doc/RELEASE_NOTES-1.5.0.rdoc | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename RELEASE_NOTES.rdoc => doc/RELEASE_NOTES-1.5.0.rdoc (100%)
commit 4d53755b0181255e2ee69193a5a3b064ef4f4b77
Author: Naohisa Goto
Date: Thu Jul 2 22:19:03 2015 +0900
ChangeLog since 1.5.0 release
ChangeLog | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 ChangeLog
commit e066e3c8bcf0c6b7eadd3573576d4550aca77cc5
Author: Naohisa Goto
Date: Thu Jul 2 22:17:06 2015 +0900
ChangeLog is moved to doc/ChangeLog-1.5.0
ChangeLog => doc/ChangeLog-1.5.0 | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename ChangeLog => doc/ChangeLog-1.5.0 (100%)
commit dd53e885c1baa765bc094897d53309af7b15497b
Author: Naohisa Goto
Date: Thu Jul 2 22:09:26 2015 +0900
change version for generating ChangeLog to 1.5.0
Rakefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
commit 7a5d897ebc45d9ec5357918a42eb2980decf01e4
Author: Naohisa Goto
Date: Thu Jul 2 21:52:17 2015 +0900
version changed to 1.5.1-dev (pre-release version of 1.5.1)
lib/bio/version.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
commit 8fc4d6c64f6958a352c36b171b00d1f1ff2a2354
Author: Naohisa Goto
Date: Thu Jul 2 21:47:28 2015 +0900
fix English syntax and unexpected word insertion
RELEASE_NOTES.rdoc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
bio-2.0.6/COPYING.ja 0000644 0001750 0001751 00000005100 14764611416 013251 0 ustar nilesh nilesh 本プãƒã‚°ãƒ©ãƒ ã¯ãƒ•リーソフトウェアã§ã™ï¼Ž2-clause BSDL
ã¾ãŸã¯ä»¥ä¸‹ã«ç¤ºã™æ¡ä»¶ã§æœ¬ãƒ—ãƒã‚°ãƒ©ãƒ ã‚’å†é…布ã§ãã¾ã™
2-clause BSDLã«ã¤ã„ã¦ã¯BSDLファイルをå‚ç…§ã—ã¦ä¸‹ã•ã„.
1. 複製ã¯åˆ¶é™ãªã自由ã§ã™ï¼Ž
2. ä»¥ä¸‹ã®æ¡ä»¶ã®ã„ãšã‚Œã‹ã‚’満ãŸã™æ™‚ã«æœ¬ãƒ—ãƒã‚°ãƒ©ãƒ ã®ã‚½ãƒ¼ã‚¹ã‚’
自由ã«å¤‰æ›´ã§ãã¾ã™ï¼Ž
(a) ãƒãƒƒãƒˆãƒ‹ãƒ¥ãƒ¼ã‚ºã«ãƒã‚¹ãƒˆã—ãŸã‚Šï¼Œä½œè€…ã«å¤‰æ›´ã‚’é€ä»˜ã™ã‚‹
ãªã©ã®æ–¹æ³•ã§ï¼Œå¤‰æ›´ã‚’公開ã™ã‚‹ï¼Ž
(b) 変更ã—ãŸæœ¬ãƒ—ãƒã‚°ãƒ©ãƒ ã‚’è‡ªåˆ†ã®æ‰€å±žã™ã‚‹çµ„織内部ã ã‘ã§
使ã†ï¼Ž
(c) 変更点を明示ã—ãŸã†ãˆï¼Œã‚½ãƒ•トウェアã®åå‰ã‚’変更ã™ã‚‹ï¼Ž
ãã®ã‚½ãƒ•トウェアをé…布ã™ã‚‹æ™‚ã«ã¯å¤‰æ›´å‰ã®æœ¬ãƒ—ãƒã‚°ãƒ©
ãƒ ã‚‚åŒæ™‚ã«é…布ã™ã‚‹ï¼Žã¾ãŸã¯å¤‰æ›´å‰ã®æœ¬ãƒ—ãƒã‚°ãƒ©ãƒ ã®ã‚½ãƒ¼
スã®å…¥æ‰‹æ³•を明示ã™ã‚‹ï¼Ž
(d) ãã®ä»–ã®å¤‰æ›´æ¡ä»¶ã‚’作者ã¨åˆæ„ã™ã‚‹ï¼Ž
3. ä»¥ä¸‹ã®æ¡ä»¶ã®ã„ãšã‚Œã‹ã‚’満ãŸã™æ™‚ã«æœ¬ãƒ—ãƒã‚°ãƒ©ãƒ をコンパイ
ルã—ãŸã‚ªãƒ–ジェクトコードや実行形å¼ã§ã‚‚é…布ã§ãã¾ã™ï¼Ž
(a) ãƒã‚¤ãƒŠãƒªã‚’å—ã‘å–ã£ãŸäººãŒã‚½ãƒ¼ã‚¹ã‚’入手ã§ãるよã†ã«ï¼Œ
ソースã®å…¥æ‰‹æ³•を明示ã™ã‚‹ï¼Ž
(b) 機械å¯èªãªã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’添付ã™ã‚‹ï¼Ž
(c) 変更を行ã£ãŸãƒã‚¤ãƒŠãƒªã¯åå‰ã‚’変更ã—ãŸã†ãˆï¼Œã‚ªãƒªã‚¸ãƒŠ
ルã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®å…¥æ‰‹æ³•を明示ã™ã‚‹ï¼Ž
(d) ãã®ä»–ã®é…布æ¡ä»¶ã‚’作者ã¨åˆæ„ã™ã‚‹ï¼Ž
4. ä»–ã®ãƒ—ãƒã‚°ãƒ©ãƒ ã¸ã®å¼•用ã¯ã„ã‹ãªã‚‹ç›®çš„ã§ã‚れ自由ã§ã™ï¼ŽãŸ
ã ã—,本プãƒã‚°ãƒ©ãƒ ã«å«ã¾ã‚Œã‚‹ä»–ã®ä½œè€…ã«ã‚ˆã‚‹ã‚³ãƒ¼ãƒ‰ã¯ï¼Œã
れãžã‚Œã®ä½œè€…ã®æ„å‘ã«ã‚ˆã‚‹åˆ¶é™ãŒåŠ ãˆã‚‰ã‚Œã‚‹å ´åˆãŒã‚りã¾ã™ï¼Ž
ãれらファイルã®ä¸€è¦§ã¨ãれãžã‚Œã®é…布æ¡ä»¶ãªã©ã«ä»˜ã„ã¦ã¯
LEGALファイルをå‚ç…§ã—ã¦ãã ã•ã„.
5. 本プãƒã‚°ãƒ©ãƒ ã¸ã®å…¥åŠ›ã¨ãªã‚‹ã‚¹ã‚¯ãƒªãƒ—トãŠã‚ˆã³ï¼Œæœ¬ãƒ—ãƒã‚°ãƒ©
ムã‹ã‚‰ã®å‡ºåŠ›ã®æ¨©åˆ©ã¯æœ¬ãƒ—ãƒã‚°ãƒ©ãƒ ã®ä½œè€…ã§ã¯ãªã,ãれãž
れã®å…¥å‡ºåŠ›ã‚’ç”Ÿæˆã—ãŸäººã«å±žã—ã¾ã™ï¼Žã¾ãŸï¼Œæœ¬ãƒ—ãƒã‚°ãƒ©ãƒ ã«
組ã¿è¾¼ã¾ã‚Œã‚‹ãŸã‚ã®æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリã«ã¤ã„ã¦ã‚‚åŒæ§˜ã§ã™ï¼Ž
6. 本プãƒã‚°ãƒ©ãƒ ã¯ç„¡ä¿è¨¼ã§ã™ï¼Žä½œè€…ã¯æœ¬ãƒ—ãƒã‚°ãƒ©ãƒ をサãƒãƒ¼ãƒˆ
ã™ã‚‹æ„å¿—ã¯ã‚りã¾ã™ãŒï¼Œãƒ—ãƒã‚°ãƒ©ãƒ 自身ã®ãƒã‚°ã‚ã‚‹ã„ã¯æœ¬ãƒ—
ãƒã‚°ãƒ©ãƒ ã®å®Ÿè¡Œãªã©ã‹ã‚‰ç™ºç”Ÿã™ã‚‹ã„ã‹ãªã‚‹æå®³ã«å¯¾ã—ã¦ã‚‚責
任をæŒã¡ã¾ã›ã‚“.
bio-2.0.6/etc/ 0000755 0001750 0001751 00000000000 14764611416 012404 5 ustar nilesh nilesh bio-2.0.6/etc/bioinformatics/ 0000755 0001750 0001751 00000000000 14764611416 015414 5 ustar nilesh nilesh bio-2.0.6/etc/bioinformatics/seqdatabase.ini 0000644 0001750 0001751 00000000754 14764611416 020400 0 ustar nilesh nilesh VERSION=1.00
[embl]
protocol=biofetch
location=http://www.ebi.ac.uk/Tools/dbfetch/dbfetch
dbname=embl
[emblcds]
protocol=biofetch
location=http://www.ebi.ac.uk/Tools/dbfetch/dbfetch
dbname=emblcds
[uniprotkb]
protocol=biofetch
location=http://www.ebi.ac.uk/Tools/dbfetch/dbfetch
dbname=uniprotkb
[refseqn]
protocol=biofetch
location=http://www.ebi.ac.uk/Tools/dbfetch/dbfetch
dbname=refseqn
[refseqp]
protocol=biofetch
location=http://www.ebi.ac.uk/Tools/dbfetch/dbfetch
dbname=refseqp
bio-2.0.6/bioruby.gemspec 0000644 0001750 0001751 00000056326 14764611416 014665 0 ustar nilesh nilesh # This file is automatically generated from bioruby.gemspec.erb and
# should NOT be edited by hand.
#
Gem::Specification.new do |s|
s.name = 'bio'
s.version = "2.0.6"
s.author = "BioRuby project"
s.email = "staff@bioruby.org"
s.homepage = "http://bioruby.org/"
s.license = "Ruby"
s.summary = "Bioinformatics library"
s.description = "BioRuby is a library for bioinformatics (biology + information science)."
s.platform = Gem::Platform::RUBY
s.files = [
".github/workflows/ruby.yml",
".gitignore",
"BSDL",
"COPYING",
"COPYING.ja",
"ChangeLog",
"GPL",
"Gemfile",
"KNOWN_ISSUES.rdoc",
"LEGAL",
"LGPL",
"README.rdoc",
"README_DEV.rdoc",
"RELEASE_NOTES.rdoc",
"Rakefile",
"appveyor.yml",
"bioruby.gemspec",
"bioruby.gemspec.erb",
"doc/ChangeLog-1.4.3",
"doc/ChangeLog-1.5.0",
"doc/ChangeLog-before-1.3.1",
"doc/ChangeLog-before-1.4.2",
"doc/Changes-0.7.rd",
"doc/Changes-1.3.rdoc",
"doc/RELEASE_NOTES-1.4.0.rdoc",
"doc/RELEASE_NOTES-1.4.1.rdoc",
"doc/RELEASE_NOTES-1.4.2.rdoc",
"doc/RELEASE_NOTES-1.4.3.rdoc",
"doc/RELEASE_NOTES-1.5.0.rdoc",
"doc/Tutorial.md",
"doc/Tutorial.rd",
"doc/Tutorial.rd.html",
"doc/Tutorial.rd.ja",
"doc/Tutorial.rd.ja.html",
"doc/Tutorial_ja.md",
"doc/bioruby.css",
"etc/bioinformatics/seqdatabase.ini",
"lib/bio.rb",
"lib/bio/alignment.rb",
"lib/bio/appl/bl2seq/report.rb",
"lib/bio/appl/blast.rb",
"lib/bio/appl/blast/format0.rb",
"lib/bio/appl/blast/format8.rb",
"lib/bio/appl/blast/genomenet.rb",
"lib/bio/appl/blast/ncbioptions.rb",
"lib/bio/appl/blast/remote.rb",
"lib/bio/appl/blast/report.rb",
"lib/bio/appl/blast/rexml.rb",
"lib/bio/appl/blast/rpsblast.rb",
"lib/bio/appl/blast/wublast.rb",
"lib/bio/appl/blat/report.rb",
"lib/bio/appl/clustalw.rb",
"lib/bio/appl/clustalw/report.rb",
"lib/bio/appl/emboss.rb",
"lib/bio/appl/fasta.rb",
"lib/bio/appl/fasta/format10.rb",
"lib/bio/appl/gcg/msf.rb",
"lib/bio/appl/gcg/seq.rb",
"lib/bio/appl/genscan/report.rb",
"lib/bio/appl/hmmer.rb",
"lib/bio/appl/hmmer/report.rb",
"lib/bio/appl/iprscan/report.rb",
"lib/bio/appl/mafft.rb",
"lib/bio/appl/mafft/report.rb",
"lib/bio/appl/meme/mast.rb",
"lib/bio/appl/meme/mast/report.rb",
"lib/bio/appl/meme/motif.rb",
"lib/bio/appl/muscle.rb",
"lib/bio/appl/paml/baseml.rb",
"lib/bio/appl/paml/baseml/report.rb",
"lib/bio/appl/paml/codeml.rb",
"lib/bio/appl/paml/codeml/rates.rb",
"lib/bio/appl/paml/codeml/report.rb",
"lib/bio/appl/paml/common.rb",
"lib/bio/appl/paml/common_report.rb",
"lib/bio/appl/paml/yn00.rb",
"lib/bio/appl/paml/yn00/report.rb",
"lib/bio/appl/phylip/alignment.rb",
"lib/bio/appl/phylip/distance_matrix.rb",
"lib/bio/appl/probcons.rb",
"lib/bio/appl/psort.rb",
"lib/bio/appl/psort/report.rb",
"lib/bio/appl/pts1.rb",
"lib/bio/appl/sim4.rb",
"lib/bio/appl/sim4/report.rb",
"lib/bio/appl/sosui/report.rb",
"lib/bio/appl/spidey/report.rb",
"lib/bio/appl/targetp/report.rb",
"lib/bio/appl/tcoffee.rb",
"lib/bio/appl/tmhmm/report.rb",
"lib/bio/command.rb",
"lib/bio/compat/features.rb",
"lib/bio/compat/references.rb",
"lib/bio/data/aa.rb",
"lib/bio/data/codontable.rb",
"lib/bio/data/na.rb",
"lib/bio/db.rb",
"lib/bio/db/aaindex.rb",
"lib/bio/db/embl/common.rb",
"lib/bio/db/embl/embl.rb",
"lib/bio/db/embl/embl_to_biosequence.rb",
"lib/bio/db/embl/format_embl.rb",
"lib/bio/db/embl/sptr.rb",
"lib/bio/db/embl/swissprot.rb",
"lib/bio/db/embl/trembl.rb",
"lib/bio/db/embl/uniprot.rb",
"lib/bio/db/embl/uniprotkb.rb",
"lib/bio/db/fantom.rb",
"lib/bio/db/fasta.rb",
"lib/bio/db/fasta/defline.rb",
"lib/bio/db/fasta/fasta_to_biosequence.rb",
"lib/bio/db/fasta/format_fasta.rb",
"lib/bio/db/fasta/format_qual.rb",
"lib/bio/db/fasta/qual.rb",
"lib/bio/db/fasta/qual_to_biosequence.rb",
"lib/bio/db/fastq.rb",
"lib/bio/db/fastq/fastq_to_biosequence.rb",
"lib/bio/db/fastq/format_fastq.rb",
"lib/bio/db/genbank/common.rb",
"lib/bio/db/genbank/ddbj.rb",
"lib/bio/db/genbank/format_genbank.rb",
"lib/bio/db/genbank/genbank.rb",
"lib/bio/db/genbank/genbank_to_biosequence.rb",
"lib/bio/db/genbank/genpept.rb",
"lib/bio/db/genbank/refseq.rb",
"lib/bio/db/gff.rb",
"lib/bio/db/go.rb",
"lib/bio/db/kegg/brite.rb",
"lib/bio/db/kegg/common.rb",
"lib/bio/db/kegg/compound.rb",
"lib/bio/db/kegg/drug.rb",
"lib/bio/db/kegg/enzyme.rb",
"lib/bio/db/kegg/expression.rb",
"lib/bio/db/kegg/genes.rb",
"lib/bio/db/kegg/genome.rb",
"lib/bio/db/kegg/glycan.rb",
"lib/bio/db/kegg/keggtab.rb",
"lib/bio/db/kegg/kgml.rb",
"lib/bio/db/kegg/module.rb",
"lib/bio/db/kegg/orthology.rb",
"lib/bio/db/kegg/pathway.rb",
"lib/bio/db/kegg/reaction.rb",
"lib/bio/db/lasergene.rb",
"lib/bio/db/litdb.rb",
"lib/bio/db/medline.rb",
"lib/bio/db/nbrf.rb",
"lib/bio/db/newick.rb",
"lib/bio/db/nexus.rb",
"lib/bio/db/pdb.rb",
"lib/bio/db/pdb/atom.rb",
"lib/bio/db/pdb/chain.rb",
"lib/bio/db/pdb/chemicalcomponent.rb",
"lib/bio/db/pdb/model.rb",
"lib/bio/db/pdb/pdb.rb",
"lib/bio/db/pdb/residue.rb",
"lib/bio/db/pdb/utils.rb",
"lib/bio/db/prosite.rb",
"lib/bio/db/rebase.rb",
"lib/bio/db/sanger_chromatogram/abif.rb",
"lib/bio/db/sanger_chromatogram/chromatogram.rb",
"lib/bio/db/sanger_chromatogram/chromatogram_to_biosequence.rb",
"lib/bio/db/sanger_chromatogram/scf.rb",
"lib/bio/db/soft.rb",
"lib/bio/db/transfac.rb",
"lib/bio/feature.rb",
"lib/bio/io/das.rb",
"lib/bio/io/fastacmd.rb",
"lib/bio/io/fetch.rb",
"lib/bio/io/flatfile.rb",
"lib/bio/io/flatfile/autodetection.rb",
"lib/bio/io/flatfile/bdb.rb",
"lib/bio/io/flatfile/buffer.rb",
"lib/bio/io/flatfile/index.rb",
"lib/bio/io/flatfile/indexer.rb",
"lib/bio/io/flatfile/splitter.rb",
"lib/bio/io/hinv.rb",
"lib/bio/io/ncbirest.rb",
"lib/bio/io/pubmed.rb",
"lib/bio/io/registry.rb",
"lib/bio/io/togows.rb",
"lib/bio/location.rb",
"lib/bio/map.rb",
"lib/bio/pathway.rb",
"lib/bio/reference.rb",
"lib/bio/sequence.rb",
"lib/bio/sequence/aa.rb",
"lib/bio/sequence/adapter.rb",
"lib/bio/sequence/common.rb",
"lib/bio/sequence/compat.rb",
"lib/bio/sequence/dblink.rb",
"lib/bio/sequence/format.rb",
"lib/bio/sequence/format_raw.rb",
"lib/bio/sequence/generic.rb",
"lib/bio/sequence/na.rb",
"lib/bio/sequence/quality_score.rb",
"lib/bio/sequence/sequence_masker.rb",
"lib/bio/tree.rb",
"lib/bio/tree/output.rb",
"lib/bio/util/color_scheme.rb",
"lib/bio/util/color_scheme/buried.rb",
"lib/bio/util/color_scheme/helix.rb",
"lib/bio/util/color_scheme/hydropathy.rb",
"lib/bio/util/color_scheme/nucleotide.rb",
"lib/bio/util/color_scheme/strand.rb",
"lib/bio/util/color_scheme/taylor.rb",
"lib/bio/util/color_scheme/turn.rb",
"lib/bio/util/color_scheme/zappo.rb",
"lib/bio/util/contingency_table.rb",
"lib/bio/util/restriction_enzyme.rb",
"lib/bio/util/restriction_enzyme/analysis.rb",
"lib/bio/util/restriction_enzyme/analysis_basic.rb",
"lib/bio/util/restriction_enzyme/cut_symbol.rb",
"lib/bio/util/restriction_enzyme/dense_int_array.rb",
"lib/bio/util/restriction_enzyme/double_stranded.rb",
"lib/bio/util/restriction_enzyme/double_stranded/aligned_strands.rb",
"lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair.rb",
"lib/bio/util/restriction_enzyme/double_stranded/cut_location_pair_in_enzyme_notation.rb",
"lib/bio/util/restriction_enzyme/double_stranded/cut_locations.rb",
"lib/bio/util/restriction_enzyme/double_stranded/cut_locations_in_enzyme_notation.rb",
"lib/bio/util/restriction_enzyme/enzymes.yaml",
"lib/bio/util/restriction_enzyme/range/cut_range.rb",
"lib/bio/util/restriction_enzyme/range/cut_ranges.rb",
"lib/bio/util/restriction_enzyme/range/horizontal_cut_range.rb",
"lib/bio/util/restriction_enzyme/range/sequence_range.rb",
"lib/bio/util/restriction_enzyme/range/sequence_range/calculated_cuts.rb",
"lib/bio/util/restriction_enzyme/range/sequence_range/fragment.rb",
"lib/bio/util/restriction_enzyme/range/sequence_range/fragments.rb",
"lib/bio/util/restriction_enzyme/range/vertical_cut_range.rb",
"lib/bio/util/restriction_enzyme/single_strand.rb",
"lib/bio/util/restriction_enzyme/single_strand/cut_locations_in_enzyme_notation.rb",
"lib/bio/util/restriction_enzyme/single_strand_complement.rb",
"lib/bio/util/restriction_enzyme/sorted_num_array.rb",
"lib/bio/util/restriction_enzyme/string_formatting.rb",
"lib/bio/util/sirna.rb",
"lib/bio/version.rb",
"sample/any2fasta.rb",
"sample/benchmark_clustalw_report.rb",
"sample/biofetch.rb",
"sample/color_scheme_aa.rb",
"sample/color_scheme_na.rb",
"sample/demo_aaindex.rb",
"sample/demo_aminoacid.rb",
"sample/demo_bl2seq_report.rb",
"sample/demo_blast_report.rb",
"sample/demo_codontable.rb",
"sample/demo_das.rb",
"sample/demo_fasta_remote.rb",
"sample/demo_fastaformat.rb",
"sample/demo_genbank.rb",
"sample/demo_genscan_report.rb",
"sample/demo_gff1.rb",
"sample/demo_go.rb",
"sample/demo_hmmer_report.rb",
"sample/demo_kegg_compound.rb",
"sample/demo_kegg_drug.rb",
"sample/demo_kegg_genome.rb",
"sample/demo_kegg_glycan.rb",
"sample/demo_kegg_orthology.rb",
"sample/demo_kegg_reaction.rb",
"sample/demo_litdb.rb",
"sample/demo_locations.rb",
"sample/demo_ncbi_rest.rb",
"sample/demo_nucleicacid.rb",
"sample/demo_pathway.rb",
"sample/demo_prosite.rb",
"sample/demo_psort.rb",
"sample/demo_psort_report.rb",
"sample/demo_pubmed.rb",
"sample/demo_sequence.rb",
"sample/demo_sirna.rb",
"sample/demo_sosui_report.rb",
"sample/demo_targetp_report.rb",
"sample/demo_tmhmm_report.rb",
"sample/enzymes.rb",
"sample/fasta2tab.rb",
"sample/fastagrep.rb",
"sample/fastasort.rb",
"sample/fastq2html.cwl",
"sample/fastq2html.rb",
"sample/fastq2html.testdata.yaml",
"sample/fsplit.rb",
"sample/gb2fasta.rb",
"sample/gb2tab.rb",
"sample/gbtab2mysql.rb",
"sample/genes2nuc.rb",
"sample/genes2pep.rb",
"sample/genes2tab.rb",
"sample/genome2rb.rb",
"sample/genome2tab.rb",
"sample/goslim.rb",
"sample/gt2fasta.rb",
"sample/na2aa.cwl",
"sample/na2aa.rb",
"sample/na2aa.testdata.yaml",
"sample/pmfetch.rb",
"sample/pmsearch.rb",
"sample/rev_comp.cwl",
"sample/rev_comp.rb",
"sample/rev_comp.testdata.yaml",
"sample/seqdatabase.ini",
"sample/ssearch2tab.rb",
"sample/tdiary.rb",
"sample/test_restriction_enzyme_long.rb",
"sample/tfastx2tab.rb",
"sample/vs-genes.rb",
"test/bioruby_test_helper.rb",
"test/data/HMMER/hmmpfam.out",
"test/data/HMMER/hmmsearch.out",
"test/data/KEGG/1.1.1.1.enzyme",
"test/data/KEGG/C00025.compound",
"test/data/KEGG/D00063.drug",
"test/data/KEGG/G00024.glycan",
"test/data/KEGG/G01366.glycan",
"test/data/KEGG/K02338.orthology",
"test/data/KEGG/M00118.module",
"test/data/KEGG/R00006.reaction",
"test/data/KEGG/T00005.genome",
"test/data/KEGG/T00070.genome",
"test/data/KEGG/b0529.gene",
"test/data/KEGG/ec00072.pathway",
"test/data/KEGG/hsa00790.pathway",
"test/data/KEGG/ko00312.pathway",
"test/data/KEGG/map00030.pathway",
"test/data/KEGG/map00052.pathway",
"test/data/KEGG/rn00250.pathway",
"test/data/KEGG/test.kgml",
"test/data/SOSUI/sample.report",
"test/data/TMHMM/sample.report",
"test/data/aaindex/DAYM780301",
"test/data/aaindex/PRAM900102",
"test/data/bl2seq/cd8a_cd8b_blastp.bl2seq",
"test/data/bl2seq/cd8a_p53_e-5blastp.bl2seq",
"test/data/blast/2.2.15.blastp.m7",
"test/data/blast/b0002.faa",
"test/data/blast/b0002.faa.m0",
"test/data/blast/b0002.faa.m7",
"test/data/blast/b0002.faa.m8",
"test/data/blast/blastp-multi.m7",
"test/data/clustalw/example1-seqnos.aln",
"test/data/clustalw/example1.aln",
"test/data/command/echoarg2.bat",
"test/data/command/echoarg2.sh",
"test/data/embl/AB090716.embl",
"test/data/embl/AB090716.embl.rel89",
"test/data/fasta/EFTU_BACSU.fasta",
"test/data/fasta/example1.txt",
"test/data/fasta/example2.txt",
"test/data/fastq/README.txt",
"test/data/fastq/error_diff_ids.fastq",
"test/data/fastq/error_double_qual.fastq",
"test/data/fastq/error_double_seq.fastq",
"test/data/fastq/error_long_qual.fastq",
"test/data/fastq/error_no_qual.fastq",
"test/data/fastq/error_qual_del.fastq",
"test/data/fastq/error_qual_escape.fastq",
"test/data/fastq/error_qual_null.fastq",
"test/data/fastq/error_qual_space.fastq",
"test/data/fastq/error_qual_tab.fastq",
"test/data/fastq/error_qual_unit_sep.fastq",
"test/data/fastq/error_qual_vtab.fastq",
"test/data/fastq/error_short_qual.fastq",
"test/data/fastq/error_spaces.fastq",
"test/data/fastq/error_tabs.fastq",
"test/data/fastq/error_trunc_at_plus.fastq",
"test/data/fastq/error_trunc_at_qual.fastq",
"test/data/fastq/error_trunc_at_seq.fastq",
"test/data/fastq/error_trunc_in_plus.fastq",
"test/data/fastq/error_trunc_in_qual.fastq",
"test/data/fastq/error_trunc_in_seq.fastq",
"test/data/fastq/error_trunc_in_title.fastq",
"test/data/fastq/illumina_full_range_as_illumina.fastq",
"test/data/fastq/illumina_full_range_as_sanger.fastq",
"test/data/fastq/illumina_full_range_as_solexa.fastq",
"test/data/fastq/illumina_full_range_original_illumina.fastq",
"test/data/fastq/longreads_as_illumina.fastq",
"test/data/fastq/longreads_as_sanger.fastq",
"test/data/fastq/longreads_as_solexa.fastq",
"test/data/fastq/longreads_original_sanger.fastq",
"test/data/fastq/misc_dna_as_illumina.fastq",
"test/data/fastq/misc_dna_as_sanger.fastq",
"test/data/fastq/misc_dna_as_solexa.fastq",
"test/data/fastq/misc_dna_original_sanger.fastq",
"test/data/fastq/misc_rna_as_illumina.fastq",
"test/data/fastq/misc_rna_as_sanger.fastq",
"test/data/fastq/misc_rna_as_solexa.fastq",
"test/data/fastq/misc_rna_original_sanger.fastq",
"test/data/fastq/sanger_full_range_as_illumina.fastq",
"test/data/fastq/sanger_full_range_as_sanger.fastq",
"test/data/fastq/sanger_full_range_as_solexa.fastq",
"test/data/fastq/sanger_full_range_original_sanger.fastq",
"test/data/fastq/solexa_full_range_as_illumina.fastq",
"test/data/fastq/solexa_full_range_as_sanger.fastq",
"test/data/fastq/solexa_full_range_as_solexa.fastq",
"test/data/fastq/solexa_full_range_original_solexa.fastq",
"test/data/fastq/wrapping_as_illumina.fastq",
"test/data/fastq/wrapping_as_sanger.fastq",
"test/data/fastq/wrapping_as_solexa.fastq",
"test/data/fastq/wrapping_original_sanger.fastq",
"test/data/gcg/pileup-aa.msf",
"test/data/genbank/CAA35997.gp",
"test/data/genbank/SCU49845.gb",
"test/data/genscan/sample.report",
"test/data/go/selected_component.ontology",
"test/data/go/selected_gene_association.sgd",
"test/data/go/selected_wikipedia2go",
"test/data/iprscan/merged.raw",
"test/data/iprscan/merged.txt",
"test/data/litdb/1717226.litdb",
"test/data/medline/20146148_modified.medline",
"test/data/meme/db",
"test/data/meme/mast",
"test/data/meme/mast.out",
"test/data/meme/meme.out",
"test/data/paml/codeml/control_file.txt",
"test/data/paml/codeml/models/aa.aln",
"test/data/paml/codeml/models/aa.dnd",
"test/data/paml/codeml/models/aa.ph",
"test/data/paml/codeml/models/alignment.phy",
"test/data/paml/codeml/models/results0-3.txt",
"test/data/paml/codeml/models/results7-8.txt",
"test/data/paml/codeml/output.txt",
"test/data/paml/codeml/rates",
"test/data/pir/CRAB_ANAPL.pir",
"test/data/prosite/prosite.dat",
"test/data/refseq/nm_126355.entret",
"test/data/rpsblast/misc.rpsblast",
"test/data/sanger_chromatogram/test_chromatogram_abif.ab1",
"test/data/sanger_chromatogram/test_chromatogram_scf_v2.scf",
"test/data/sanger_chromatogram/test_chromatogram_scf_v3.scf",
"test/data/sim4/complement-A4.sim4",
"test/data/sim4/simple-A4.sim4",
"test/data/sim4/simple2-A4.sim4",
"test/data/soft/GDS100_partial.soft",
"test/data/soft/GSE3457_family_partial.soft",
"test/data/uniprot/P03589.uniprot",
"test/data/uniprot/P28907.uniprot",
"test/data/uniprot/P49144.uniprot",
"test/data/uniprot/p53_human.uniprot",
"test/functional/bio/sequence/test_output_embl.rb",
"test/functional/bio/test_command.rb",
"test/network/bio/appl/blast/test_remote.rb",
"test/network/bio/appl/test_blast.rb",
"test/network/bio/appl/test_pts1.rb",
"test/network/bio/db/kegg/test_genes_hsa7422.rb",
"test/network/bio/io/test_pubmed.rb",
"test/network/bio/io/test_togows.rb",
"test/network/bio/test_command.rb",
"test/runner.rb",
"test/unit/bio/appl/bl2seq/test_report.rb",
"test/unit/bio/appl/blast/test_ncbioptions.rb",
"test/unit/bio/appl/blast/test_report.rb",
"test/unit/bio/appl/blast/test_rpsblast.rb",
"test/unit/bio/appl/clustalw/test_report.rb",
"test/unit/bio/appl/gcg/test_msf.rb",
"test/unit/bio/appl/genscan/test_report.rb",
"test/unit/bio/appl/hmmer/test_report.rb",
"test/unit/bio/appl/iprscan/test_report.rb",
"test/unit/bio/appl/mafft/test_report.rb",
"test/unit/bio/appl/meme/mast/test_report.rb",
"test/unit/bio/appl/meme/test_mast.rb",
"test/unit/bio/appl/meme/test_motif.rb",
"test/unit/bio/appl/paml/codeml/test_rates.rb",
"test/unit/bio/appl/paml/codeml/test_report.rb",
"test/unit/bio/appl/paml/codeml/test_report_single.rb",
"test/unit/bio/appl/paml/test_codeml.rb",
"test/unit/bio/appl/sim4/test_report.rb",
"test/unit/bio/appl/sosui/test_report.rb",
"test/unit/bio/appl/targetp/test_report.rb",
"test/unit/bio/appl/test_blast.rb",
"test/unit/bio/appl/test_fasta.rb",
"test/unit/bio/appl/test_pts1.rb",
"test/unit/bio/appl/tmhmm/test_report.rb",
"test/unit/bio/data/test_aa.rb",
"test/unit/bio/data/test_codontable.rb",
"test/unit/bio/data/test_na.rb",
"test/unit/bio/db/embl/test_common.rb",
"test/unit/bio/db/embl/test_embl.rb",
"test/unit/bio/db/embl/test_embl_rel89.rb",
"test/unit/bio/db/embl/test_embl_to_bioseq.rb",
"test/unit/bio/db/embl/test_uniprot.rb",
"test/unit/bio/db/embl/test_uniprotkb.rb",
"test/unit/bio/db/embl/test_uniprotkb_P03589.rb",
"test/unit/bio/db/embl/test_uniprotkb_P28907.rb",
"test/unit/bio/db/embl/test_uniprotkb_P49144.rb",
"test/unit/bio/db/embl/test_uniprotkb_new_part.rb",
"test/unit/bio/db/fasta/test_defline.rb",
"test/unit/bio/db/fasta/test_defline_misc.rb",
"test/unit/bio/db/fasta/test_format_qual.rb",
"test/unit/bio/db/genbank/test_common.rb",
"test/unit/bio/db/genbank/test_genbank.rb",
"test/unit/bio/db/genbank/test_genpept.rb",
"test/unit/bio/db/kegg/test_compound.rb",
"test/unit/bio/db/kegg/test_drug.rb",
"test/unit/bio/db/kegg/test_enzyme.rb",
"test/unit/bio/db/kegg/test_genes.rb",
"test/unit/bio/db/kegg/test_genome.rb",
"test/unit/bio/db/kegg/test_glycan.rb",
"test/unit/bio/db/kegg/test_kgml.rb",
"test/unit/bio/db/kegg/test_module.rb",
"test/unit/bio/db/kegg/test_orthology.rb",
"test/unit/bio/db/kegg/test_pathway.rb",
"test/unit/bio/db/kegg/test_reaction.rb",
"test/unit/bio/db/pdb/test_pdb.rb",
"test/unit/bio/db/sanger_chromatogram/test_abif.rb",
"test/unit/bio/db/sanger_chromatogram/test_scf.rb",
"test/unit/bio/db/test_aaindex.rb",
"test/unit/bio/db/test_fasta.rb",
"test/unit/bio/db/test_fastq.rb",
"test/unit/bio/db/test_gff.rb",
"test/unit/bio/db/test_go.rb",
"test/unit/bio/db/test_lasergene.rb",
"test/unit/bio/db/test_litdb.rb",
"test/unit/bio/db/test_medline.rb",
"test/unit/bio/db/test_nbrf.rb",
"test/unit/bio/db/test_newick.rb",
"test/unit/bio/db/test_nexus.rb",
"test/unit/bio/db/test_prosite.rb",
"test/unit/bio/db/test_qual.rb",
"test/unit/bio/db/test_rebase.rb",
"test/unit/bio/db/test_soft.rb",
"test/unit/bio/io/flatfile/test_autodetection.rb",
"test/unit/bio/io/flatfile/test_buffer.rb",
"test/unit/bio/io/flatfile/test_splitter.rb",
"test/unit/bio/io/test_fastacmd.rb",
"test/unit/bio/io/test_flatfile.rb",
"test/unit/bio/io/test_togows.rb",
"test/unit/bio/sequence/test_aa.rb",
"test/unit/bio/sequence/test_common.rb",
"test/unit/bio/sequence/test_compat.rb",
"test/unit/bio/sequence/test_dblink.rb",
"test/unit/bio/sequence/test_na.rb",
"test/unit/bio/sequence/test_quality_score.rb",
"test/unit/bio/sequence/test_ruby3.rb",
"test/unit/bio/sequence/test_sequence_masker.rb",
"test/unit/bio/test_alignment.rb",
"test/unit/bio/test_command.rb",
"test/unit/bio/test_db.rb",
"test/unit/bio/test_feature.rb",
"test/unit/bio/test_location.rb",
"test/unit/bio/test_map.rb",
"test/unit/bio/test_pathway.rb",
"test/unit/bio/test_reference.rb",
"test/unit/bio/test_sequence.rb",
"test/unit/bio/test_tree.rb",
"test/unit/bio/util/restriction_enzyme/analysis/test_calculated_cuts.rb",
"test/unit/bio/util/restriction_enzyme/analysis/test_cut_ranges.rb",
"test/unit/bio/util/restriction_enzyme/analysis/test_sequence_range.rb",
"test/unit/bio/util/restriction_enzyme/double_stranded/test_aligned_strands.rb",
"test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair.rb",
"test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_location_pair_in_enzyme_notation.rb",
"test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations.rb",
"test/unit/bio/util/restriction_enzyme/double_stranded/test_cut_locations_in_enzyme_notation.rb",
"test/unit/bio/util/restriction_enzyme/single_strand/test_cut_locations_in_enzyme_notation.rb",
"test/unit/bio/util/restriction_enzyme/test_analysis.rb",
"test/unit/bio/util/restriction_enzyme/test_cut_symbol.rb",
"test/unit/bio/util/restriction_enzyme/test_dense_int_array.rb",
"test/unit/bio/util/restriction_enzyme/test_double_stranded.rb",
"test/unit/bio/util/restriction_enzyme/test_single_strand.rb",
"test/unit/bio/util/restriction_enzyme/test_single_strand_complement.rb",
"test/unit/bio/util/restriction_enzyme/test_sorted_num_array.rb",
"test/unit/bio/util/restriction_enzyme/test_string_formatting.rb",
"test/unit/bio/util/test_color_scheme.rb",
"test/unit/bio/util/test_contingency_table.rb",
"test/unit/bio/util/test_restriction_enzyme.rb",
"test/unit/bio/util/test_sirna.rb"
]
s.extra_rdoc_files = [
"KNOWN_ISSUES.rdoc",
"README.rdoc",
"README_DEV.rdoc",
"RELEASE_NOTES.rdoc",
"doc/Changes-1.3.rdoc",
"doc/RELEASE_NOTES-1.4.0.rdoc",
"doc/RELEASE_NOTES-1.4.1.rdoc",
"doc/RELEASE_NOTES-1.4.2.rdoc",
"doc/RELEASE_NOTES-1.4.3.rdoc",
"doc/RELEASE_NOTES-1.5.0.rdoc"
]
s.rdoc_options << '--main' << 'README.rdoc'
s.rdoc_options << '--title' << 'BioRuby API documentation'
s.rdoc_options << '--exclude' << '\.yaml\z'
s.rdoc_options << '--line-numbers' << '--inline-source'
s.require_path = 'lib'
end
bio-2.0.6/COPYING 0000644 0001750 0001751 00000004711 14764611416 012667 0 ustar nilesh nilesh BioRuby is copyrighted free software by Toshiaki Katayama .
You can redistribute it and/or modify it under either the terms of the
2-clause BSDL (see the file BSDL), or the conditions below:
1. You may make and give away verbatim copies of the source form of the
software without restriction, provided that you duplicate all of the
original copyright notices and associated disclaimers.
2. You may modify your copy of the software in any way, provided that
you do at least ONE of the following:
a) place your modifications in the Public Domain or otherwise
make them Freely Available, such as by posting said
modifications to Usenet or an equivalent medium, or by allowing
the author to include your modifications in the software.
b) use the modified software only within your corporation or
organization.
c) give non-standard binaries non-standard names, with
instructions on where to get the original software distribution.
d) make other distribution arrangements with the author.
3. You may distribute the software in object code or binary form,
provided that you do at least ONE of the following:
a) distribute the binaries and library files of the software,
together with instructions (in the manual page or equivalent)
on where to get the original distribution.
b) accompany the distribution with the machine-readable source of
the software.
c) give non-standard binaries non-standard names, with
instructions on where to get the original software distribution.
d) make other distribution arrangements with the author.
4. You may modify and include the part of the software into any other
software (possibly commercial). But some files in the distribution
are not written by the author, so that they are not under these terms.
For the list of those files and their copying conditions, see the
file LEGAL.
5. The scripts and library files supplied as input to or produced as
output from the software do not automatically fall under the
copyright of the software, but belong to whomever generated them,
and may be sold commercially, and may be aggregated with this
software.
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.
bio-2.0.6/Gemfile 0000644 0001750 0001751 00000000140 14764611416 013117 0 ustar nilesh nilesh source "https://rubygems.org"
gem "matrix"
gem "rexml"
gem "rake"
gem "rdoc"
gem "test-unit"
bio-2.0.6/RELEASE_NOTES.rdoc 0000644 0001750 0001751 00000022562 14764611416 014541 0 ustar nilesh nilesh = BioRuby 2.0.6 RELEASE NOTES
Some fixes have been made in BioRuby 2.0.6 after the release of 2.0.5.
== Support for Ruby 3.4
* Suppress warining: "literal string will be frozen in the future"
which is shown in Ruby 3.4.
* For the purpose, "frozen_string_literal: true" magic comment is added
in the head of many files.
* Suppress warning: "URI::RFC3986_PARSER.unescape is obsolete.
Use URI::RFC2396_PARSER.unescape explicitly." which is shown in Ruby 3.4.
== Fixes
* Bio::PROSITE.pa2re should not modify argument string object.
* This bug is found for suppressing warning in Ruby 3.4.
* Fix test failure of KEGG tests due to data changes of the KEGG databases.
== Documentation updates
* Add Tutorial.md and Tutorial_ja.md that are converted from Tutorial.rd
and Tutorial.rd.ja.
* Only the file format changes have been made. They may contain many
outdated parts. Content updates remain a future task.
= BioRuby 2.0.5 RELEASE NOTES
Some fixes have been made in BioRuby 2.0.5 after the release of 2.0.4.
== Fixes
* Bio::UniProtKB#ft: Additional bug fixes for parsing FT lines
since UniProt release 2019_11.
(https://github.com/bioruby/bioruby/issues/147 )
* Bio::UniProtKB#oh: Fixed parse error when parsing 1A_AMVLE (P03589).
* Bio::Blast::Remote::GenomeNet: Fixed errors caused by the change of
GenomeNet BLAST webpage's internal URL (which is unofficial
internal URL and may subject to be changed without notices).
* Bio::PTS1: Fixed errors due to the PTS1 website URL change
from http to https.
== Changes for developers
=== Changes of CI (Continuous Integration)
* Started using GitHub Actions for CI.
* Stopped using Travis-CI for CI.
* Fixed AppVeyor CI errors.
=== Changes of Gemfile and related files
* Gemfile: Added "matrix" and "rexml" gems that are excluded from
the default gems in recent Ruby versions.
* gemfiles/*: Removed because of the CI changes.
=== Others
* .gitignore is added.
= BioRuby 2.0.4 RELEASE NOTES
Some fixes have been made in BioRuby 2.0.4 after the release of 2.0.3.
== Fixes
* Bio::UniProtKB#ft: Supports text format change of FT lines since
UniProt release 2019_11.
(https://github.com/bioruby/bioruby/issues/147 )
* Bio::UniProtKB#protein_name and #synonyms methods may raise error
after calling Bio::UniProtKB#de method.
= BioRuby 2.0.3 RELEASE NOTES
Some bug fixes have been made in BioRuby 2.0.3 after the release of 2.0.2.
== Bug fixes
* Fix Ruby 3.0.0 Bio::Sequence::* issue.
(https://github.com/bioruby/bioruby/issues/137 )
* Fix typo (https://github.com/bioruby/bioruby/pull/145 )
== Incompatible changes
=== Bio::Sequence::* incompatible changes since Ruby 3.0.0
Since Ruby 3.0.0, the following methods in Bio::Sequence::NA,
Bio::Sequence::AA, and Bio::Sequence::Generic return or yield
String instance, instead of the Bio::Sequence::* instance.
* dump
* scrub
For details about Ruby 3.0.0 incompatible changes, see
{News for Ruby 3.0.0}[https://github.com/ruby/ruby/blob/v3_0_0/NEWS.md].
= BioRuby 2.0.2 RELEASE NOTES
Some bugs fixes have been made in BioRuby 2.0.2 after the release of 2.0.1.
== Bug fixes
* Fix NameError in Bio::Sequence#output(:embl)
(https://github.com/bioruby/bioruby/issues/135 )
* Suppress warning: Gem::Specification#has_rdoc= is deprecated
(https://github.com/bioruby/bioruby/issues/138 )
* Fix misspelling URL in README.rdoc
== Known issues
A known issue about Ruby 3.0 is added to KNOWN_ISSUES.rdoc.
The issue will be fixed in the near future.
= BioRuby 2.0.1 RELEASE NOTES
Some bug fixes and improvements have been made to the BioRuby 2.0.1 after
the version 2.0.0 is released.
== Bug fixes
* Bio::GFF::GFF2::Record.parse did not return correct object.
== Improvement of sample scripts
The following scripts in the sample/ directiry are newly added.
* color_scheme_aa.rb: Example of Bio::ColorScheme for an amino acid sequence.
* fastq2html.rb: Visualization of FASTQ sequences, colored by quality scores.
* rev_comp.rb: Shows reverse-complement sequences of the given sequences.
The floowing scripts are modified to fix bug and/or to improve features.
* na2aa.rb: Completely rewritten to fix bug. Shows translated sequences.
* color_scheme_na.rb: Added support for various sequence formats.
=== CWL (Common Workflow Language) workflow files are added
CWL (Common Workflow Language) workflow files are added for some sample
scripts. The usage of each sample script will be clarified with the CWL
workflow files.
Two type of files are prepared for CWL workflow engine. *.cwl is a workflow
definition file for each sample script. *.testdata.yaml describes sample
input data for each CWL workflow.
In this version, cwl files for the 3 sample scripts are added.
* fastq2html.rb: fastq2html.cwl with fastq2html.testdata.yaml
* na2aa.rb: na2aa.cwl with na2aa.testdata.yaml
* rev_comp.rb: rev_comp.cwl with rev_comp.testdata.yaml
= BioRuby 2.0.0 RELEASE NOTES
A lot of changes have been made to the BioRuby 2.0.0 after the version 1.5.x
is released. This document describes important and/or incompatible changes
since the BioRuby 1.5.0 release.
For known problems, see KNOWN_ISSUES.rdoc.
== Features moved to separete gems
Some features are moved to separate gems because of reducing complexity
and/or to avoid external library dependency of BioRuby core.
=== BioRuby Shell is moved to "bio-shell"
BioRuby Shell is split to "bio-shell" gem.
=== Executable files are moved to "bio-executables"
To avoid unexpected loading of executable files by some Rails software,
all executable commands are moved to "bio-executables" gem
(except the "bioruby" command that is included in the above "bio-shell" gem).
=== Fast BLAST XML result parser by using Expat XML Parser is moved to "bio-blast-xmlparser"
Fast BLAST XML result parser by using Expat XML Parser is split to
"bio-blast-xmlparser" gem, because of external C library dependency.
Please install "bio-blast-xmlparser" gem if possible.
If it is installed, BioRuby automatically use it.
=== Bio::PhyloXML is moved to "bioruby-phyloxml"
Bio::PhyloXML is split to "bioruby-phyloxml" gem.
NOTE: Please uninstall "bio-phyloxml" gem, that have been created as a
preliminary trial of splitting a module in 2012 and have not been
maintained after that.
=== Bio::SQL is moved to "bio-biosql"
Bio::SQL is split to "bio-biosql" gem.
== New features and improvements
=== HTTPS is used to access NCBI web services
As you may know, NCBI announced that all HTTP resources will be switched
to HTTPS on September 30, 2016. To follow the transition, all URLs for
accessing NCBI E-utilities in BioRuby are changed to use HTTPS.
In BioRuby, the following classes/modules are affected.
* Bio::NCBI::REST and descending classes
* Bio::PubMed
In some rare cases (especially when building Ruby and/or OpenSSL by yourself
from source code), Ruby does not include SSL/TLS support, or Ruby fails to
detect SSL root certificates. In such cases, you may need to reinstall or
upgrade Ruby, OpenSSL (or alternatives), and/or SSL root certificates with
appropriate configuration options. Alternatively, installing binary packages
is generally a good idea.
=== KEGG::GENES#diseases and related methods are added
The following methods are added to KEGG::GENES, contributed by @kojix2.
* networks_as_strings
* diseases_as_strings
* diseases_as_hash
* diseases
* drug_targets_as_strings
=== Pre-calculated ambiguity codon tables in Bio::CodonTable
Pre-calculated ambiguity codon tables are added, contributed by
Tomoaki NISHIYAMA.
== Bug fixes
* Fixed a parser bug in Bio::Fasta::Report, FASTA output (-m 10) parser,
contributed by William Van Etten and Mark Wilkinson via GitHub.
* HTTPS is used to access GenomeNet BLAST web service, contributed
by @ramadis via GitHub.
* Bio::AAindex documentation fix, suggested by @kojix2 via GitHub.
* Suppress warning messages in Ruby 2.4 and later.
== Incompatible changes
=== Bio::Taxonomy is removed and merged to Bio::PhyloXML::Taxonomy
Bio::Taxonomy in lib/bio/db/phyloxml/phyloxml_elements.rb was written for
PhyloXML in 2009. It was intended to become general taxonomy data class in
BioRuby in these days. However, no efforts have been made to improve the
Bio::Taxonomy class, and it still remains to be a PhyloXML specific class.
Because Bio::PhyloXML is split as a different Gem (Biogem) package, we now
decide to remove Bio::Taxonomy and merge it to Bio::PhyloXML::Taxonomy.
In the codes using Bio::Taxonomy directly, changing Bio::Taxonomy to
Bio::PhyloXML::Taxonomy or adding the following monkey patch may be needed.
module Bio
unless defined? Taxonomy
Taxonomy = Bio::PhyloXML::Taxonomy
end
end
In the future, Bio::Taxonomy might be added as general taxonomy data class.
The new Bio::Taxonomy might be incompatible with the current Bio::Taxonmy.
=== Some features are moved to separete gems
Some features are split to separete gems and removed from this "bio" gem.
See the above "Features moved to separete gems" topics for details.
== Known issues
The following issues are added or updated. See KNOWN_ISSUES.rdoc for other
already known issues.
== Other important news
=== Ruby 1.8 is no longer supported
Ruby 1.8.x is no longer supported. Though unsupported, some components
may still run on Ruby 1.8.7. Please use Ruby 1.8.7 at your own risk
with this version of BioRuby.
=== Installation without RubyGems is no longer supported
Installation by using setup.rb without RubyGems is no longer supported,
and setup.rb is no longer included in BioRuby distribution.
bio-2.0.6/BSDL 0000644 0001750 0001751 00000002402 14764611416 012276 0 ustar nilesh nilesh Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
bio-2.0.6/Rakefile 0000644 0001750 0001751 00000017616 14764611416 013311 0 ustar nilesh nilesh #
# = Rakefile - helper of developement and packaging
#
# Copyright:: Copyright (C) 2009, 2012 Naohisa Goto
# License:: The Ruby License
#
require 'rubygems'
require 'erb'
require 'pathname'
require 'fileutils'
require 'tmpdir'
require 'rake/testtask'
require 'rake/packagetask'
begin
require 'rubygems/package_task'
rescue LoadError
# old RubyGems/Rake version
require 'rake/gempackagetask'
end
begin
require 'rdoc/task'
rescue LoadError
# old RDoc/Rake version
require 'rake/rdoctask'
end
# workaround for new module name
unless defined? Rake::GemPackageTask then
Rake::GemPackageTask = Gem::PackageTask
end
load "./lib/bio/version.rb"
BIO_VERSION_RB_LOADED = true
# Version string for tar.gz, tar.bz2, or zip archive.
# If nil, use the value in lib/bio.rb
# Note that gem version is always determined from bioruby.gemspec.erb.
version = ENV['BIORUBY_VERSION'] || Bio::BIORUBY_VERSION.join(".")
version = nil if version.to_s.empty?
extraversion = ENV['BIORUBY_EXTRA_VERSION'] || Bio::BIORUBY_EXTRA_VERSION
extraversion = nil if extraversion.to_s.empty?
BIORUBY_VERSION = version
BIORUBY_EXTRA_VERSION = extraversion
task :default => "see-env"
Rake::TestTask.new do |t|
t.test_files = FileList["test/{unit,functional}/**/test_*.rb"]
end
Rake::TestTask.new do |t|
t.name = :"test-all"
t.test_files = FileList["test/{unit,functional,network}/**/test_*.rb"]
end
Rake::TestTask.new do |t|
t.name = :"test-network"
t.test_files = FileList["test/network/**/test_*.rb"]
end
# files not included in gem but included in tar archive
tar_additional_files = []
GEM_SPEC_FILE = "bioruby.gemspec"
GEM_SPEC_TEMPLATE_FILE = "bioruby.gemspec.erb"
# gets gem spec string
current_gem_spec_string = File.read(GEM_SPEC_FILE) rescue nil
next_gem_spec_string = File.open(GEM_SPEC_TEMPLATE_FILE, "rb") do |f|
ERB.new(f.read).result
end
# gets gem spec object
current_spec = eval(current_gem_spec_string || '')
next_spec = eval(next_gem_spec_string)
spec = (current_spec || next_spec)
# adds notice of automatically generated file
next_gem_spec_string = "# This file is automatically generated from #{GEM_SPEC_TEMPLATE_FILE} and\n# should NOT be edited by hand.\n# \n" + next_gem_spec_string
# compares current gemspec file and newly generated gemspec string
if current_gem_spec_string &&
current_gem_spec_string != next_gem_spec_string then
#Rake::Task[GEM_SPEC_FILE].invoke
flag_update_gemspec = true
else
flag_update_gemspec = false
end
desc "Update gem spec file"
task :gemspec => GEM_SPEC_FILE
desc "Force update gem spec file"
task :regemspec do
#rm GEM_SPEC_FILE, :force => true
Rake::Task[GEM_SPEC_FILE].execute(nil)
end
desc "Update #{GEM_SPEC_FILE}"
file GEM_SPEC_FILE => [ GEM_SPEC_TEMPLATE_FILE, 'Rakefile',
'lib/bio/version.rb' ] do |t|
puts "creates #{GEM_SPEC_FILE}"
File.open(t.name, 'wb') do |w|
w.print next_gem_spec_string
end
end
task :package => [ GEM_SPEC_FILE ] do
Rake::Task[:regemspec].invoke if flag_update_gemspec
end
pkg_dir = "pkg"
tar_version = (BIORUBY_VERSION || spec.version) + BIORUBY_EXTRA_VERSION.to_s
tar_basename = "bioruby-#{tar_version}"
tar_filename = "#{tar_basename}.tar.gz"
tar_pkg_filepath = File.join(pkg_dir, tar_filename)
gem_filename = spec.full_name + ".gem"
gem_pkg_filepath = File.join(pkg_dir, gem_filename)
Rake::PackageTask.new("bioruby") do |pkg|
#pkg.package_dir = "./pkg"
pkg.need_tar_gz = true
pkg.package_files.import(spec.files)
pkg.package_files.include(*tar_additional_files)
pkg.version = tar_version
end
Rake::GemPackageTask.new(spec) do |pkg|
#pkg.package_dir = "./pkg"
end
Rake::RDocTask.new do |r|
r.rdoc_dir = "rdoc"
r.rdoc_files.include(*spec.extra_rdoc_files)
r.rdoc_files.import(spec.files.find_all {|x| /\Alib\/.+\.rb\z/ =~ x})
#r.rdoc_files.exclude /\.yaml\z"
opts = spec.rdoc_options.to_a.dup
if i = opts.index('--main') then
main = opts[i + 1]
opts.delete_at(i)
opts.delete_at(i)
else
main = 'README.rdoc'
end
r.main = main
r.options = opts
end
# Tutorial files
TUTORIAL_RD = 'doc/Tutorial.rd'
TUTORIAL_RD_JA = 'doc/Tutorial.rd.ja'
TUTORIAL_RD_HTML = TUTORIAL_RD + '.html'
TUTORIAL_RD_JA_HTML = TUTORIAL_RD_JA + '.html'
HTMLFILES_TUTORIAL = [ TUTORIAL_RD_HTML, TUTORIAL_RD_JA_HTML ]
# Formatting RD to html.
def rd2html(src, dst)
title = File.basename(src)
sh "rd2 -r rd/rd2html-lib.rb --with-css=bioruby.css --html-title=#{title} #{src} > #{dst}"
end
# Tutorial.rd to Tutorial.rd.html
file TUTORIAL_RD_HTML => TUTORIAL_RD do |t|
rd2html(t.prerequisites[0], t.name)
end
# Tutorial.rd.ja to Tutorial.html.ja
file TUTORIAL_RD_JA_HTML => TUTORIAL_RD_JA do |t|
rd2html(t.prerequisites[0], t.name)
end
desc "Update doc/Tutorial*.html"
task :tutorial2html => HTMLFILES_TUTORIAL
desc "Force update doc/Tutorial*.html"
task :retutorial2html do
# safe_unlink HTMLFILES_TUTORIAL
HTMLFILES_TUTORIAL.each do |x|
Rake::Task[x].execute(nil)
end
end
# ChangeLog
desc "Force update ChangeLog using git log"
task :rechangelog do
# The tag name in the command line should be changed
# after releasing new version, updating ChangeLog,
# and doing "git mv ChangeLog doc/ChangeLog-X.X.X".
sh "git log --stat --summary 1.5.0..HEAD > ChangeLog"
end
# define mktmpdir
if true then
# Note: arg is a subset of Dir.mktmpdir
def mktmpdir(prefix)
## prepare temporary directory for testing
top = Pathname.new(File.join(Dir.pwd, "tmp")).cleanpath.to_s
begin
Dir.mkdir(top)
rescue Errno::EEXIST
end
## prepare working directory
flag = false
dirname = nil
ret = nil
begin
10.times do |n|
# following 3 lines are copied from Ruby 1.9.3's tmpdir.rb and modified
t = Time.now.strftime("%Y%m%d")
path = "#{prefix}#{t}-#{$$}-#{rand(0x100000000).to_s(36)}"
path << "-#{n}" if n > 0
begin
dirname = File.join(top, path)
flag = Dir.mkdir(dirname)
break if flag
rescue SystemCallError
end
end
raise "Couldn't create a directory under #{tmp}." unless flag
ret = yield(dirname)
ensure
FileUtils.remove_entry_secure(dirname, true) if flag and dirname
end
ret
end #def mktmpdir
## Currently, Dir.mktmpdir isn't used Because of JRuby's behavior.
elsif Dir.respond_to?(:mktmpdir) then
def self.mktmpdir(*arg, &block)
Dir.mktmpdir(*arg, &block)
end
else
load "lib/bio/command.rb"
def mktmpdir(*arg, &block)
Bio::Command.mktmpdir(*arg, &block)
end
end
def chdir_with_message(dir)
$stderr.puts("chdir #{dir}")
Dir.chdir(dir)
end
# run in different directory
def work_in_another_directory
pwd = Dir.pwd
ret = false
mktmpdir("bioruby") do |dirname|
begin
chdir_with_message(dirname)
ret = yield(dirname)
ensure
chdir_with_message(pwd)
end
end
ret
end
desc "task specified with BIORUBY_RAKE_DEFAULT_TASK (default \"test\")"
task :"see-env" do
t = ENV["BIORUBY_RAKE_DEFAULT_TASK"]
if t then
Rake::Task[t].invoke
else
Rake::Task[:test].invoke
end
end
desc "test installed bioruby on system"
task :"installed-test" do
data_path = File.join(Dir.pwd, "test/data")
test_runner = File.join(Dir.pwd, "test/runner.rb")
data_path = Pathname.new(data_path).cleanpath.to_s
test_runner = Pathname.new(test_runner).cleanpath.to_s
ENV["BIORUBY_TEST_DATA"] = data_path
ENV["BIORUBY_TEST_LIB"] = ""
ENV["BIORUBY_TEST_GEM"] = nil
work_in_another_directory do |dirname|
ruby("-rbio", test_runner)
end
end
desc "test installed bioruby gem version #{spec.version.to_s}"
task :"gem-test" do
data_path = File.join(Dir.pwd, "test/data")
test_runner = File.join(Dir.pwd, "test/runner.rb")
data_path = Pathname.new(data_path).cleanpath.to_s
test_runner = Pathname.new(test_runner).cleanpath.to_s
ENV["BIORUBY_TEST_DATA"] = data_path
ENV["BIORUBY_TEST_LIB"] = nil
ENV["BIORUBY_TEST_GEM"] = spec.version.to_s
work_in_another_directory do |dirname|
ruby(test_runner)
end
end
bio-2.0.6/LGPL 0000644 0001750 0001751 00000063476 14764611416 012332 0 ustar nilesh nilesh GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
Copyright (C)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
bio-2.0.6/test/ 0000755 0001750 0001751 00000000000 14764611416 012610 5 ustar nilesh nilesh bio-2.0.6/test/unit/ 0000755 0001750 0001751 00000000000 14764611416 013567 5 ustar nilesh nilesh bio-2.0.6/test/unit/bio/ 0000755 0001750 0001751 00000000000 14764611416 014340 5 ustar nilesh nilesh bio-2.0.6/test/unit/bio/test_command.rb 0000644 0001750 0001751 00000026363 14764611416 017354 0 ustar nilesh nilesh #
# test/unit/bio/test_command.rb - Unit test for Bio::Command
#
# Copyright:: Copyright (C) 2005-2008
# Mitsuteru Nakao ,
# Naohisa Goto ,
# Toshiaki Katayama
# License:: The Ruby License
#
# $Id:$
#
# loading helper routine for testing bioruby
require 'pathname'
load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 2,
'bioruby_test_helper.rb')).cleanpath.to_s
# libraries needed for the tests
require 'test/unit'
require 'bio/command'
module Bio
class TestCommand < Test::Unit::TestCase
def windows_platform?
Bio::Command.module_eval { windows_platform? }
end
private :windows_platform?
def test_command_constants
assert(Bio::Command::UNSAFE_CHARS_UNIX)
assert(Bio::Command::QUOTE_CHARS_WINDOWS)
assert(Bio::Command::UNESCAPABLE_CHARS)
end
def test_escape_shell_windows
str = "bio_ruby.123@456:789"
assert_equal("bio_ruby.123@456:789",
Bio::Command.escape_shell_windows(str))
str = "bio\'\"r u\"b\\y123@456:789"
assert_equal("\"bio'\"\"r u\"\"b\\y123@456:789\"",
Bio::Command.escape_shell_windows(str))
end
def test_escape_shell_unix
str = "bio_ruby.123@456:789"
assert_equal("bio_ruby.123@456:789",
Bio::Command.escape_shell_unix(str))
str = "bio\'\"r u\"b\\y123@456:789"
assert_equal("bio\\'\\\"r\\ u\\\"b\\\\y123@456:789",
Bio::Command.escape_shell_unix(str))
end
def test_escape_shell
str = "bio_ruby.123@456:789"
assert_equal("bio_ruby.123@456:789",
Bio::Command.escape_shell(str))
str = "bio\'\"r u\"b\\y123@456:789"
if windows_platform?
# mswin32, bccwin32, mingw32, etc.
assert_equal("\"bio'\"\"r u\"\"b\\y123@456:789\"",
Bio::Command.escape_shell(str))
else
assert_equal("bio\\'\\\"r\\ u\\\"b\\\\y123@456:789",
Bio::Command.escape_shell(str))
end
end
def test_make_command_line
ary = [ "ruby",
"test.rb", "atgcatgc", "bio\'\"r u\"b\\y123@456:789" ]
if windows_platform?
# mswin32, bccwin32, mingw32, etc.
assert_equal("ruby" +
" test.rb atgcatgc" +
" \"bio'\"\"r u\"\"b\\y123@456:789\"",
Bio::Command.make_command_line(ary))
else
assert_equal("ruby" +
" test.rb atgcatgc" +
" bio\\'\\\"r\\ u\\\"b\\\\y123@456:789",
Bio::Command.make_command_line(ary))
end
end
def test_make_command_line_windows
ary = [ "C:\\Program Files\\Ruby\\bin\\ruby.exe",
"test.rb", "atgcatgc", "bio\'\"r u\"b\\y123@456:789" ]
assert_equal("\"C:\\Program Files\\Ruby\\bin\\ruby.exe\"" +
" test.rb atgcatgc" +
" \"bio'\"\"r u\"\"b\\y123@456:789\"",
Bio::Command.make_command_line_windows(ary))
end
def test_make_command_line_unix
ary = [ "/usr/local/bin/ruby",
"test.rb", "atgcatgc", "bio\'\"r u\"b\\y123@456:789" ]
assert_equal("/usr/local/bin/ruby" +
" test.rb atgcatgc" +
" bio\\'\\\"r\\ u\\\"b\\\\y123@456:789",
Bio::Command.make_command_line_unix(ary))
end
def test_safe_command_line_array
ary1 = [ 'test' ]
assert_equal([ [ 'test', 'test' ] ],
Bio::Command.safe_command_line_array(ary1))
ary1a = [ [ 'test/test1a', 'test' ] ]
assert_equal(ary1a,
Bio::Command.safe_command_line_array(ary1a))
end
def test_safe_command_line_array_passthrough
ary0 = []
assert_equal(ary0,
Bio::Command.safe_command_line_array(ary0))
ary2 = [ 'cmd', 'arg0' ]
assert_equal(ary2,
Bio::Command.safe_command_line_array(ary2))
ary2a = [ [ 'cmd', 'display name' ], 'arg0' ]
assert_equal(ary2a,
Bio::Command.safe_command_line_array(ary2a))
ary3 = [ 'cmd', 'arg0', 'arg1' ]
assert_equal(ary3,
Bio::Command.safe_command_line_array(ary3))
end
def test_make_cgi_params_by_hash_in_symbol
ary = [
"type1=bp",
"type2=bp",
"downstream=",
"upstream=",
"format=fasta",
"options=similarity",
"options=gene",
"action=export",
"_format=Text",
"output=txt",
"submit=Continue+%3E%3E",
"ab%3Dcd%26ef%3Dgh%23ij=pq%3D12%26rs%3D34%23tu",
]
hash = {
:type1 => 'bp',
:type2 => 'bp',
:downstream => '',
:upstream => '',
:format => 'fasta',
:options => ['similarity', 'gene'],
:action => 'export',
:_format => 'Text',
:output => 'txt',
:submit => 'Continue >>',
:"ab=cd&ef=gh#ij" => 'pq=12&rs=34#tu',
}
result = Bio::Command.make_cgi_params(hash)
ary.each do |str|
assert_match(Regexp.new(Regexp.escape(str)), result)
end
# round-trip test
result_hash = {}
CGI.parse(result).each do |k, v|
v = case v.size
when 0
''
when 1
v[0]
else
v
end
result_hash[k.intern] = v
end
assert_equal(hash, result_hash)
end
def test_make_cgi_params_by_hash_in_string
ary = [
"type1=bp",
"type2=bp",
"downstream=",
"upstream=",
"format=fasta",
"options=similarity",
"options=gene",
"action=export",
"_format=Text",
"output=txt",
"submit=Continue+%3E%3E",
"ab%3Dcd%26ef%3Dgh%23ij=pq%3D12%26rs%3D34%23tu",
]
hash = {
"type1" => 'bp',
"type2" => 'bp',
"downstream" => '',
"upstream" => '',
"format" => 'fasta',
"options" => ['similarity', 'gene'],
"action" => 'export',
"_format" => 'Text',
"output" => 'txt',
"submit" => 'Continue >>',
'ab=cd&ef=gh#ij' => 'pq=12&rs=34#tu',
}
result = Bio::Command.make_cgi_params(hash)
ary.each do |str|
assert_match(Regexp.new(Regexp.escape(str)), result)
end
# round-trip test
result_hash = {}
CGI.parse(result).each do |k, v|
v = case v.size
when 0
''
when 1
v[0]
else
v
end
result_hash[k] = v
end
assert_equal(hash, result_hash)
end
def test_make_cgi_params_by_array_of_array
ary = [
"type1=bp",
"type2=bp",
"downstream=",
"upstream=",
"format=fasta",
"options=similarity",
"options=gene",
"action=export",
"_format=Text",
"output=txt",
"submit=Continue+%3E%3E",
"ab%3Dcd%26ef%3Dgh%23ij=pq%3D12%26rs%3D34%23tu",
]
array_of_array = [
["type1", 'bp'],
["type2", 'bp'],
["downstream", ''],
["upstream", ''],
["format", 'fasta'],
["options", ['similarity', 'gene']],
["action", 'export'],
["_format", 'Text'],
["output", 'txt'],
["submit", 'Continue >>'],
[ 'ab=cd&ef=gh#ij', 'pq=12&rs=34#tu' ],
]
result = Bio::Command.make_cgi_params(array_of_array)
# When array of array, order is guaranteed.
assert_equal(ary.join('&'), result)
# round-trip test
result_array = []
CGI.parse(result).each do |k, v|
v = case v.size
when 0
''
when 1
v[0]
else
v
end
result_array.push([ k, v ])
end
assert_equal(array_of_array.sort, result_array.sort)
end
def test_make_cgi_params_by_array_of_hash
ary = [
"type1=bp",
"type2=bp",
"downstream=",
"upstream=",
"format=fasta",
"options=similarity",
"options=gene",
"action=export",
"_format=Text",
"output=txt",
"submit=Continue+%3E%3E",
"ab%3Dcd%26ef%3Dgh%23ij=pq%3D12%26rs%3D34%23tu",
]
array_of_hash = [
{"type1" => 'bp'},
{"type2" => 'bp'},
{"downstream" => ''},
{"upstream" => ''},
{"format" => 'fasta'},
{"options" => ['similarity', 'gene']},
{"action" => 'export'},
{"_format" => 'Text'},
{"output" => 'txt'},
{"submit" => 'Continue >>'},
{'ab=cd&ef=gh#ij' => 'pq=12&rs=34#tu'},
]
result = Bio::Command.make_cgi_params(array_of_hash)
# When array of hash, order is guaranteed.
assert_equal(ary.join('&'), result)
# round-trip test
result_array = []
CGI.parse(result).each do |k, v|
v = case v.size
when 0
''
when 1
v[0]
else
v
end
result_array.push({ k => v })
end
assert_equal(array_of_hash.sort { |x,y| x.keys[0] <=> y.keys[0] },
result_array.sort { |x,y| x.keys[0] <=> y.keys[0] })
end
def test_make_cgi_params_by_array_of_string
str = "type1=bp&type2=bp&downstream=&upstream=&format=fasta&options=similarity&options=gene&action=export&_format=Text&output=txt&submit=Continue+%3E%3E&ab=cd%26ef%3Dgh%23ij%3Dpq%3D12%26rs%3D34%23tu"
array_of_string = [
"type1=bp",
"type2=bp",
"downstream=",
"upstream=",
"format=fasta",
"options=similarity",
"options=gene",
"action=export",
"_format=Text",
"output=txt",
"submit=Continue >>",
# In the following case, 'ab' is regarded as
# the form key, and rest of the string is
# regarded as the value.
'ab=cd&ef=gh#ij=pq=12&rs=34#tu',
]
result = Bio::Command.make_cgi_params(array_of_string)
assert_equal(str, result)
end
def test_make_cgi_params_by_string
##Before BioRuby 1.4.3.0001, only URI escaping was performed.
#string = "type1=bp&type2=bp&downstream=&upstream=&format=fasta&options=similarity&options=gene&action=export&_format=Text&output=txt&submit=Continue%20%3E%3E"
query = " type1=bp&type2=bp&downstream=&upstream=&format=fasta&options=similarity&options=gene&action=export&_format=Text&output=txt&submit=Continue >> "
assert_raise(TypeError) {
Bio::Command.make_cgi_params(query)
}
end
end
end
bio-2.0.6/test/unit/bio/test_reference.rb 0000644 0001750 0001751 00000020172 14764611416 017664 0 ustar nilesh nilesh #
# = test/unit/bio/test_reference.rb - Unit test for Bio::Reference
#
# Copyright:: Copyright (C) 2006
# Mitsuteru C. Nakao
# License:: The Ruby License
#
# $Id:$
#
# loading helper routine for testing bioruby
require 'pathname'
load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 2,
'bioruby_test_helper.rb')).cleanpath.to_s
# libraries needed for the tests
require 'test/unit'
require 'bio/reference'
require 'bio/compat/references'
module Bio
class TestReference < Test::Unit::TestCase
def setup
hash = {'authors' => [ "Hoge, J.P.", "Fuga, F.B." ], 'title' => "Title of the study.",
'journal' => "Theor. J. Hoge", 'volume' => 12, 'issue' => 3, 'pages' => "123-145",
'year' => 2001, 'pubmed' => 12345678, 'medline' => 98765432, 'abstract' => "Hoge fuga. hoge fuga.",
'url' => "http://example.com", 'mesh' => ['Hoge'], 'affiliations' => ['Tokyo']}
@obj = Bio::Reference.new(hash)
end
def test_authors
ary = [ "Hoge, J.P.", "Fuga, F.B." ]
assert_equal(ary, @obj.authors)
end
def test_journal
str = 'Theor. J. Hoge'
assert_equal(str, @obj.journal)
end
def test_volume
str = 12
assert_equal(str, @obj.volume)
end
def test_issue
str = 3
assert_equal(str, @obj.issue)
end
def test_pages
str = '123-145'
assert_equal(str, @obj.pages)
end
def test_year
str = 2001
assert_equal(str, @obj.year)
end
def test_pubmed
str = 12345678
assert_equal(str, @obj.pubmed)
end
def test_abstract
str = 'Hoge fuga. hoge fuga.'
assert_equal(str, @obj.abstract)
end
def test_url
str = 'http://example.com'
assert_equal(str, @obj.url)
end
def test_mesh
str = ['Hoge']
assert_equal(str, @obj.mesh)
end
def test_affiliations
str = ['Tokyo']
assert_equal(str, @obj.affiliations)
end
def test_pubmed_url
assert_equal("http://www.ncbi.nlm.nih.gov/pubmed/12345678",
@obj.pubmed_url)
end
def test_format_general
str = 'Hoge, J.P., Fuga, F.B. (2001). "Title of the study." Theor. J. Hoge 12:123-145.'
assert_equal(str, @obj.format)
assert_equal(str, @obj.format('general'))
assert_equal(str, @obj.general)
end
def test_format_endnote
str = "%0 Journal Article\n%A Hoge, J.P.\n%A Fuga, F.B.\n%D 2001\n%T Title of the study.\n%J Theor. J. Hoge\n%V 12\n%N 3\n%P 123-145\n%M 12345678\n%U http://example.com\n%X Hoge fuga. hoge fuga.\n%K Hoge\n%+ Tokyo"
assert_equal(str, @obj.format('endnote'))
assert_equal(str, @obj.endnote)
end
def test_format_bibitem
str = "\\bibitem{PMID:12345678}\nHoge, J.P., Fuga, F.B.\nTitle of the study.,\n{\\em Theor. J. Hoge}, 12(3):123--145, 2001."
assert_equal(str, @obj.format('bibitem'))
assert_equal(str, @obj.bibitem)
end
def test_format_bibtex
str =<<__END__
@article{PMID:12345678,
author = {Hoge, J.P. and Fuga, F.B.},
title = {Title of the study.},
journal = {Theor. J. Hoge},
year = {2001},
volume = {12},
number = {3},
pages = {123--145},
url = {http://example.com},
}
__END__
assert_equal(str, @obj.format('bibtex'))
assert_equal(str, @obj.bibtex)
end
def test_format_bibtex_with_arguments
str =<<__END__
@inproceedings{YourArticle,
author = {Hoge, J.P. and Fuga, F.B.},
title = {Title of the study.},
year = {2001},
volume = {12},
number = {3},
pages = {123--145},
booktitle = {Theor. J. Hoge},
month = {December},
}
__END__
assert_equal(str, @obj.format('bibtex', 'inproceedings', 'YourArticle',
{ 'journal' => false,
'url' => false,
'booktitle' => @obj.journal,
'month' => 'December'}))
assert_equal(str, @obj.bibtex('inproceedings', 'YourArticle',
{ 'journal' => false,
'url' => false,
'booktitle' => @obj.journal,
'month' => 'December'}))
end
def test_format_rd
str = "== Title of the study.\n\n* Hoge, J.P. and Fuga, F.B.\n\n* Theor. J. Hoge 2001 12:123-145 [PMID:12345678]\n\nHoge fuga. hoge fuga."
assert_equal(str, @obj.format('rd'))
assert_equal(str, @obj.rd)
end
def test_format_nature
str = 'Hoge, J.P. & Fuga, F.B. Title of the study. Theor. J. Hoge 12, 123-145 (2001).'
assert_equal(str, @obj.format('Nature'))
assert_equal(str, @obj.format('nature'))
assert_equal(str, @obj.nature)
end
def test_format_science
str = 'J.P. Hoge, F.B. Fuga, Theor. J. Hoge 12 123 (2001).'
assert_equal(str, @obj.format('Science'))
assert_equal(str, @obj.format('science'))
assert_equal(str, @obj.science)
end
def test_format_genome_biol
str = 'Hoge JP, Fuga FB: Title of the study. Theor J Hoge 2001, 12:123-145.'
assert_equal(str, @obj.format('genome biol'))
assert_equal(str, @obj.genome_biol)
end
def test_format_genome_res
str = "Hoge, J.P. and Fuga, F.B. 2001.\n Title of the study. Theor. J. Hoge 12: 123-145."
assert_equal(str, @obj.format('genome res'))
assert_equal(str, @obj.genome_res)
end
def test_format_nar
str = 'Hoge, J.P. and Fuga, F.B. (2001) Title of the study. Theor. J. Hoge, 12, 123-145.'
assert_equal(str, @obj.format('nar'))
assert_equal(str, @obj.nar)
end
def test_format_current
str = 'Hoge JP, Fuga FB: Title of the study. Theor J Hoge 2001, 12:123-145.'
assert_equal(str, @obj.format('current biology'))
end
def test_format_trends
str = 'Hoge, J.P. and Fuga, F.B. (2001) Title of the study. Theor. J. Hoge 12, 123-145'
assert_equal(str, @obj.trends)
end
def test_format_cell
str = 'Hoge, J.P. and Fuga, F.B. (2001). Title of the study. Theor. J. Hoge 12, 123-145.'
assert_equal(str, @obj.format('cell'))
end
end
class TestReference_noURL < Test::Unit::TestCase
def setup
hash = {
'authors' => [ "Hoge, J.P.", "Fuga, F.B." ],
'title' => "Title of the study.",
'journal' => "Theor. J. Hoge",
'volume' => 12,
'issue' => 3,
'pages' => "123-145",
'year' => 2001,
'pubmed' => 12345678,
'medline' => 98765432,
'abstract' => "Hoge fuga. hoge fuga.",
'mesh' => ['Hoge'],
'affiliations' => ['Tokyo']
}
@obj = Bio::Reference.new(hash)
end
def test_url
assert_equal(nil, @obj.url)
end
def test_format_endnote
str = "%0 Journal Article\n%A Hoge, J.P.\n%A Fuga, F.B.\n%D 2001\n%T Title of the study.\n%J Theor. J. Hoge\n%V 12\n%N 3\n%P 123-145\n%M 12345678\n%U http://www.ncbi.nlm.nih.gov/pubmed/12345678\n%X Hoge fuga. hoge fuga.\n%K Hoge\n%+ Tokyo"
assert_equal(str, @obj.format('endnote'))
assert_equal(str, @obj.endnote)
end
end #class TestReference_noURL
class TestReferences < Test::Unit::TestCase
class NullStderr
def initialize
@log = []
end
def write(*arg)
#p arg
@log.push([ :write, *arg ])
nil
end
def method_missing(*arg)
#p arg
@log.push arg
nil
end
end #class NullStderr
def setup
# To suppress warning messages, $stderr is replaced by dummy object.
@stderr_orig = $stderr
$stderr = NullStderr.new
hash = {}
ary = [Bio::Reference.new(hash),
Bio::Reference.new(hash)]
@obj = Bio::References.new(ary)
end
def teardown
# bring back $stderr
$stderr = @stderr_orig
end
def test_append
hash = {}
ref = Bio::Reference.new(hash)
assert(@obj.append(ref))
end
def test_each
@obj.each do |ref|
assert(ref)
end
end
end
end
bio-2.0.6/test/unit/bio/test_tree.rb 0000644 0001750 0001751 00000067443 14764611416 016701 0 ustar nilesh nilesh #
# = test/bio/test_tree.rb - unit test for Bio::Tree
#
# Copyright:: Copyright (C) 2006, 2010
# Naohisa Goto
# Copyright (C) 2010 Kazuhiro Hayashi
# License:: The Ruby License
#
# $Id:$
#
# loading helper routine for testing bioruby
require 'pathname'
load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 2,
'bioruby_test_helper.rb')).cleanpath.to_s
# libraries needed for the tests
require 'test/unit'
require 'bio/tree'
module Bio
class TestTreeEdge < Test::Unit::TestCase
def setup
@obj = Bio::Tree::Edge.new(123.45)
end
def test_initialize
assert_nothing_raised { Bio::Tree::Edge.new }
assert_equal(1.23, Bio::Tree::Edge.new(1.23).distance)
assert_equal(12.3, Bio::Tree::Edge.new('12.3').distance)
end
def test_distance
assert_equal(123.45, @obj.distance)
end
def test_distance_string
assert_equal("123.45", @obj.distance_string)
end
def test_distance=()
@obj.distance = 678.9
assert_equal(678.9, @obj.distance)
assert_equal("678.9", @obj.distance_string)
@obj.distance = nil
assert_equal(nil, @obj.distance)
assert_equal(nil, @obj.distance_string)
end
def test_distance_string=()
@obj.distance_string = "678.9"
assert_equal(678.9, @obj.distance)
assert_equal("678.9", @obj.distance_string)
@obj.distance_string = nil
assert_equal(nil, @obj.distance)
assert_equal(nil, @obj.distance_string)
end
def test_inspect
assert_equal("", @obj.inspect)
end
def test_to_s
assert_equal("123.45", @obj.to_s)
end
end #class TestTreeEdge
class TestTreeNode < Test::Unit::TestCase
def setup
@obj = Bio::Tree::Node.new
end
def test_initialize
assert_nothing_raised { Bio::Tree::Node.new }
a = nil
assert_nothing_raised { a = Bio::Tree::Node.new('mouse') }
assert_equal('mouse', a.name)
end
def test_name
assert_equal(nil, @obj.name)
@obj.name = 'human'
assert_equal('human', @obj.name)
end
def test_bootstrap
assert_equal(nil, @obj.bootstrap)
end
def test_bootstrap_string
assert_equal(nil, @obj.bootstrap_string)
end
def test_bootstrap=()
@obj.bootstrap = 98
assert_equal(98, @obj.bootstrap)
assert_equal('98', @obj.bootstrap_string)
@obj.bootstrap = nil
assert_equal(nil, @obj.bootstrap)
assert_equal(nil, @obj.bootstrap_string)
end
def test_bootstrap_string=()
@obj.bootstrap_string = '98'
assert_equal(98, @obj.bootstrap)
assert_equal('98', @obj.bootstrap_string)
@obj.bootstrap_string = '99.98'
assert_equal(99.98, @obj.bootstrap)
assert_equal('99.98', @obj.bootstrap_string)
@obj.bootstrap = nil
assert_equal(nil, @obj.bootstrap)
assert_equal(nil, @obj.bootstrap_string)
end
def test_inspect
@obj.name = 'human'
assert_equal('(Node:"human")', @obj.inspect)
@obj.bootstrap = 99.98
assert_equal('(Node:"human" bootstrap=99.98)', @obj.inspect)
end
def test_to_s
@obj.name = 'human'
assert_equal('human', @obj.to_s)
end
end #class TestTreeNode
class TestTree < Test::Unit::TestCase
def setup
@tree = Bio::Tree.new
end
def test_get_edge_distance
edge = Bio::Tree::Edge.new
assert_equal(nil, @tree.get_edge_distance(edge))
edge = Bio::Tree::Edge.new(12.34)
assert_equal(12.34, @tree.get_edge_distance(edge))
assert_equal(12.34, @tree.get_edge_distance(12.34))
end
def test_get_edge_distance_string
edge = Bio::Tree::Edge.new
assert_equal(nil, @tree.get_edge_distance_string(edge))
edge = Bio::Tree::Edge.new(12.34)
assert_equal("12.34", @tree.get_edge_distance_string(edge))
assert_equal("12.34", @tree.get_edge_distance_string(12.34))
end
def test_get_node_name
node = Bio::Tree::Node.new
assert_equal(nil, @tree.get_node_name(node))
node.name = 'human'
assert_equal('human', @tree.get_node_name(node))
end
def test_initialize
assert_nothing_raised { Bio::Tree.new }
assert_nothing_raised { Bio::Tree.new(@tree) }
end
def test_root
assert_equal(nil, @tree.root)
end
def test_root=()
assert_equal(nil, @tree.root)
node = Bio::Tree::Node.new
@tree.root = node
assert_equal(node, @tree.root)
end
def test_options
assert_equal({}, @tree.options)
@tree.options[:bootstrap_style] = :traditional
assert_equal(:traditional, @tree.options[:bootstrap_style])
end
end #class TestTree
class TestTree2 < Test::Unit::TestCase
def setup
# Note that below data is NOT real. The distances are random.
@tree = Bio::Tree.new
@mouse = Bio::Tree::Node.new('mouse')
@rat = Bio::Tree::Node.new('rat')
@rodents = Bio::Tree::Node.new('rodents')
@human = Bio::Tree::Node.new('human')
@chimpanzee = Bio::Tree::Node.new('chimpanzee')
@primates = Bio::Tree::Node.new('primates')
@mammals = Bio::Tree::Node.new('mammals')
@nodes =
[ @mouse, @rat, @rodents, @human, @chimpanzee, @primates, @mammals ]
@edge_rodents_mouse = Bio::Tree::Edge.new(0.0968)
@edge_rodents_rat = Bio::Tree::Edge.new(0.1125)
@edge_mammals_rodents = Bio::Tree::Edge.new(0.2560)
@edge_primates_human = Bio::Tree::Edge.new(0.0386)
@edge_primates_chimpanzee = Bio::Tree::Edge.new(0.0503)
@edge_mammals_primates = Bio::Tree::Edge.new(0.2235)
@edges = [
[ @rodents, @mouse, @edge_rodents_mouse ],
[ @rodents, @rat, @edge_rodents_rat ],
[ @mammals, @rodents, @edge_mammals_rodents ],
[ @primates, @human, @edge_primates_human ],
[ @primates, @chimpanzee, @edge_primates_chimpanzee ],
[ @mammals, @primates, @edge_mammals_primates ]
]
@edges.each do |a|
@tree.add_edge(*a)
end
@by_id = Proc.new { |a, b| a.__id__ <=> b.__id__ }
end
def test_clear
assert_nothing_raised { @tree.clear }
assert_equal(0, @tree.number_of_nodes)
assert_equal(0, @tree.number_of_edges)
end
def test_nodes
nodes = @nodes.sort(&@by_id)
assert_equal(nodes, @tree.nodes.sort(&@by_id))
end
def test_number_of_nodes
assert_equal(7, @tree.number_of_nodes)
end
def test_each_node
@tree.each_node do |x|
assert_not_nil(@nodes.delete(x))
end
assert_equal(true, @nodes.empty?)
end
def test_each_edge
@tree.each_edge do |source, target, edge|
assert_not_nil(@edges.delete([ source, target, edge ]))
end
assert_equal(true, @edges.empty?)
end
def test_edges
edges = @edges.sort { |a, b| a[-1].distance <=> b[-1].distance }
assert_equal(edges,
@tree.edges.sort {
|a, b| a[-1].distance <=> b[-1].distance })
end
def test_number_of_edges
assert_equal(@edges.size, @tree.number_of_edges)
end
def test_adjacent_nodes
assert_equal([ @rodents ], @tree.adjacent_nodes(@mouse))
assert_equal([ @rodents ], @tree.adjacent_nodes(@rat))
assert_equal([ @primates ], @tree.adjacent_nodes(@human))
assert_equal([ @primates ], @tree.adjacent_nodes(@chimpanzee))
assert_equal([ @mouse, @rat, @mammals ].sort(&@by_id),
@tree.adjacent_nodes(@rodents).sort(&@by_id))
assert_equal([ @human, @chimpanzee, @mammals ].sort(&@by_id),
@tree.adjacent_nodes(@primates).sort(&@by_id))
assert_equal([ @rodents, @primates ].sort(&@by_id),
@tree.adjacent_nodes(@mammals).sort(&@by_id))
end
def test_adjacent_nodes_nonexistent
# test for not existed nodes
assert_equal([], @tree.adjacent_nodes(Bio::Tree::Node.new))
end
def test_out_edges
assert_equal([[ @mouse, @rodents, @edge_rodents_mouse ]],
@tree.out_edges(@mouse))
assert_equal([[ @rat, @rodents, @edge_rodents_rat ]],
@tree.out_edges(@rat))
assert_equal([[ @human, @primates, @edge_primates_human ]],
@tree.out_edges(@human))
assert_equal([[ @chimpanzee, @primates, @edge_primates_chimpanzee ]],
@tree.out_edges(@chimpanzee))
end
def test_out_edges_rodents
adjacents = [ @mouse, @rat, @mammals ]
edges = [ @edge_rodents_mouse, @edge_rodents_rat, @edge_mammals_rodents ]
@tree.out_edges(@rodents).each do |a|
assert_equal(@rodents, a[0])
assert_not_nil(i = adjacents.index(a[1]))
assert_equal(edges[i], a[2])
adjacents.delete_at(i)
edges.delete_at(i)
end
assert_equal(true, adjacents.empty?)
assert_equal(true, edges.empty?)
end
def test_out_edges_primates
adjacents = [ @human, @chimpanzee, @mammals ]
edges = [ @edge_primates_human, @edge_primates_chimpanzee,
@edge_mammals_primates ]
@tree.out_edges(@primates).each do |a|
assert_equal(@primates, a[0])
assert_not_nil(i = adjacents.index(a[1]))
assert_equal(edges[i], a[2])
adjacents.delete_at(i)
edges.delete_at(i)
end
assert_equal(true, adjacents.empty?)
assert_equal(true, edges.empty?)
end
def test_out_edges_mammals
adjacents = [ @rodents, @primates ]
edges = [ @edge_mammals_rodents, @edge_mammals_primates ]
@tree.out_edges(@mammals).each do |a|
assert_equal(@mammals, a[0])
assert_not_nil(i = adjacents.index(a[1]))
assert_equal(edges[i], a[2])
adjacents.delete_at(i)
edges.delete_at(i)
end
assert_equal(true, adjacents.empty?)
assert_equal(true, edges.empty?)
end
def test_out_edges_nonexistent
# test for not existed nodes
assert_equal([], @tree.out_edges(Bio::Tree::Node.new))
end
def test_each_out_edge
flag = nil
r = @tree.each_out_edge(@mouse) do |src, tgt, edge|
assert_equal(@mouse, src)
assert_equal(@rodents, tgt)
assert_equal(@edge_rodents_mouse, edge)
flag = true
end
assert_equal(@tree, r)
assert_equal(true, flag)
end
def test_each_out_edge_rat
flag = nil
r = @tree.each_out_edge(@rat) do |src, tgt, edge|
assert_equal(@rat, src)
assert_equal(@rodents, tgt)
assert_equal(@edge_rodents_rat, edge)
flag = true
end
assert_equal(@tree, r)
assert_equal(true, flag)
end
def test_each_out_edge_human
flag = nil
r = @tree.each_out_edge(@human) do |src, tgt, edge|
assert_equal(@human, src)
assert_equal(@primates, tgt)
assert_equal(@edge_primates_human, edge)
flag = true
end
assert_equal(@tree, r)
assert_equal(true, flag)
end
def test_each_out_edge_chimpanzee
flag = nil
r = @tree.each_out_edge(@chimpanzee) do |src, tgt, edge|
assert_equal(@chimpanzee, src)
assert_equal(@primates, tgt)
assert_equal(@edge_primates_chimpanzee, edge)
flag = true
end
assert_equal(@tree, r)
assert_equal(true, flag)
end
def test_each_out_edge_rodents
adjacents = [ @mouse, @rat, @mammals ]
edges = [ @edge_rodents_mouse, @edge_rodents_rat, @edge_mammals_rodents ]
@tree.each_out_edge(@rodents) do |src, tgt, edge|
assert_equal(@rodents, src)
assert_not_nil(i = adjacents.index(tgt))
assert_equal(edges[i], edge)
adjacents.delete_at(i)
edges.delete_at(i)
end
assert_equal(true, adjacents.empty?)
assert_equal(true, edges.empty?)
end
def test_each_out_edge_primates
adjacents = [ @human, @chimpanzee, @mammals ]
edges = [ @edge_primates_human, @edge_primates_chimpanzee,
@edge_mammals_primates ]
@tree.each_out_edge(@primates) do |src, tgt, edge|
assert_equal(@primates, src)
assert_not_nil(i = adjacents.index(tgt))
assert_equal(edges[i], edge)
adjacents.delete_at(i)
edges.delete_at(i)
end
assert_equal(true, adjacents.empty?)
assert_equal(true, edges.empty?)
end
def test_each_out_edge_mammals
adjacents = [ @rodents, @primates ]
edges = [ @edge_mammals_rodents, @edge_mammals_primates ]
@tree.each_out_edge(@mammals) do |src, tgt, edge|
assert_equal(@mammals, src)
assert_not_nil(i = adjacents.index(tgt))
assert_equal(edges[i], edge)
adjacents.delete_at(i)
edges.delete_at(i)
end
assert_equal(true, adjacents.empty?)
assert_equal(true, edges.empty?)
end
def test_each_out_edge_nonexistent
# test for not existed nodes
flag = nil
node = Bio::Tree::Node.new
r = @tree.each_out_edge(node) do |src, tgt, edge|
flag = true
end
assert_equal(@tree, r)
assert_equal(nil, flag)
end
def test_out_degree
assert_equal(1, @tree.out_degree(@mouse))
assert_equal(1, @tree.out_degree(@rat))
assert_equal(3, @tree.out_degree(@rodents))
assert_equal(1, @tree.out_degree(@human))
assert_equal(1, @tree.out_degree(@chimpanzee))
assert_equal(3, @tree.out_degree(@primates))
assert_equal(2, @tree.out_degree(@mammals))
end
def test_out_degree_nonexistent
assert_equal(0, @tree.out_degree(Bio::Tree::Node.new))
end
def test_get_edge
assert_not_nil(@tree.get_edge(@rodents, @mouse))
assert_not_nil(@tree.get_edge(@mouse, @rodents))
assert_equal(@edge_rodents_mouse, @tree.get_edge(@rodents, @mouse))
assert_equal(@edge_rodents_mouse, @tree.get_edge(@mouse, @rodents))
assert_not_nil(@tree.get_edge(@rodents, @rat))
assert_not_nil(@tree.get_edge(@rat, @rodents))
assert_equal(@edge_rodents_rat, @tree.get_edge(@rodents, @rat))
assert_equal(@edge_rodents_rat, @tree.get_edge(@rat, @rodents))
assert_not_nil(@tree.get_edge(@mammals, @rodents))
assert_not_nil(@tree.get_edge(@rodents, @mammals))
assert_equal(@edge_mammals_rodents, @tree.get_edge(@mammals, @rodents))
assert_equal(@edge_mammals_rodents, @tree.get_edge(@rodents, @mammals))
assert_not_nil(@tree.get_edge(@primates, @human))
assert_not_nil(@tree.get_edge(@human, @primates))
assert_equal(@edge_primates_human, @tree.get_edge(@primates, @human))
assert_equal(@edge_primates_human, @tree.get_edge(@human, @primates))
assert_not_nil(@tree.get_edge(@primates, @chimpanzee))
assert_not_nil(@tree.get_edge(@chimpanzee, @primates))
assert_equal(@edge_primates_chimpanzee, @tree.get_edge(@primates, @chimpanzee))
assert_equal(@edge_primates_chimpanzee, @tree.get_edge(@chimpanzee, @primates))
assert_not_nil(@tree.get_edge(@mammals, @primates))
assert_not_nil(@tree.get_edge(@primates, @mammals))
assert_equal(@edge_mammals_primates, @tree.get_edge(@mammals, @primates))
assert_equal(@edge_mammals_primates, @tree.get_edge(@primates, @mammals))
end
def test_get_edge_indirect
assert_nil(@tree.get_edge(@mouse, @rat))
assert_nil(@tree.get_edge(@human, @chimpanzee))
end
def test_get_edge_nonexistent
assert_nil(@tree.get_edge(@mouse, Bio::Tree::Node.new))
end
def test_get_node_by_name
assert_not_nil(@tree.get_node_by_name('mouse'))
assert_not_nil(@tree.get_node_by_name('rat'))
assert_not_nil(@tree.get_node_by_name('human'))
assert_not_nil(@tree.get_node_by_name('chimpanzee'))
assert_equal(@mouse, @tree.get_node_by_name('mouse'))
assert_equal(@rat, @tree.get_node_by_name('rat'))
assert_equal(@human, @tree.get_node_by_name('human'))
assert_equal(@chimpanzee, @tree.get_node_by_name('chimpanzee'))
end
def test_get_node_by_name_noexistent
assert_nil(@tree.get_node_by_name('frog'))
end
def test_add_edge
amphibian = Bio::Tree::Node.new('amphibian')
edge = Bio::Tree::Edge.new(0.3123)
assert_equal(edge, @tree.add_edge(@mammals, amphibian, edge))
frog = Bio::Tree::Node.new('frog')
newt = Bio::Tree::Node.new('newt')
assert_instance_of(Bio::Tree::Edge, @tree.add_edge(frog, newt))
end
def test_add_node
frog = Bio::Tree::Node.new('frog')
# the node does not exist
assert_nil(@tree.get_node_by_name('frog'))
assert_equal(false, @tree.include?(frog))
# add node
assert_equal(@tree, @tree.add_node(frog))
# the node exists
assert_equal(frog, @tree.get_node_by_name('frog'))
assert_equal(true, @tree.include?(frog))
end
def test_include?
assert_equal(true, @tree.include?(@mouse))
assert_equal(true, @tree.include?(@rat))
assert_equal(true, @tree.include?(@rodents))
assert_equal(true, @tree.include?(@human))
assert_equal(true, @tree.include?(@chimpanzee))
assert_equal(true, @tree.include?(@primates))
assert_equal(true, @tree.include?(@mammals))
end
def test_include_nonexistent
assert_equal(false, @tree.include?(Bio::Tree::Node.new))
end
def test_clear_node
assert_equal(2, @tree.out_degree(@mammals))
# clear node
assert_equal(@tree, @tree.clear_node(@mammals))
# checks
assert_equal(true, @tree.include?(@mammals))
assert_equal(0, @tree.out_degree(@mammals))
assert_equal(2, @tree.out_degree(@rodents))
assert_equal(2, @tree.out_degree(@primates))
end
def test_clear_node_nonexistent
assert_raise(IndexError) { @tree.clear_node(Bio::Tree::Node.new) }
end
def test_remove_node
assert_equal(2, @tree.out_degree(@mammals))
# remove node
assert_equal(@tree, @tree.remove_node(@mammals))
# checks
assert_equal(false, @tree.include?(@mammals))
assert_equal(0, @tree.out_degree(@mammals))
assert_equal(2, @tree.out_degree(@rodents))
assert_equal(2, @tree.out_degree(@primates))
end
def test_remove_node_nonexistent
assert_raise(IndexError) { @tree.remove_node(Bio::Tree::Node.new) }
end
def test_remove_node_if
assert_equal(@tree, @tree.remove_node_if { |node| node == @mouse })
assert_equal(false, @tree.include?(@mouse))
end
def test_remove_node_if_false
ary = []
assert_equal(@tree, @tree.remove_node_if { |node| ary << node; false })
nodes = @nodes.sort(&@by_id)
assert_equal(nodes, ary.sort(&@by_id))
assert_equal(nodes, @tree.nodes.sort(&@by_id))
end
def test_remove_edge
assert_not_nil(@tree.get_edge(@mouse, @rodents))
assert_equal(@tree, @tree.remove_edge(@mouse, @rodents))
assert_nil(@tree.get_edge(@mouse, @rodents))
end
def test_remove_edge_nonexistent
assert_raise(IndexError) { @tree.remove_edge(@mouse, @rat) }
end
def test_remove_edge_if
ret = nil
assert_nothing_raised {
ret = @tree.remove_edge_if do |source, target, edge|
[ source.name, target.name ].sort == [ 'mouse', 'rodents' ]
end
}
assert_equal(@tree, ret)
assert_nil(@tree.get_edge(@mouse, @rodents))
end
def test_remove_edge_if_nothing_removed
ret = nil
by_id_2 = Proc.new { |x,y| x[2].__id__ <=> y[2].__id__ }
orig_edges = @tree.edges.sort(&by_id_2)
assert_nothing_raised {
ret = @tree.remove_node_if { |edge| false }
}
assert_equal(@tree, ret)
assert_equal(orig_edges, @tree.edges.sort(&by_id_2))
end
def test_collect_node!
ret = nil
newmouse = Bio::Tree::Node.new('MOUSE')
newhuman = Bio::Tree::Node.new('HUMAN')
assert_nothing_raised {
ret = @tree.collect_node! do |node|
case node.name
when 'mouse'
newmouse
when 'human'
newhuman
else
node
end
end
}
assert_equal(@tree, ret)
assert(@tree.include?(newmouse))
assert(!@tree.include?(@mouse))
assert(@tree.include?(newhuman))
assert(!@tree.include?(@human))
nodes = [ newmouse, @rat, @rodents, newhuman,
@chimpanzee, @primates, @mammals ].sort(&@by_id)
assert_equal(nodes, @tree.nodes.sort(&@by_id))
end
def test_collect_edge!
ret = nil
newedge_rodents_mouse = Bio::Tree::Edge.new(100.0)
newedge_primates_human = Bio::Tree::Edge.new(200.0)
assert_nothing_raised {
ret = @tree.collect_edge! do |source, target, edge|
case [ source.name, target.name ].sort
when [ 'mouse', 'rodents' ]
newedge_rodents_mouse
when [ 'human', 'primates' ]
newedge_primates_human
else
edge
end
end
}
assert_equal(@tree, ret)
assert_equal(newedge_rodents_mouse, @tree.get_edge(@mouse, @rodents))
assert_equal(newedge_primates_human, @tree.get_edge(@human, @primates))
expected = [ newedge_rodents_mouse,
@edge_rodents_rat,
@edge_mammals_rodents,
newedge_primates_human,
@edge_primates_chimpanzee,
@edge_mammals_primates ].sort(&@by_id)
assert_equal(expected, @tree.edges.collect { |x| x[-1] }.sort(&@by_id))
end
def test_get_edge_merged
edge1 = Bio::Tree::Edge.new(12.34)
edge2 = Bio::Tree::Edge.new(56.78)
merged_edge = @tree.get_edge_merged(edge1, edge2)
# struggle to avoid possible float problem
expected = 12.34 + 56.78
assert_equal(expected, merged_edge.distance)
end
def test_get_node_bootstrap
node = Bio::Tree::Node.new("test")
node.bootstrap = 1
assert_equal(1, @tree.get_node_bootstrap(node))
end
def test_get_node_bootstrap_string=
node = Bio::Tree::Node.new("test")
node.bootstrap_string = "0.75"
assert_equal(0.75, @tree.get_node_bootstrap(node))
end
def test_subtree
newtree = nil
assert_nothing_raised {
newtree = @tree.subtree([ @mouse, @rodents, @human ])
}
assert_equal(3, newtree.number_of_nodes)
assert_equal(1, newtree.number_of_edges)
nodes = [ @mouse, @rodents, @human ].sort(&@by_id)
assert_equal(nodes, newtree.nodes.sort(&@by_id))
edges = [ @edge_rodents_mouse ].sort(&@by_id)
assert_equal(edges, newtree.edges.collect { |x| x[-1] }.sort(&@by_id))
end
def test_subtree_with_all_paths
newtree = nil
assert_nothing_raised {
newtree = @tree.subtree_with_all_paths([ @mouse, @rodents, @human ])
}
assert_equal(5, newtree.number_of_nodes)
assert_equal(4, newtree.number_of_edges)
nodes = [ @mouse, @rodents, @mammals, @primates, @human ].sort(&@by_id)
assert_equal(nodes, newtree.nodes.sort(&@by_id))
edges = [ @edge_rodents_mouse,
@edge_mammals_rodents,
@edge_mammals_primates,
@edge_primates_human ].sort(&@by_id)
assert_equal(edges, newtree.edges.collect { |x| x[-1] }.sort(&@by_id))
end
def test_concat
tree2 = Bio::Tree.new
node1 = Bio::Tree::Node.new('node1')
node2 = Bio::Tree::Node.new('node2')
edge0 = Bio::Tree::Edge.new(0.1)
tree2.add_edge(node1, node2, edge0)
ret = nil
assert_nothing_raised {
ret = @tree.concat(tree2)
}
assert_equal(@tree, ret)
assert_equal(9, @tree.number_of_nodes)
assert_equal(7, @tree.number_of_edges)
nodes = (@nodes + [ node1, node2 ]).sort(&@by_id)
assert_equal(nodes, @tree.nodes.sort(&@by_id))
edges = (@edges.collect { |x| x[-1] } + [ edge0 ]).sort(&@by_id)
assert_equal(edges, @tree.edges.collect { |x| x[-1] }.sort(&@by_id))
end
def test_path
expected = [ @mouse, @rodents, @mammals, @primates, @human ]
assert_equal(expected, @tree.path(@mouse, @human))
end
#Passed cache_* methods because of internal methods
def test_parent
assert_equal(@rodents, @tree.parent(@mouse, @mammals))
end
def test_children
expected = [ @primates, @rodents ].sort(&@by_id)
assert_equal(expected,
@tree.children(@mammals, @mammals).sort(&@by_id))
end
def test_descendents
expected = [ @primates, @rodents, @human, @chimpanzee,
@mouse, @rat ].sort(&@by_id)
assert_equal(expected,
@tree.descendents(@mammals, @mammals).sort(&@by_id))
end
def test_leaves_noargs
expected = [ @chimpanzee, @human, @mouse, @rat ].sort(&@by_id)
@tree.root = @mammals
assert_equal(expected, @tree.leaves.sort(&@by_id))
end
def test_leaves
expected = [ @chimpanzee, @human, @mouse, @rat ].sort(&@by_id)
assert_equal(expected, @tree.leaves(@mammals, @mammals).sort(&@by_id))
end
def test_ancestors
expected = [ @rodents, @mammals ].sort(&@by_id)
assert_equal(expected, @tree.ancestors(@mouse, @mammals).sort(&@by_id))
end
def test_lowest_common_ancestor
assert_equal(@rodents,
@tree.lowest_common_ancestor(@mouse, @rat, @mammals))
end
def test_total_distance
assert_equal("0.7777", sprintf("%.4f", @tree.total_distance))
end
def test_distance_matrix
mat = @tree.distance_matrix([ @mouse, @rat, @human, @chimpanzee ])
assert_instance_of(Matrix, mat)
assert_equal([ "0.0000", "0.2093", "0.6149", "0.6266" ],
mat.row(0).map { |x| sprintf("%.4f", x) }.to_a)
assert_equal([ "0.2093", "0.0000", "0.6306", "0.6423" ],
mat.row(1).map { |x| sprintf("%.4f", x) }.to_a)
assert_equal([ "0.6149", "0.6306", "0.0000", "0.0889" ],
mat.row(2).map { |x| sprintf("%.4f", x) }.to_a)
assert_equal([ "0.6266", "0.6423", "0.0889", "0.0000" ],
mat.row(3).map { |x| sprintf("%.4f", x) }.to_a)
end
def test_adjacency_matrix
a =
[ [ 0, nil, @edge_rodents_mouse, nil, nil, nil, nil ],
[ nil, 0, @edge_rodents_rat, nil, nil, nil, nil ],
[ @edge_rodents_mouse, @edge_rodents_rat, 0, nil,
nil, nil, @edge_mammals_rodents ],
[ nil, nil, nil, 0, nil, @edge_primates_human, nil ],
[ nil, nil, nil, nil, 0, @edge_primates_chimpanzee, nil ],
[ nil, nil, nil, @edge_primates_human,
@edge_primates_chimpanzee, 0, @edge_mammals_primates ],
[ nil, nil, @edge_mammals_rodents, nil,
nil, @edge_mammals_primates, 0 ]
]
expected = Matrix.rows(a, false)
assert_equal(expected, @tree.adjacency_matrix(@nodes, nil, 0))
end
def test_adjacency_matrix_with_block
a =
[ [ 0, nil, "0.0968", nil, nil, nil, nil ],
[ nil, 0, "0.1125", nil, nil, nil, nil ],
[ "0.0968", "0.1125", 0, nil, nil, nil, "0.256" ],
[ nil, nil, nil, 0, nil, "0.0386", nil ],
[ nil, nil, nil, nil, 0, "0.0503", nil ],
[ nil, nil, nil, "0.0386", "0.0503", 0, "0.2235" ],
[ nil, nil, "0.256", nil, nil, "0.2235", 0 ]
]
expected = Matrix.rows(a, false)
assert_equal(expected,
@tree.adjacency_matrix(@nodes, nil, 0) { |src, tgt, edge|
sprintf("%.15g", edge.distance)
})
end
def test_remove_nonsense_nodes
assert_equal([ @mammals ], @tree.remove_nonsense_nodes)
end
def test_insert_node
node1 = Bio::Tree::Node.new('node1')
ret = nil
assert_nothing_raised {
ret = @tree.insert_node(@mouse, @rodents, node1, 0.0123)
}
assert_equal(@tree, ret)
distance_mouse_node1 = @tree.get_edge(@mouse, node1).distance
assert_equal("0.0123", sprintf("%.4f", distance_mouse_node1))
distance_node1_rodents = @tree.get_edge(node1, @rodents).distance
assert_equal("0.0845", sprintf("%.4f", distance_node1_rodents))
end
end #class TestTree2
end #module Bio
bio-2.0.6/test/unit/bio/test_map.rb 0000644 0001750 0001751 00000020145 14764611416 016503 0 ustar nilesh nilesh #
# = test/unit/bio/test_map.rb - Unit test for Bio::Map
#
# Copyright:: Copyright (C) 2006
# Jan Aerts
# License:: The Ruby License
#
# $Id:$
# loading helper routine for testing bioruby
require 'pathname'
load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 2,
'bioruby_test_helper.rb')).cleanpath.to_s
# libraries needed for the tests
require 'test/unit'
require 'bio/map'
module Bio
class TestMapSimple < Test::Unit::TestCase
def setup
@marker1 = Bio::Map::Marker.new('marker1')
@marker2 = Bio::Map::Marker.new('marker2')
@map1 = Bio::Map::SimpleMap.new('map1', 'some_type', 500, 'some_unit')
end
def test_attributes
assert_equal("marker1", @marker1.name)
assert_equal("marker2", @marker2.name)
assert_equal([], @marker1.mappings_as_marker)
assert_equal([], @marker2.mappings_as_marker)
assert_equal("map1", @map1.name)
assert_equal("some_unit", @map1.units)
assert_equal("some_type", @map1.type)
assert_equal([], @map1.mappings_as_map)
end
end
class TestMapping < Test::Unit::TestCase
def setup
@marker1 = Bio::Map::Marker.new('marker1')
@marker2 = Bio::Map::Marker.new('marker2')
@marker3 = Bio::Map::Marker.new('marker3')
@map1 = Bio::Map::SimpleMap.new('map1', 'some_type', 'some_unit')
@map2 = Bio::Map::SimpleMap.new('map2', 'some_other_type', 'some_other_unit')
end
def test_add_mapping_as_map
@map1.add_mapping_as_map(@marker2, '5')
assert_equal(1, @map1.mappings_as_map.length)
assert_equal(1, @marker2.mappings_as_marker.length)
assert_equal(0, @marker1.mappings_as_marker.length)
assert_kind_of(Bio::Locations, @map1.mappings_as_map[0].location)
assert_kind_of(Bio::Locations, @marker2.mappings_as_marker[0].location)
end
def test_add_mapping_as_marker
@marker1.add_mapping_as_marker(@map1, '5')
assert_equal(1, @map1.mappings_as_map.length, 'Mapping as map')
assert_equal(1, @marker1.mappings_as_marker.length, 'Mapping as marker')
assert_kind_of(Bio::Locations, @map1.mappings_as_map[0].location)
assert_kind_of(Bio::Locations, @marker1.mappings_as_marker[0].location)
end
def test_mapped_to?
@marker1.add_mapping_as_marker(@map1, '5')
assert_equal(true, @marker1.mapped_to?(@map1))
assert_equal(false, @marker3.mapped_to?(@map1))
end
def test_contains_marker?
@marker1.add_mapping_as_marker(@map1, '5')
assert_equal(true, @map1.contains_marker?(@marker1))
assert_equal(false, @map1.contains_marker?(@marker3))
end
def test_mappings_as_map_each
@map1.add_mapping_as_map(@marker1, '5')
@marker2.add_mapping_as_marker(@map1, '7')
mappings = 0
@map1.mappings_as_map.each do |mapping|
mappings += 1
end
assert_equal(2, mappings)
end
def test_mappings_as_marker_each
@map1.add_mapping_as_map(@marker1, '5')
@marker1.add_mapping_as_marker(@map1, '7')
mappings = 0
@marker1.mappings_as_marker.each do |mapping|
mappings += 1
end
assert_equal(2, mappings)
end
def test_multiple_mappings_between_same_marker_and_map
@map1.add_mapping_as_map(@marker1, '5')
@map1.add_mapping_as_map(@marker1, '37')
@marker1.add_mapping_as_marker(@map1, '53')
assert_equal(3, @marker1.mappings_as_marker.length)
@marker1.add_mapping_as_marker(@map1, '53') # This mapping should _not_ be added, because it's already defined.
assert_equal(3, @marker1.mappings_as_marker.length)
@map1.add_mapping_as_map(@marker1, '53')
assert_equal(3, @marker1.mappings_as_marker.length)
end
def test_positions_on
@map1.add_mapping_as_map(@marker1, '5')
assert_equal(1, @marker1.mappings_as_marker.length)
assert_equal('5', @marker1.positions_on(@map1).collect{|p| p.first.from.to_s}.join(',')) # FIXME: Test is not correct (uses Location.first)
@map1.add_mapping_as_map(@marker1, '37')
assert_equal('5,37', @marker1.positions_on(@map1).collect{|p| p.first.from.to_s}.sort{|a,b| a.to_i <=> b.to_i}.join(',')) # FIXME: Test is not correct (uses Location.first)
end
def test_mappings_on
@map1.add_mapping_as_map(@marker1, '5')
@map1.add_mapping_as_map(@marker1, '37')
assert_equal('5,37', @marker1.mappings_on(@map1).sort{|a,b| a.location[0].from.to_i <=> b.location[0].from.to_i}.collect{|m| m.location[0].from}.join(',')) # FIXME: Test is not correct (uses Location.first)
end
def test_mapping_location_comparison
@map1.add_mapping_as_map(@marker1, '5')
@map1.add_mapping_as_map(@marker2, '5')
@map1.add_mapping_as_map(@marker3, '17')
mapping1 = @marker1.mappings_on(@map1)[0]
mapping2 = @marker2.mappings_on(@map1)[0]
mapping3 = @marker3.mappings_on(@map1)[0]
assert_equal(true, mapping1 == mapping2)
assert_equal(false, mapping1 < mapping2)
assert_equal(false, mapping1 > mapping2)
assert_equal(false, mapping1 == mapping3)
assert_equal(true, mapping1 < mapping3)
assert_equal(false, mapping1 > mapping3)
@map2.add_mapping_as_map(@marker1, '23')
mapping4 = @marker1.mappings_on(@map2)[0]
assert_raise(RuntimeError) { mapping2 < mapping4 }
end
def test_raise_error_kind_of
marker_without_class = 'marker1'
assert_raise(RuntimeError) { @map1.add_mapping_as_map(marker_without_class, '5') }
assert_raise(RuntimeError) { @map1.contains_marker?(marker_without_class) }
map_without_class = 'map1'
assert_raise(RuntimeError) { @marker1.add_mapping_as_marker(map_without_class, '5') }
assert_raise(RuntimeError) { @marker1.mapped_to?(map_without_class) }
assert_raise(RuntimeError) { @marker1.positions_on(map_without_class) }
assert_raise(RuntimeError) { @marker1.mappings_on(map_without_class) }
@map1.add_mapping_as_map(@marker1, '5')
mapping1 = @marker1.mappings_on(@map1)[0]
assert_raise(RuntimeError) { mapping1 > 'some_mapping' }
end
end
class CloneToActLikeMap
include Bio::Map::ActsLikeMap
def initialize
@mappings_as_map = Array.new
end
attr_accessor :mappings_as_map
end
class TestActsLikeMap < Test::Unit::TestCase
def setup
@clone = CloneToActLikeMap.new
end
def test_mixin
assert_instance_of(CloneToActLikeMap, @clone)
assert_respond_to(@clone, 'contains_marker?')
assert_respond_to(@clone, 'add_mapping_as_map')
assert_equal(0, @clone.mappings_as_map.length)
end
end
class CloneToActLikeMarker
include Bio::Map::ActsLikeMarker
def initialize
@mappings_as_marker = Array.new
end
attr_accessor :mappings_as_marker
end
class TestActsLikeMarker < Test::Unit::TestCase
def setup
@clone = CloneToActLikeMarker.new
end
def test_mixin
assert_instance_of(CloneToActLikeMarker, @clone)
assert_respond_to(@clone, 'mapped_to?')
assert_respond_to(@clone, 'add_mapping_as_marker')
end
end
class CloneToActLikeMapAndMarker
include Bio::Map::ActsLikeMap
include Bio::Map::ActsLikeMarker
def initialize
@mappings_as_map = Array.new
@mappings_as_marker = Array.new
end
attr_accessor :mappings_as_map, :mappings_as_marker
end
class TestActsLikeMapAndMarker < Test::Unit::TestCase
def setup
@clone_a = CloneToActLikeMapAndMarker.new
@clone_b = CloneToActLikeMapAndMarker.new
@clone_a.add_mapping_as_map(@clone_b, nil)
end
def test_mixin
assert_instance_of(CloneToActLikeMapAndMarker, @clone_a)
assert_respond_to(@clone_a, 'contains_marker?')
assert_respond_to(@clone_a, 'add_mapping_as_map')
assert_respond_to(@clone_a, 'mapped_to?')
assert_respond_to(@clone_a, 'add_mapping_as_marker')
assert_equal(1, @clone_a.mappings_as_map.length)
assert_equal(0, @clone_a.mappings_as_marker.length)
assert_equal(0, @clone_b.mappings_as_map.length)
assert_equal(1, @clone_b.mappings_as_marker.length)
end
end
end
bio-2.0.6/test/unit/bio/test_sequence.rb 0000644 0001750 0001751 00000022461 14764611416 017541 0 ustar nilesh nilesh # frozen_string_literal: true
#
# test/unit/bio/test_sequence.rb - Unit test for Bio::Sequencce
#
# Copyright:: Copyright (C) 2004
# Moses Hohman
# 2006 Mitsuteru C. Nakao
# License:: The Ruby License
#
# $Id:$
#
# loading helper routine for testing bioruby
require 'pathname'
load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 2,
'bioruby_test_helper.rb')).cleanpath.to_s
# libraries needed for the tests
require 'test/unit'
require 'bio/sequence'
module Bio
class TestSequence < Test::Unit::TestCase
def setup
@na = Sequence::NA.new('atgcatgcatgcatgcaaaa')
@rna = Sequence::NA.new('augcaugcaugcaugcaaaa')
@aa = Sequence::AA.new('ACDEFGHIKLMNPQRSTVWYU')
end
# "main" method tests translated into unit tests
# Test Sequence::NA.new
def test_DNA_new_blank_sequence
sequence = Sequence::NA.new('')
assert_equal(0, sequence.size)
end
def test_DNA_new_sequence_downcases_symbols
string = 'atgcatgcATGCATGCAAAA'
sequence = Sequence::NA.new(string)
assert_equal(string.downcase, sequence.to_s)
end
def test_RNA_new_sequence
string = 'augcaugcaugcaugcaaaa'
sequence = Sequence::NA.new(string)
assert_equal(string, sequence.to_s)
end
# added
def test_DNA_new_sequence_removes_whitespace
sequence = Sequence::NA.new("a g\tc\nt\ra")
assert_equal("agcta", sequence)
end
# Test Sequence::AA.new
def test_AA_new_blank_sequence
sequence = Sequence::AA.new('')
assert_equal(0, sequence.size)
end
def test_AA_new_sequence_all_legal_symbols
string = 'ACDEFGHIKLMNPQRSTVWYU'
sequence = Sequence::AA.new(string)
assert_equal(string, sequence.to_s)
end
# added
def test_AA_new_sequence_upcases_symbols
string = 'upcase'
sequence = Sequence::AA.new(string)
assert_equal(string.upcase, sequence.to_s)
end
def test_AA_new_sequence_removes_whitespace
sequence = Sequence::AA.new("S T\tR\nI\rP")
assert_equal("STRIP", sequence)
end
# test element indexing
def test_element_reference_operator_with_two_arguments
sequence = Sequence::NA.new("atggggggtc")
assert_equal("gggggg", sequence[2,6])
end
# added
def test_element_reference_operator_with_one_argument
sequence = Sequence::NA.new("atggggggtc")
assert_equal(?t, sequence[1])
end
# Test Sequence#total
def test_total
sequence = Sequence::NA.new("catccagtccctggt")
assert_equal(2346, sequence.total({'a'=>1000, 'g'=>100, 't'=>10, 'c'=>1}))
end
# Test Sequence#composition
def test_dna_composition
sequence = Sequence::NA.new("aggtttcccc")
expected = {'a'=>1,'g'=>2,'t'=>3,'c'=>4}
expected.default = 0
assert_equal(expected, sequence.composition)
end
def test_rna_composition
sequence = Sequence::NA.new("agguuucccc")
expected = {'a'=>1,'g'=>2,'u'=>3,'c'=>4}
expected.default = 0
assert_equal(expected, sequence.composition)
end
# I don't get splicing
# Test Sequence::NA#complement
def test_dna_sequence_complement
assert_equal('ttttgcatgcatgcatgcat', @na.complement)
end
def test_rna_sequence_complement
assert_equal('uuuugcaugcaugcaugcau', @rna.complement)
end
def test_ambiguous_dna_sequence_complement
assert_equal("nwsbvhdkmyrcgta", Sequence::NA.new('tacgyrkmhdbvswn').complement)
end
def test_ambiguous_rna_sequence_complement
assert_equal("nwsbvhdkmyrcgua", Sequence::NA.new('uacgyrkmhdbvswn').complement)
end
# Test Sequence::NA#translate
def test_dna_sequence_translate
assert_equal("MHACMQ", @na.translate)
end
def test_rna_sequence_translate
assert_equal("MHACMQ", @rna.translate)
end
# Test Sequence::NA#gc_percent
def test_dna_gc_percent
assert_equal(40, @na.gc_percent)
end
def test_rna_gc_percent
assert_equal(40, @rna.gc_percent)
end
# Test Sequence::NA#illegal_bases
def test_valid_dna_sequence_illegal_bases
assert_equal([], @na.illegal_bases)
end
def test_invalid_nucleic_acid_illegal_bases
string = 'tacgyrkmhdbvswn'
expected = []
string[4..-1].each_byte { |val| expected << val.chr }
assert_equal(expected.sort, Sequence::NA.new(string).illegal_bases)
end
def test_invalid_nucleic_acid_illegal_bases_more
string = ('abcdefghijklmnopqrstuvwxyz-!%#$@')
expected = []
'bdefhijklmnopqrsvwxyz-!%#$@'.each_byte { |val| expected << val.chr }
assert_equal(expected.sort, Sequence::NA.new(string).illegal_bases)
end
# Test Sequence::NA#molecular_weight
def test_dna_molecular_weight
assert_in_delta(6174.3974, @na.molecular_weight, 1e-5)
end
def test_rna_molecular_weight
assert_in_delta(6438.2774, @rna.molecular_weight, 1e-5)
end
# Test Sequence::NA#to_re
def test_dna_to_re
assert_equal(/atgc[agr][tcy][acm][tgk][atgrwkd][atcwmyh][agcmrsv][tgcyskb][gcs][atw][atgcyrwskmbdhvn]/, Sequence::NA.new('atgcrymkdhvbswn').to_re)
end
def test_rna_to_re
assert_equal(/augc[agr][ucy][acm][ugk][augrwkd][aucwmyh][agcmrsv][ugcyskb][gcs][auw][augcyrwskmbdhvn]/, Sequence::NA.new('augcrymkdhvbswn').to_re)
end
# Test Sequence::NA#names
def test_nucleic_acid_names
# It is a Bio::NucleicAcid feature.
# assert_equal(["adenine", "cytosine", "guanine", "thymine", "uracil"], Sequence::NA.new('acgtu').names)
assert(Sequence::NA.new('acgtu').names)
end
# Test Sequence::NA#pikachu
def test_dna_pikachu
assert_equal("pika", Sequence::NA.new('atgc').pikachu)
end
def test_rna_pikachu
assert_equal("pika", Sequence::NA.new('augc').pikachu)
end
# Test Sequence::NA#randomize
def test_randomize_dna_retains_composition
assert_equal(@na.composition, @na.randomize.composition)
end
# this test has a neglibly small chance of failure
def test_two_consecutive_dna_randomizations_not_equal
assert_not_equal(@na.randomize, @na.randomize)
end
def test_randomize_dna_can_be_chained
assert_equal(@na.composition, @na.randomize.randomize.composition)
end
def test_randomize_dna_with_block
appended = String.new
@na.randomize {|x| appended << x}
assert_equal(@na.composition, Sequence::NA.new(appended).composition)
end
# Test Sequence::NA.randomize(counts)
def test_NA_randomize_with_counts
counts = {'a'=>10,'c'=>20,'g'=>30,'u'=>40}
counts.default = 0
assert_equal(counts, Sequence::NA.randomize(counts).composition)
end
def test_NA_randomize_with_counts_and_block
appended = String.new
counts = {'a'=>10,'c'=>20,'g'=>30,'u'=>40}
counts.default = 0
Sequence::NA.randomize(counts) {|x| appended << x}
assert_equal(counts, Sequence::NA.new(appended).composition)
end
# Test Sequence::AA#codes
def test_amino_acid_codes
assert_equal(["Ala", "Cys", "Asp", "Glu", "Phe", "Gly", "His", "Ile", "Lys",
"Leu", "Met", "Asn", "Pro", "Gln", "Arg", "Ser", "Thr", "Val", "Trp",
"Tyr", "Sec"], @aa.codes)
end
# Test Sequence::AA#names
def test_amino_acid_names
assert_equal(["alanine", "cysteine", "aspartic acid", "glutamic acid", "phenylalanine",
"glycine", "histidine", "isoleucine", "lysine", "leucine", "methionine",
"asparagine", "proline", "glutamine", "arginine", "serine", "threonine",
"valine", "tryptophan", "tyrosine", "selenocysteine"], @aa.names)
end
# Test Sequence::AA#molecular_weight
def test_amino_acid_molecular_weight
assert_in_delta(2395.725, @aa.subseq(1,20).molecular_weight, 0.0001)
end
#Test Sequence::AA#randomize
def test_amino_acid_randomize_has_same_composition
aaseq = 'MRVLKFGGTSVANAERFLRVADILESNARQGQVATVLSAPAKITNHLVAMIEKTISGQDA'
s = Sequence::AA.new(aaseq)
assert_equal(s.composition, s.randomize.composition)
end
# this test has a neglibly small chance of failure
def test_consecutive_amino_acid_randomizes_are_not_equal
aaseq = 'MRVLKFGGTSVANAERFLRVADILESNARQGQVATVLSAPAKITNHLVAMIEKTISGQDA'
s = Sequence::AA.new(aaseq)
assert_not_equal(s.randomize, s.randomize)
end
def test_amino_acid_randomize_can_be_chained
aaseq = 'MRVLKFGGTSVANAERFLRVADILESNARQGQVATVLSAPAKITNHLVAMIEKTISGQDA'
s = Sequence::AA.new(aaseq)
assert_equal(s.randomize.composition, s.randomize.randomize.composition)
end
end
class TestNATranslate < Test::Unit::TestCase
def setup
@obj = Bio::Sequence::NA.new("AAA")
end
def test_translate
assert_equal("K", @obj.translate)
end
def test_translate_1
assert_equal("K", @obj.translate(1))
end
def test_translate_2
assert_equal("", @obj.translate(2))
end
def test_translate_3
assert_equal("", @obj.translate(3))
end
def test_translate_4
assert_equal("F", @obj.translate(4))
end
def test_translate_5
assert_equal("", @obj.translate(5))
end
def test_translate_6
assert_equal("", @obj.translate(6))
end
end
end
bio-2.0.6/test/unit/bio/util/ 0000755 0001750 0001751 00000000000 14764611416 015315 5 ustar nilesh nilesh bio-2.0.6/test/unit/bio/util/test_restriction_enzyme.rb 0000644 0001750 0001751 00000002235 14764611416 022637 0 ustar nilesh nilesh #
# test/unit/bio/util/restriction_enzyme.rb - Unit test for Bio::RestrictionEnzyme
#
# Author:: Trevor Wennblom
# Copyright:: Copyright (c) 2005-2007 Midwinter Laboratories, LLC (http://midwinterlabs.com)
# License:: The Ruby License
#
# $Id:$
#
# loading helper routine for testing bioruby
require 'pathname'
load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 3,
'bioruby_test_helper.rb')).cleanpath.to_s
# libraries needed for the tests
require 'test/unit'
require 'bio/util/restriction_enzyme'
module Bio; module TestRestrictionEnzyme #:nodoc:
class TestRestrictionEnzyme < Test::Unit::TestCase #:nodoc:
def setup
@t = Bio::RestrictionEnzyme
end
def test_rebase
assert_equal(@t.rebase.respond_to?(:enzymes), true)
assert_not_nil @t.rebase['AarI']
assert_nil @t.rebase['blah']
end
def test_enzyme_name
assert_equal(@t.enzyme_name?('AarI'), true)
assert_equal(@t.enzyme_name?('atgc'), false)
assert_equal(@t.enzyme_name?('aari'), true)
assert_equal(@t.enzyme_name?('EcoRI'), true)
assert_equal(@t.enzyme_name?('EcoooRI'), false)
end
end
end; end
bio-2.0.6/test/unit/bio/util/test_sirna.rb 0000644 0001750 0001751 00000014232 14764611416 020017 0 ustar nilesh nilesh #
# test/unit/bio/util/test_sirna.rb - Unit test for Bio::SiRNA.
#
# Copyright:: Copyright (C) 2005 Mitsuteru C. Nakao
# License:: The Ruby License
#
# $Id:$
#
# loading helper routine for testing bioruby
require 'pathname'
load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 3,
'bioruby_test_helper.rb')).cleanpath.to_s
# libraries needed for the tests
require 'test/unit'
require 'bio/util/sirna'
module Bio
RANDOM_SEQ = "ctttcggtgcggacgtaaggagtattcctgtactaactaaatggagttaccaaggtaggaccacggtaaaatcgcgagcagcctcgatacaagcgttgtgctgaagcctatcgctgacctgaaggggggcgtaagcaaggcagcggttcaccttcatcagttctgctagaaatcacctagcaccccttatcatccgcgtcaggtccattacccttcccattatgtcggactcaattgaggtgcttgtgaacttatacttgaatccaaaacgtctactgtattggcgactaaaaagcacttgtggggagtcggcttgatcagcctccattagggccaggcactgaggatcatccagttaacgtcagattcaaggtctggctcttagcactcggagttgcac"
class TestSiRNANew < Test::Unit::TestCase
def test_new
naseq = Bio::Sequence::NA.new(RANDOM_SEQ)
assert(Bio::SiRNA.new(naseq))
assert(Bio::SiRNA.new(naseq, 21))
assert(Bio::SiRNA.new(naseq, 21, 60.0))
assert(Bio::SiRNA.new(naseq, 21, 60.0, 40.0))
assert_raise(ArgumentError) { Bio::SiRNA.new(naseq, 21, 60.0, 40.0, 10.0) }
end
end
class TestSiRNA < Test::Unit::TestCase
def setup
naseq = Bio::Sequence::NA.new(RANDOM_SEQ)
@obj = Bio::SiRNA.new(naseq)
end
def test_antisense_size
assert_equal(21, @obj.antisense_size)
end
def test_max_gc_percent
assert_equal(60.0, @obj.max_gc_percent)
end
def test_min_gc_percent
assert_equal(40.0, @obj.min_gc_percent)
end
def test_uitei?
target = "aaGaa"
assert_equal(false, @obj.uitei?(target))
target = "aaAaa"
assert_equal(false, @obj.uitei?(target))
target = "G" * 9
assert_equal(false, @obj.uitei?(target))
end
def test_reynolds?
target = "G" * 9
assert_equal(false, @obj.reynolds?(target))
target = "aaaaAaaaaaaUaaAaaaaaAaa"
assert_equal(8, @obj.reynolds?(target))
end
def test_uitei
assert(@obj.uitei)
end
def test_reynolds
assert(@obj.reynolds)
end
def test_design
assert(@obj.design)
end
def test_design_uitei
assert(@obj.design('uitei'))
end
def test_design_reynolds
assert(@obj.design('reynolds'))
end
end
class TestSiRNAPairNew < Test::Unit::TestCase
def test_new
target = ""
sense = ""
antisense = ""
start = 0
stop = 1
rule = 'rule'
gc_percent = 60.0
assert_raise(ArgumentError) { Bio::SiRNA::Pair.new(target, sense, antisense, start, stop, rule) }
assert(Bio::SiRNA::Pair.new(target, sense, antisense, start, stop, rule, gc_percent))
assert_raise(ArgumentError) { Bio::SiRNA::Pair.new(target, sense, antisense, start, stop, rule, gc_percent, "") }
end
end
class TestSiRNAPair < Test::Unit::TestCase
def setup
naseq = Bio::Sequence::NA.new(RANDOM_SEQ)
@obj = Bio::SiRNA.new(naseq).design.first
end
def test_target
assert_equal("uucggugcggacguaaggaguau", @obj.target)
end
def test_sense
assert_equal("cggugcggacguaaggaguau", @obj.sense)
end
def test_antisense
assert_equal("acuccuuacguccgcaccgaa", @obj.antisense)
end
def test_start
assert_equal(3, @obj.start)
end
def test_stop
assert_equal(26, @obj.stop)
end
def test_rule
assert_equal("uitei", @obj.rule)
end
def test_gc_percent
assert_equal(57.0, @obj.gc_percent)
end
def test_report
report =<