Module Import alias Import alias Import alias ImportFrom alias Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Num Num Assign AttributeStore NameLoad attr ListLoad Num Num Num Assign AttributeStore NameLoad attr ListLoad Num Num Num Assign AttributeStore NameLoad attr ListLoad Num Num Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad For NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Num While CompareLtE NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad body Assign NameStore Call NameLoad Call NameLoad BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index NameLoad BinOpDiv SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num AttributeLoad NameLoad attr If BoolOpAnd CompareGt NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num CompareLt BinOpAdd NameLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd NameStore Num Assign NameStore Num While CompareLtE NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad body Assign NameStore Call NameLoad Call NameLoad BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index NameLoad BinOpDiv SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Num AttributeLoad NameLoad attr If BoolOpAnd CompareGt BinOpSub NameLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num CompareLt NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Str For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad BinOpAdd NameLoad AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad BinOpSub NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad keyword Num keyword Num Assign NameStore Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr CompareLtE Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Num Index Num attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str If CompareNotEq BinOpMod NameLoad Num Num body AugAssignAdd NameStore Num Assign NameStore BinOpDiv BinOpSub NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListComp ListLoad Num NameLoad BinOpPow NameLoad Num comprehension NameStore Call NameLoad UnaryOpUSub NameLoad BinOpAdd NameLoad Num keyword Str Assign NameStore SubscriptLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr Index NameLoad Assign NameStore BinOpSub SubscriptLoad NameLoad Index Num Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad SubscriptLoad NameLoad Slice Num BinOpAdd NameLoad Num Slice Num SubscriptLoad NameLoad Index Num Assign NameStore BinOpAdd SubscriptLoad NameLoad Index Num Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad SubscriptLoad NameLoad Slice BinOpSub UnaryOpUSub NameLoad Num Num Slice Num SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Str keyword Str attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num Num Num body If CompareNotEq BinOpMod NameLoad Num Num body AugAssignAdd NameStore Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad Str If BoolOpOr CompareNotEq BinOpMod NameLoad Num Num CompareLt NameLoad Num body Raise Call NameLoad Str If CompareLt NameLoad BinOpAdd NameLoad Num body Raise Call NameLoad Str Assign NameStore Call NameLoad BinOpAdd NameLoad Num Assign NameStore BinOpFloorDiv BinOpSub NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListComp ListComp BinOpPow NameLoad NameLoad comprehension NameStore NameLoad comprehension NameStore Call NameLoad UnaryOpUSub NameLoad BinOpAdd NameLoad Num Assign NameStore BinOpMult BinOpMult SubscriptLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr Index NameLoad BinOpPow NameLoad NameLoad Call NameLoad NameLoad Assign NameStore BinOpSub SubscriptLoad NameLoad Index Num Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad SubscriptLoad NameLoad Slice Num BinOpAdd NameLoad Num Slice Num SubscriptLoad NameLoad Index Num Assign NameStore BinOpAdd SubscriptLoad NameLoad Index Num Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad SubscriptLoad NameLoad Slice BinOpSub UnaryOpUSub NameLoad Num Num Slice Num SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num NameLoad keyword Str decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A N/A os N/A sys N/A unittest MACS2.IO.cCallPeakUnit * N/A numpy np MACS2.IO.cPeakIO PeakIO math factorial random normalvariate Test_CallSummits N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self range N/A 0 2000 N/A N/A self binding_sites N/A 300 500 700 N/A N/A self binding_strength N/A 60 45 55 N/A N/A self binding_width N/A 150 150 150 N/A N/A self cutting_variation 50 N/A N/A self tag_size 50 N/A N/A self test_tags_file random_test.bed N/A N/A self genome_size 10000 N/A N/A self plus_tags N/A N/A N/A self minus_tags N/A N/A i N/A range N/A len N/A self binding_sites N/A N/A j 0 N/A N/A j N/A N/A self binding_strength N/A i N/A N/A x N/A int N/A normalvariate N/A N/A N/A self binding_sites N/A i N/A N/A N/A self binding_width N/A i 2 N/A self cutting_variation N/A N/A N/A x N/A N/A self range N/A 0 N/A N/A x N/A self tag_size N/A N/A self range N/A 1 N/A N/A N/A N/A N/A self plus_tags append x N/A j 1 N/A j 0 N/A N/A j N/A N/A self binding_strength N/A i N/A N/A x N/A int N/A normalvariate N/A N/A N/A self binding_sites N/A i N/A N/A N/A self binding_width N/A i 2 N/A self cutting_variation N/A N/A N/A N/A x N/A self tag_size N/A N/A self range N/A 0 N/A x N/A N/A self range N/A 1 N/A N/A N/A N/A N/A self minus_tags append x N/A j 1 N/A N/A self plus_tags N/A sorted N/A self plus_tags N/A N/A self minus_tags N/A sorted N/A self minus_tags N/A N/A self result_peak N/A PeakIO N/A fhd N/A open N/A self test_tags_file w N/A x N/A self plus_tags N/A N/A N/A N/A fhd write N/A chr1	%d	%d	.	0	+
 N/A x N/A x N/A self tag_size N/A x N/A self minus_tags N/A N/A N/A N/A fhd write N/A chr1	%d	%d	.	0	-
 N/A N/A x N/A self tag_size x N/A test_pileup N/A N/A self N/A N/A N/A N/A N/A maxima N/A N/A signal window_size N/A 51 N/A N/A return the local maxima in a signal after applying a 2nd order
    Savitsky-Golay (polynomial) filter using window_size specified  
     N/A data1 N/A savitzky_golay signal window_size order 2 deriv 1 N/A m N/A N/A N/A N/A N/A np where N/A N/A N/A np diff N/A N/A np sign data1 -1 N/A 0 astype int32 N/A m N/A savitzky_golay_order2 N/A N/A signal window_size deriv N/A 0 N/A N/A Smooth (and optionally differentiate) data with a Savitzky-Golay filter.
    The Savitzky-Golay filter removes high frequency noise from data.
    It has the advantage of preserving the original shape and
    features of the signal better than other types of filtering
    approaches, such as moving averages techhniques.
    Parameters
    ----------
    y : array_like, shape (N,)
        the values of the time history of the signal.
    window_size : int
        the length of the window. Must be an odd integer number.
    deriv: int
        the order of the derivative to compute (default = 0 means only smoothing)
    Returns
    -------
    ys : ndarray, shape (N)
        the smoothed signal (or it's n-th derivative).
    Notes
    -----
    The Savitzky-Golay is a type of low-pass filter, particularly
    suited for smoothing noisy data. The main idea behind this
    approach is to make for each point a least-square fit with a
    polynomial of high order over a odd-sized window centered at
    the point.

    References
    ----------
    .. [1] A. Savitzky, M. J. E. Golay, Smoothing and Differentiation of
       Data by Simplified Least Squares Procedures. Analytical
       Chemistry, 1964, 36 (8), pp 1627-1639.
    .. [2] Numerical Recipes 3rd Edition: The Art of Scientific Computing
       W.H. Press, S.A. Teukolsky, W.T. Vetterling, B.P. Flannery
       Cambridge University Press ISBN-13: 9780521880688
     N/A N/A N/A window_size 2 1 N/A N/A window_size 1 N/A half_window N/A N/A window_size 1 2 N/A b N/A N/A np mat N/A N/A 1 k N/A k 2 N/A k N/A range N/A half_window N/A half_window 1 dtype int64 N/A m N/A N/A N/A N/A N/A np linalg pinv b A N/A deriv N/A firstvals N/A N/A signal N/A 0 N/A N/A np abs N/A N/A N/A signal N/A 1 N/A half_window 1 N/A -1 N/A signal N/A 0 N/A lastvals N/A N/A signal N/A -1 N/A N/A np abs N/A N/A N/A signal N/A N/A N/A half_window 1 -1 N/A -1 N/A signal N/A -1 N/A signal N/A N/A np concatenate N/A firstvals signal lastvals N/A ret N/A N/A N/A N/A np convolve m N/A N/A signal astype float64 mode valid astype float32 N/A ret N/A savitzky_golay N/A N/A y window_size order deriv rate N/A 2 0 1 N/A N/A N/A N/A window_size 2 1 N/A N/A window_size 1 N/A N/A N/A window_size N/A N/A np abs N/A N/A np int window_size N/A order N/A N/A np abs N/A N/A np int order N/A N/A N/A ValueError N/A msg N/A N/A N/A ValueError window_size and order have to be of type int N/A N/A N/A N/A window_size 2 1 N/A window_size 1 N/A N/A N/A TypeError window_size size must be a positive odd number N/A N/A window_size N/A order 2 N/A N/A N/A TypeError window_size is too small for the polynomials order N/A order_range N/A range N/A order 1 N/A half_window N/A N/A window_size 1 2 N/A b N/A N/A np mat N/A N/A N/A k i N/A i order_range N/A k N/A range N/A half_window N/A half_window 1 N/A m N/A N/A N/A N/A N/A N/A N/A np linalg pinv b A N/A deriv N/A rate deriv N/A factorial deriv N/A firstvals N/A N/A y N/A 0 N/A N/A np abs N/A N/A N/A y N/A 1 N/A half_window 1 N/A -1 N/A y N/A 0 N/A lastvals N/A N/A y N/A -1 N/A N/A np abs N/A N/A N/A y N/A N/A N/A half_window 1 -1 N/A -1 N/A y N/A -1 N/A y N/A N/A np concatenate N/A firstvals y lastvals N/A N/A N/A np convolve N/A m N/A -1 y mode valid N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main