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://weblogo.threeplusone.com

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

    http://weblogo.threeplusone.com/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 --serve

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.5, 2.6 or 2.7, and the python
array package 'numpy' (http://www.scipy.org/Download)

Generating logos in PDF or bitmap graphics formats require that the ghostscript
program 'gs' be installed. Scalable Vector Graphics (SVG) format also requires 
the program 'pdf2svg'.


Version: 3.2

Submodules

Classes
  GhostscriptAPI
Interface to the command line program Ghostscript ('gs')
  LogoOptions
A container for all logo formatting options.
  LogoFormat
Specifies the format of the logo.
  LogoData
The data needed to generate a sequence logo.
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=seq_io.read, alphabet=None, ignore_lower_case=False, max_file_size=0)
Read sequence data from the input stream and return a seqs object.
source code
Variables
  description = "Create sequence logos from biological sequence ...
  classic = ColorScheme([ColorGroup("G", "orange"), ColorGroup("...
  std_color_schemes = {"auto": None, "monochrome": monochrome, "...
  default_color_schemes = {unambiguous_protein_alphabet: hydroph...
  std_units = {"bits": 1./ log(2), "nats": 1., "digits": 1./ log...
  std_sizes = {"small": 5.4, "medium": 5.4* 2, "large": 5.4* 3}
  std_alphabets = {'protein': unambiguous_protein_alphabet, 'rna...
  std_percentCG = {'H. sapiens': 40., 'E. coli': 50.5, 'S. cerev...
  formatters = {'eps': eps_formatter, 'pdf': pdf_formatter, 'png...
Function Details

read_seq_data(fin, input_parser=seq_io.read, alphabet=None, ignore_lower_case=False, max_file_size=0)

source code 
Read sequence data from the input stream and return a seqs object. 

The environment variable WEBLOGO_MAX_FILE_SIZE overides the max_file_size argument.
Used to limit the load on the WebLogo webserver.


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./ log(2), "nats": 1., "digits": 1./ log(10), "kT": 1., "kJ/\
mol": 8.314472* 298.15/ 1000., "kcal/mol": 1.987* 298.15/ 1000., "prob\
ability": None,}

std_alphabets

Value:
{'protein': unambiguous_protein_alphabet, 'rna': unambiguous_rna_alpha\
bet, 'dna': unambiguous_dna_alphabet}

std_percentCG

Value:
{'H. sapiens': 40., 'E. coli': 50.5, 'S. cerevisiae': 38., 'C. elegans\
': 36., 'D. melanogaster': 43., 'M. musculus': 42., 'T. thermophilus':\
 69.4,}

formatters

Value:
{'eps': eps_formatter, 'pdf': pdf_formatter, 'png': png_formatter, 'pn\
g_print': png_print_formatter, 'jpeg': jpeg_formatter, 'svg': svg_form\
atter, 'logodata': txt_formatter,}