Module Expr Str Import alias Import alias Import alias ImportFrom alias alias ImportFrom alias FunctionDef arguments args defaults body TryExcept body Assign NameStore Call NameLoad ListLoad Str Str Str keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name TupleStore NameStore NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Num TryExcept body Assign NameStore Call NameLoad ListLoad Str Str keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad name TupleStore NameStore NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad keyword Str keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str keyword Num Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr body Print Str Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad ListLoad Str Str AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Call NameLoad ListLoad Str Str AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore ListLoad Num Num For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr Str body Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr If CompareGt Call NameLoad NameLoad Num body AugAssignAdd SubscriptStore NameLoad Index Num Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Num Call NameLoad NameLoad Assign NameStore ListLoad Num Num For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr Str body Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr If CompareGt Call NameLoad NameLoad Num body AugAssignAdd SubscriptStore NameLoad Index Num Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Num Call NameLoad NameLoad If CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Print Str Print NameLoad Print NameLoad Print Str Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign NameStore BinOpMod Str TupleLoad NameLoad BinOpAdd NameLoad NameLoad BinOpSub BinOpSub NameLoad NameLoad NameLoad BinOpAdd NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Str Str NameLoad keyword NameLoad keyword NameLoad For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Print BinOpMod Str Call NameLoad BinOpMult Num Call NameLoad SubscriptLoad NameLoad Slice BinOpAdd Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad NameLoad BinOpAdd NameLoad NameLoad BinOpSub BinOpSub NameLoad NameLoad NameLoad BinOpAdd NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Str Str NameLoad keyword NameLoad keyword NameLoad For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad NameLoad attr Print BinOpMod Str Call NameLoad BinOpMult Num Call NameLoad SubscriptLoad NameLoad Slice BinOpAdd Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body TryExcept body Expr Call NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Num
N/A N/A Module Description

Copyright (c) 2008, 2015 Tao Liu <tliu4@buffalo.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: tliu4@buffalo.edu
 N/A os N/A sys N/A re subprocess Popen PIPE optparse OptionParser check_Rscript_BEDTools N/A N/A N/A N/A N/A N/A N/A p N/A Popen N/A bedtools coverage -h stdout PIPE stderr PIPE N/A N/A N/A OSError N/A N/A errno detail N/A N/A N/A N/A N/A sys stderr write 'bedtools coverage' can not be accessed through the command line!
 N/A N/A N/A N/A sys stderr write N/A OS gave me this error message: [Errno %d]: %s
 N/A errno detail N/A N/A N/A N/A sys stderr write Please download BEDtools from <http://code.google.com/p/bedtools/>.
 N/A N/A N/A sys exit 1 N/A N/A N/A p N/A Popen N/A Rscript --version stdout PIPE stderr PIPE N/A N/A N/A OSError N/A N/A errno detail N/A N/A N/A N/A N/A sys stderr write 'Rscript' can not be accessed through the command line!
 N/A N/A N/A N/A sys stderr write N/A OS gave me this error message: [Errno %d]: %s
 N/A errno detail N/A N/A N/A N/A sys stderr write Please make sure you installed R(>2.9).
 N/A N/A N/A sys exit 1 N/A main N/A N/A N/A N/A N/A N/A check_Rscript_BEDTools N/A usage usage: %prog [options] N/A description Calculate bed correlation using BEDtools, based on basepair overlap comparing to random genome background. The one-side hypergeometric tests will be applied to decide whether to accept alternative hypothesis of enrichment or depletion. 'bedtools' and 'R' are both required. Note, please make sure the chromosome naming convientions of the twoe files are the same. N/A optparser N/A OptionParser version %prog 0.1 description description usage usage add_help_option False N/A N/A N/A optparser add_option -h --help action help help Show this help message and exit. N/A N/A N/A optparser add_option -i --ifile dest ifile type string help BED file 1 N/A N/A N/A optparser add_option -j --jfile dest jfile type string help BED file 2 N/A N/A N/A optparser add_option -g --gsize dest gsize type float help genome size default 90000000 N/A N/A options args N/A N/A optparser parse_args N/A N/A N/A N/A options ifile N/A N/A options jfile N/A N/A Need 2 BED files! N/A N/A N/A sys exit 1 N/A gsize N/A int N/A options gsize N/A p N/A Popen N/A bedtools coverage -a N/A options ifile -b N/A options jfile -hist stdout PIPE N/A q N/A Popen N/A bedtools coverage -b N/A options ifile -a N/A options jfile -hist stdout PIPE N/A coverage2 N/A 0 0 N/A i N/A p stdout N/A N/A N/A N/A i startswith all N/A N/A N/A tmp depth cover len2 percentage N/A N/A N/A N/A i strip split N/A N/A N/A int depth 0 N/A N/A N/A coverage2 N/A 1 N/A int cover N/A N/A coverage2 N/A 0 N/A int len2 N/A coverage1 N/A 0 0 N/A i N/A q stdout N/A N/A N/A N/A i startswith all N/A N/A N/A tmp depth cover len1 percentage N/A N/A N/A N/A i strip split N/A N/A N/A int depth 0 N/A N/A N/A coverage1 N/A 1 N/A int cover N/A N/A coverage1 N/A 0 N/A int len1 N/A N/A N/A coverage1 N/A 1 N/A coverage2 N/A 1 N/A N/A Overlapped of 1 with 2 is different of 2 with 1: N/A coverage1 N/A coverage2 N/A Please run mergeBed on both of them first. N/A N/A N/A sys exit 1 N/A common N/A float N/A coverage1 N/A 1 N/A only1 N/A float N/A N/A coverage1 N/A 0 N/A coverage1 N/A 1 N/A only2 N/A float N/A N/A coverage2 N/A 0 N/A coverage2 N/A 1 N/A r N/A phyper(%d,%d,%d,%d,lower.tail=F,log.p=T)/log(10) N/A common N/A common only1 N/A N/A gsize common only1 N/A common only2 N/A p N/A Popen N/A Rscript -e r stdout PIPE stderr PIPE N/A i N/A p stdout N/A N/A N/A N/A i startswith [1] N/A N/A i N/A N/A i strip N/A N/A hypergeometric -log10(p-value) (upper tail CDF -- enriched against random) is: %.2f N/A abs N/A -1 N/A float N/A i N/A N/A N/A N/A i find [1] 3 N/A N/A N/A p terminate N/A r N/A phyper(%d,%d,%d,%d,lower.tail=T,log.p=T)/log(10) N/A common N/A common only1 N/A N/A gsize common only1 N/A common only2 N/A p N/A Popen N/A Rscript -e r stdout PIPE stderr PIPE N/A i N/A p stdout N/A N/A N/A N/A i startswith [1] N/A N/A i N/A N/A i strip N/A N/A hypergeometric -log10(p-value) (lower tail CDF -- depleted against random) is: %.2f N/A abs N/A -1 N/A float N/A i N/A N/A N/A N/A i find [1] 3 N/A N/A N/A p terminate N/A N/A N/A __name__ __main__ N/A N/A N/A N/A N/A main N/A N/A N/A KeyboardInterrupt N/A N/A N/A N/A N/A sys stderr write User interrupt me! ;-) See you!
 N/A N/A N/A sys exit 0