Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias Import alias ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq Call NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Str orelse If CompareEq Call NameLoad NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Num Assign NameStore Num For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr Str body Continue orelse If Call AttributeLoad NameLoad attr Str body Continue orelse If Call AttributeLoad NameLoad attr Str body Continue orelse If Call AttributeLoad NameLoad attr Str body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq NameLoad Num body Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num orelse Assign NameStore Str If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num orelse Assign NameStore Num orelse If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq NameLoad Num body Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num orelse Raise Call NameLoad Str If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num orelse Assign NameStore Num If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num If CompareLt NameLoad Num body Raise Call NameLoad Str orelse Raise Call NameLoad Str If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num orelse Raise Call NameLoad Str orelse If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad AugAssignAdd NameStore NameLoad orelse TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Print NameLoad NameLoad Expr Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Dict Num body Expr Str Assign NameStore Dict Assign NameStore Str Assign NameStore Num For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr Str body Continue orelse If Call AttributeLoad NameLoad attr Str body Continue orelse If Call AttributeLoad NameLoad attr Str body Continue orelse If Call AttributeLoad NameLoad attr Str body Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq NameLoad Num body Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num orelse Assign NameStore Str If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num orelse Assign NameStore Num Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore AttributeLoad SubscriptLoad NameLoad Index NameLoad attr orelse If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq NameLoad Num body Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num orelse Raise Call NameLoad Str If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num orelse Assign NameStore Num If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num If CompareLt NameLoad Num body Raise Call NameLoad Str orelse Raise Call NameLoad Str If CompareNotEq NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num attr attr Index Num orelse Raise Call NameLoad Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num Num Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore AttributeLoad SubscriptLoad NameLoad Index NameLoad attr orelse If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad AugAssignAdd NameStore NameLoad orelse TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Print NameLoad NameLoad Expr Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Return NameLoad decorator_list decorator_list
N/A N/A Module Description

Copyright (c) 2008 Tao Liu <taoliu@jimmy.harvard.edu>

This code is free software; you can redistribute it and/or modify it
under the terms of the BSD License (see the file COPYING included with
the distribution).

@status:  experimental
@version: $Revision$
@author:  Tao Liu
@contact: taoliu@jimmy.harvard.edu
 N/A os N/A sys N/A re N/A shutil taolib.CoreLib.FeatIO WigTrackI taolib.CoreLib.BinKeeper BinKeeperI N/A time WiggleIO N/A N/A N/A File Parser Class for Wiggle File.

    Note: Only can be used with the wiggle file generated by pMA2C or
    MACS. This module can not be univerally used.

    Note2: The positions in Wiggle File must be sorted for every
    chromosome.

    Example:
    >>> from Cistrome.CoreLib.Parser import WiggleIO
    >>> w = WiggleIO('sample.wig')
    >>> bk = w.build_binKeeper()
    >>> wtrack = w.build_wigtrack()    
     __init__ N/A N/A self f N/A N/A N/A f must be a filename or a file handler.
        
         N/A N/A N/A type f str N/A N/A N/A self fhd N/A open f r N/A N/A N/A N/A type f file N/A N/A N/A self fhd f N/A N/A N/A Exception f must be a filename or a file handler. N/A build_wigtrack N/A N/A self N/A N/A N/A Use this function to return a WigTrackI.

         N/A data N/A WigTrackI N/A add_func N/A data add_loc N/A chrom Unknown N/A span 0 N/A pos_fixed 0 N/A i N/A self fhd N/A N/A N/A N/A i startswith track N/A N/A N/A N/A N/A N/A i startswith # N/A N/A N/A N/A N/A N/A i startswith browse N/A N/A N/A N/A N/A N/A i startswith variableStep N/A N/A pos_fixed 0 N/A chromi N/A N/A i rfind chrom= N/A spani N/A N/A i rfind span= N/A N/A chromi -1 N/A N/A chrom N/A N/A N/A N/A N/A N/A i N/A N/A chromi 6 strip split N/A 0 N/A N/A chrom Unknown N/A N/A spani -1 N/A N/A span N/A int N/A N/A N/A N/A N/A N/A i N/A N/A spani 5 strip split N/A 0 N/A N/A span 0 N/A N/A N/A N/A i startswith fixedStep N/A N/A chromi N/A N/A i rfind chrom= N/A starti N/A N/A i rfind start= N/A stepi N/A N/A i rfind step= N/A spani N/A N/A i rfind span= N/A N/A chromi -1 N/A N/A chrom N/A N/A N/A N/A N/A N/A i N/A N/A chromi 6 strip split N/A 0 N/A N/A N/A Exception fixedStep line must define chrom=XX N/A N/A spani -1 N/A N/A span N/A int N/A N/A N/A N/A N/A N/A i N/A N/A spani 5 strip split N/A 0 N/A N/A span 0 N/A N/A starti -1 N/A N/A pos_fixed N/A int N/A N/A N/A N/A N/A N/A i N/A N/A starti 6 strip split N/A 0 N/A N/A pos_fixed 1 N/A N/A N/A Exception fixedStep start must be bigger than 0! N/A N/A N/A Exception fixedStep line must define start=XX N/A N/A stepi -1 N/A N/A step N/A int N/A N/A N/A N/A N/A N/A i N/A N/A stepi 5 strip split N/A 0 N/A N/A N/A Exception fixedStep line must define step=XX! N/A N/A pos_fixed N/A N/A value N/A N/A i strip N/A N/A add_func chrom N/A int pos_fixed N/A float value N/A pos_fixed step N/A N/A N/A N/A N/A pos value N/A N/A i split N/A N/A N/A ValueError N/A N/A i pos_fixed N/A N/A add_func chrom N/A int pos N/A float value N/A N/A data span span N/A N/A N/A N/A self fhd seek 0 N/A data N/A build_binKeeper N/A N/A self chromLenDict binsize N/A N/A 200 N/A N/A Use this function to return a dictionary of BinKeeper
        objects.

        chromLenDict is a dictionary for chromosome length like

        {'chr1':100000,'chr2':200000}

        bin is in bps. for detail, check BinKeeper.
         N/A data N/A N/A chrom Unknown N/A pos_fixed 0 N/A i N/A self fhd N/A N/A N/A N/A i startswith track N/A N/A N/A N/A N/A N/A i startswith browse N/A N/A N/A N/A N/A N/A i startswith # N/A N/A N/A N/A N/A N/A i startswith variableStep N/A N/A pos_fixed 0 N/A chromi N/A N/A i rfind chrom= N/A spani N/A N/A i rfind span= N/A N/A chromi -1 N/A N/A chrom N/A N/A N/A N/A N/A N/A i N/A N/A chromi 6 strip split N/A 0 N/A N/A chrom Unknown N/A N/A spani -1 N/A N/A span N/A int N/A N/A N/A N/A N/A N/A i N/A N/A spani 5 strip split N/A 0 N/A N/A span 0 N/A chrlength N/A N/A N/A chromLenDict setdefault chrom 250000000 10000000 N/A N/A N/A data setdefault chrom N/A BinKeeperI binsize binsize chromosomesize chrlength N/A add N/A N/A data N/A chrom add N/A N/A N/A N/A i startswith fixedStep N/A N/A chromi N/A N/A i rfind chrom= N/A starti N/A N/A i rfind start= N/A stepi N/A N/A i rfind step= N/A spani N/A N/A i rfind span= N/A N/A chromi -1 N/A N/A chrom N/A N/A N/A N/A N/A N/A i N/A N/A chromi 6 strip split N/A 0 N/A N/A N/A Exception fixedStep line must define chrom=XX N/A N/A spani -1 N/A N/A span N/A int N/A N/A N/A N/A N/A N/A i N/A N/A spani 5 strip split N/A 0 N/A N/A span 0 N/A N/A starti -1 N/A N/A pos_fixed N/A int N/A N/A N/A N/A N/A N/A i N/A N/A starti 6 strip split N/A 0 N/A N/A pos_fixed 1 N/A N/A N/A Exception fixedStep start must be bigger than 0! N/A N/A N/A Exception fixedStep line must define start=XX N/A N/A stepi -1 N/A N/A step N/A int N/A N/A N/A N/A N/A N/A i N/A N/A stepi 5 strip split N/A 0 N/A N/A N/A Exception fixedStep line must define step=XX! N/A chrlength N/A N/A N/A chromLenDict setdefault chrom 250000000 10000000 N/A N/A N/A data setdefault chrom N/A BinKeeperI binsize binsize chromosomesize chrlength N/A add N/A N/A data N/A chrom add N/A N/A pos_fixed N/A N/A value N/A N/A i strip N/A N/A add N/A int pos_fixed N/A float value N/A pos_fixed step N/A N/A N/A N/A N/A pos value N/A N/A i split N/A N/A N/A ValueError N/A N/A i pos_fixed N/A N/A add N/A int pos N/A float value N/A N/A N/A N/A self fhd seek 0 N/A data N/A N/A