0.0
No commit activity in last 3 years
No release in over 3 years
Parses stockholm sequence alignment format
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.4.2
>= 1.0.21
~> 1.8.4
~> 3.12
~> 2.8.0
 Project Readme

bio-stockholm

Build Status

Stockholm format file parser for ruby.

Installation

gem install bio-stockholm

Usage

An example stockholm format file, from https://en.wikipedia.org/wiki/Stockholm_format

# STOCKHOLM 1.0
#=GF ID CBS1
#=GF AC PF00571
#=GF DE CBS domain
#=GF AU Bateman A
#=GF CC CBS domains are small intracellular modules mostly found
#=GF CC in 2 or four copies within a protein.
#=GF SQ 5
#=GS O31698/18-71 AC O31698
#=GS O83071/192-246 AC O83071
#=GS O83071/259-312 AC O83071
#=GS O31698/88-139 AC O31698
#=GS O31698/88-139 OS Bacillus subtilis
O83071/192-246          MTCRAQLIAVPRASSLAEAIACAQKMRVSRVPVYERS
#=GR O83071/192-246 SA  9998877564535242525515252536463774777
O83071/259-312          MQHVSAPVFVFECTRLAYVQHKLRAHSRAVAIVLDEY
#=GR O83071/259-312 SS  CCCCCHHHHHHHHHHHHHEEEEEEEEEEEEEEEEEEE
O31698/18-71            MIEADKVAHVQVGNNLEHALLVLTKTGYTAIPVLDPS
#=GR O31698/18-71 SS    CCCHHHHHHHHHHHHHHHEEEEEEEEEEEEEEEEHHH
O31698/88-139           EVMLTDIPRLHINDPIMKGFGMVINN..GFVCVENDE
#=GR O31698/88-139 SS   CCCCCCCHHHHHHHHHHHHEEEEEEEEEEEEEEEEEH
#=GC SS_cons            CCCCCHHHHHHHHHHHHHEEEEEEEEEEEEEEEEEEH
O31699/88-139           EVMLTDIPRLHINDPIMKGFGMVINN..GFVCVENDE
#=GR O31699/88-139 AS   ________________*____________________
#=GR O31699/88-139 IN   ____________1____________2______0____
//
require 'bio-stockholm'

entries = Bio::Stockholm::Reader.parse_from_file('spec/data/wikipedia.sto') #=> Array of 1

cbs = entries[0] #=> Bio::Stockholm::Store object

cbs.gf_features['ID'] #=> 'CBS'
cbs.gf_features['AC'] #=> 'PF00571'

# #=GS O31698/88-139 OS Bacillus subtilis
cbs.records['O31698/88-139'].gs_features['OS'] #=> 'Bacillus subtilis'

# O83071/192-246          MTCRAQLIAVPRASSLAEAIACAQKMRVSRVPVYERS
cbs.records['O83071/192-246'].sequence #=> 'MTCRAQLIAVPRASSLAEAIACAQKMRVSRVPVYERS'

The API doc is online. For more code examples see the test files in the source tree.

Project home page

Information on the source tree, documentation, examples, issues and how to contribute, see

http://github.com/wwood/bioruby-stockholm

The BioRuby community is on IRC server: irc.freenode.org, channel: #bioruby.

Cite

This software is currently unpublished.

Biogems.info

This Biogem is published at (http://biogems.info/index.html#bio-stockholm)

Copyright

Copyright (c) 2013 Ben J. Woodcroft. See LICENSE.txt for further details.