Package weblogolib

Package weblogolib

source code


WebLogo (http://code.google.com/p/weblogo/) is a tool for creating sequence 
logos from biological sequence alignments.  It can be run on the command line,
as a standalone webserver, as a CGI webapp, or as a python library.

The main WebLogo webserver is located at http://bespoke.lbl.gov/weblogo/

Please consult the manual for installation instructions and more information:
(Also located in the weblogolib/htdocs subdirectory.)

    http://bespoke.lbl.gov/weblogo/manual.html

For help on the command line interface run
    ./weblogo --help

To build a simple logo run
    ./weblogo  < cap.fa > logo0.eps
    
To run as a standalone webserver at localhost:8080 
    ./weblogo --server

To create a logo in python code:
    >>> from weblogolib import *
    >>> fin = open('cap.fa')
    >>> seqs = read_seq_data(fin) 
    >>> data = LogoData.from_seqs(seqs)
    >>> options = LogoOptions()
    >>> options.title = "A Logo Title"
    >>> format = LogoFormat(data, options)
    >>> fout = open('cap.eps', 'w') 
    >>> eps_formatter( data, format, fout)


-- Distribution and Modification --
This package is distributed under the new BSD Open Source License. 
Please see the LICENSE.txt file for details on copyright and licensing.
The WebLogo source code can be downloaded from http://code.google.com/p/weblogo/
WebLogo requires Python 2.3, 2.4 or 2.5, the corebio python toolkit for computational 
biology (http://code.google.com/p/corebio), and the python array package 
'numpy' (http://www.scipy.org/Download)


Version: 3.0

Submodules

Classes
  GhostscriptAPI
Interface to the command line program Ghostscript ('gs')
  LogoSize
  LogoOptions
A container for all logo formating options.
  LogoFormat
Specifies the format of the logo.
  LogoData
The data needed to generate a sequence logo.
  Dirichlet
The Dirichlet probability distribution.
Functions
 
pdf_formatter(data, format, fout)
Generate a logo in PDF format.
source code
 
jpeg_formatter(data, format, fout)
Generate a logo in JPEG format.
source code
 
png_formatter(data, format, fout)
Generate a logo in PNG format.
source code
 
png_print_formatter(data, format, fout)
Generate a logo in PNG format with print quality (600 DPI) resolution.
source code
 
txt_formatter(logodata, format, fout)
Create a text representation of the logo data.
source code
 
eps_formatter(logodata, format, fout)
Generate a logo in Encapsulated Postscript (EPS)
source code
 
default_formatter(logodata, format, fout)
Generate a logo in Encapsulated Postscript (EPS)
source code
 
base_distribution(percentCG) source code
 
equiprobable_distribution(length) source code
 
read_seq_data(fin, input_parser=<function read at 0x12b05b0>, alphabet=None, ignore_lower_case=False, max_file_size=0) source code
 
which_alphabet(seqs)
Returns the most appropriate unambiguous protien, rna or dna alphabet for a Seq or SeqList.
source code
Variables
  description = 'Create sequence logos from biological sequence ...
  classic = ColorScheme([ColorGroup("G", "orange"), ColorGroup("...
  std_color_schemes = {'auto': None, 'base pairing': <weblogolib...
  default_color_schemes = {Alphabet( 'ACGT', zip('acgt', 'ACGT')...
  std_units = {'bits': 1.44269504089, 'digits': 0.434294481903, ...
  std_sizes = {'large': LogoSi...
  std_alphabets = {'dna': Alphabet( 'ACGT', zip('acgt', 'ACGT') ...
  std_percentCG = {'C. elegans': 36.0, 'D. melanogaster': 43.0, ...
  formatters = {'eps': eps_formatter, 'pdf': pdf_formatter, 'png...
Variables Details

description

Value:
'Create sequence logos from biological sequence alignments.'

classic

Value:
ColorScheme([ColorGroup("G", "orange"), ColorGroup("TU", "red"), Color\
Group("C", "blue"), ColorGroup("A", "green")])

std_color_schemes

Value:
{"auto": None, "monochrome": monochrome, "base pairing": base_pairing,\
 "classic": classic, "hydrophobicity": hydrophobicity, "chemistry": ch\
emistry, "charge": charge,}

default_color_schemes

Value:
{unambiguous_protein_alphabet: hydrophobicity, unambiguous_rna_alphabe\
t: base_pairing, unambiguous_dna_alphabet: base_pairing}

std_units

Value:
{'bits': 1.44269504089,
 'digits': 0.434294481903,
 'kJ/mol': 2.4789598268,
 'kT': 1.0,
 'kcal/mol': 0.59242405,
 'nats': 1.0,
 'probability': None}

std_sizes

Value:
{'large': LogoSize(
    stack_height=81.000000000000014,
    stack_width=16.200000000000003
),
 'medium': LogoSize(
    stack_height=54.0,
    stack_width=10.800000000000001
),
...

std_alphabets

Value:
{'dna': Alphabet( 'ACGT', zip('acgt', 'ACGT') ),
 'protein': Alphabet( 'ACDEFGHIKLMNPQRSTVWY', zip('acdefghiklmnpqrstvw\
y', 'ACDEFGHIKLMNPQRSTVWY') ),
 'rna': Alphabet( 'ACGU', zip('acgu', 'ACGU') )}

std_percentCG

Value:
{'C. elegans': 36.0,
 'D. melanogaster': 43.0,
 'E. coli': 50.5,
 'H. sapiens': 40.0,
 'M. musculus': 42.0,
 'S. cerevisiae': 38.0,
 'T. thermophilus': 69.4}

formatters

Value:
{'eps': eps_formatter, 'pdf': pdf_formatter, 'png': png_formatter, 'pn\
g_print': png_print_formatter, 'jpeg': jpeg_formatter, 'txt': txt_form\
atter,}