scbi_ace
DESCRIPTION:
scbi_ace is a ruby gem to read and parse ACE files containing contigs. It automatically indexes the input ace file to improve random access to contigs.
FEATURES/PROBLEMS:
-
Indexes ace files to provide fast random access to individual contigs
-
Parses the text representation in ACE format to Contigs and Reads objects
-
Generates the text representation
SYNOPSIS:
To get the text that defines a contig by its name:
require 'scbi_ace'
ace=IndexedAceFile.new(File.join(File.dirname(__FILE__),'test.ace'))
puts ace.read_contig('Contig1')
ace.close
To parse all contigs in an ACE file
require 'scbi_ace'
ace=AceParser.new(filename)
ace.each_contig do |contig|
puts contig.name
puts contig.reads.count
end
ace.close
To parse one contig in an ACE file
require 'scbi_ace'
ace=AceParser.new(filename)
contig=ace.read_contig('Contig1')
puts contig.name
puts contig.reads.count
# to get next contig (nil if none available)
contig2 = ace.next_contig
puts contig2.name
puts contig2.reads.count
ace.close
REQUIREMENTS:
None
INSTALL:
-
gem install scbi_ace
LICENSE:
(The MIT License)
Copyright © 2010 Noe Fernandez & Dario Guerrero
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.