Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias identifier Import alias identifier Import alias Import alias identifier Import alias identifier Import alias identifier Import alias identifier Import alias identifier Import alias identifier Import alias identifier Import alias identifier Import alias identifier Import alias identifier Import alias Import alias Import alias Import alias Expr Call AttributeLoad NameLoad attr ListLoad BinOpMod Str SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Str Str Assign NameStore AttributeLoad NameLoad attr If Call AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore NameLoad With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call NameLoad SubscriptLoad Call AttributeLoad NameLoad attr Index Num Break Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Str If Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Return Call NameLoad SubscriptLoad NameLoad Index Num Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq Call NameLoad NameLoad Num body Raise Call AttributeLoad NameLoad attr BinOpMod Str Call NameLoad NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad Assign NameStore Num For TupleStore NameStore NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str AugAssignAdd NameStore Call NameLoad NameLoad Assign NameStore BinOpDiv Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str keyword SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore NameStore TupleLoad Num Num Num Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad For NameStore NameLoad body For NameStore Call AttributeLoad NameLoad attr body AugAssignAdd NameStore Num If BoolOpAnd CompareEq AttributeLoad NameLoad attr NameLoad CompareEq AttributeLoad NameLoad attr NameLoad body AugAssignAdd NameStore Num Continue If BoolOpAnd NameLoad CompareLtE Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpAdd NameLoad Str Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Num Assign NameStore BinOpSub NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad BinOpDiv BinOpMult Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad BinOpDiv BinOpMult Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad BinOpDiv BinOpMult Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad BinOpDiv BinOpMult Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad BinOpDiv BinOpMult Num NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Str For NameStore Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Num Call AttributeLoad Str attr SubscriptLoad NameLoad Slice Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call NameLoad BinOpAdd NameLoad Str Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad BinOpAdd NameLoad Str Str Expr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr body AugAssignAdd NameStore Num If BoolOpAnd CompareEq AttributeLoad NameLoad attr NameLoad CompareEq AttributeLoad NameLoad attr NameLoad body AugAssignAdd NameStore Num AugAssignAdd NameStore Num Continue If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Index NameLoad Num Assign NameStore Num Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad BinOpDiv BinOpMult Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad BinOpSub NameLoad NameLoad BinOpDiv BinOpMult Num BinOpSub NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body AugAssignAdd NameStore SubscriptLoad NameLoad Index NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index NameLoad NameLoad BinOpDiv BinOpMult Num SubscriptLoad NameLoad Index NameLoad NameLoad BinOpDiv BinOpMult Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str orelse Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str If Call AttributeLoad NameLoad attr Str body Return Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Str For NameStore NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str orelse Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str If Call AttributeLoad NameLoad attr Str body Return Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Str For NameStore NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore TupleLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Expr Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad Str attr NameLoad Str Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore TupleLoad Num Str Num Num Str Num Num Num Num Num Num Num Num Num Num Num Assign TupleStore NameStore NameStore TupleLoad ListLoad ListLoad Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad If BoolOpAnd NameLoad NameLoad body For NameStore NameLoad body Assign NameStore BinOpMod NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Str If Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd NameLoad Str orelse If NameLoad body For NameStore NameLoad body For NameStore NameLoad body Assign NameStore BinOpMod NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Str If Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str body Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd NameLoad Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str For NameStore Call NameLoad NameLoad Str body Assign TupleStore NameStore NameStore NameStore NameStore SubscriptLoad Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Slice Num Assign TupleStore NameStore NameStore TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad If CompareLt BinOpSub NameLoad NameLoad NameLoad body Continue Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad Str attr Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd Call AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareLt Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd Call AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore BinOpMod Str TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd Call AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod Str Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd Call AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return Call AttributeLoad NameLoad attr decorator_list Assign NameStore ListLoad TupleLoad Str Str TupleLoad TupleLoad Str Str TupleLoad TupleLoad Str Str TupleLoad TupleLoad Str Str TupleLoad TupleLoad Str Str TupleLoad TupleLoad Str Str TupleLoad TupleLoad Str Str TupleLoad TupleLoad Str Str TupleLoad TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str Assign TupleStore NameStore NameStore TupleLoad Dict Dict For TupleStore NameStore NameStore NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad Str Assign NameStore ListLoad For NameStore NameLoad body If SubscriptLoad NameLoad Index NameLoad body Expr Call AttributeLoad NameLoad attr ListComp BinOpMod Str TupleLoad NameLoad NameLoad comprehension NameStore SubscriptLoad NameLoad Index NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpMod Str Call AttributeLoad Str attr NameLoad Str For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad With Call NameLoad NameLoad NameStore body For NameStore NameLoad body If CompareIn Str NameLoad body Break For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr Index Num Break Assign NameStore ListLoad SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareEq Call NameLoad NameLoad Num body Assign NameStore Str orelse Assign NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad If CompareGtE NameLoad Num body Assert CompareEq Call NameLoad NameLoad NameLoad BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad Str attr NameLoad Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd Call AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore BinOpAdd NameLoad Str Assign NameStore BinOpAdd NameLoad Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Return Assign NameStore Call NameLoad NameLoad Assert CompareNotEq NameLoad NameLoad BinOpMod Str NameLoad Assign NameStore ListLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad Str Assign NameStore ListLoad BinOpDiv NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad Str attr TupleLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Num Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr With Call NameLoad NameLoad Str NameStore body For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str body Continue If Call AttributeLoad NameLoad attr Str body Continue AugAssignAdd AttributeStore NameLoad attr Num Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice Num attr Str If CompareEq Call NameLoad NameLoad Num body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameLoad orelse If CompareEq Call NameLoad NameLoad Num body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameLoad Assign NameStore Num orelse Raise Call NameLoad BinOpMod Str NameLoad Assign TupleStore NameStore NameStore NameStore NameStore TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad If BoolOpOr CompareGt NameLoad NameLoad CompareLt NameLoad NameLoad CompareLt NameLoad NameLoad body AugAssignAdd AttributeStore NameLoad attr Num Continue Assign TupleStore NameStore NameStore TupleLoad BinOpSub Call NameLoad NameLoad Num Call NameLoad NameLoad Assert CompareLt NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Num Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad Str attr Call NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad BinOpSub BinOpAdd NameLoad NameLoad Num NameLoad Str AugAssignAdd NameStore Num AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd Call AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore BinOpMod Str NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd Call AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Str Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd Call AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad Return Assign NameStore Str Assign NameStore Str orelse If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad Return Assign NameStore Str Assign NameStore Str orelse If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str If Call AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr Return Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad NameLoad If CompareNotEq NameLoad NameLoad body AugAssignAdd NameStore NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore NameLoad If NameLoad body Assign NameStore BinOpMod Str NameLoad orelse Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad BinOpAdd Call AttributeLoad Call NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults ListLoad body Expr Str Assert BoolOpOr CompareEq Call NameLoad NameLoad Num CompareEq Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num If NameLoad body For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Num BinOpSub NameLoad NameLoad Call NameLoad Num BinOpSub NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body If AttributeLoad NameLoad attr body Continue AugAssignAdd NameStore Num Assign NameStore Call NameLoad Num BinOpSub BinOpSub AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad BinOpAdd BinOpSub AttributeLoad NameLoad attr NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Slice NameLoad NameLoad Num Assign TupleStore NameStore NameStore TupleLoad Call NameLoad Num BinOpAdd NameLoad NameLoad Call NameLoad Num BinOpAdd NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Continue AugAssignAdd NameStore Num Assign NameStore Call NameLoad Num BinOpSub BinOpSub BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad BinOpAdd BinOpSub BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Slice NameLoad NameLoad Num orelse For NameStore NameLoad body For NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body AugAssignAdd NameStore Num Assign NameStore Call NameLoad Num BinOpSub AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad BinOpAdd BinOpSub AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AugAssignAdd SubscriptStore NameLoad Slice NameLoad NameLoad Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assert CompareGt NameLoad Num BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Call NameLoad Num NameLoad Index CompareGtE NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd NameLoad SubscriptLoad NameLoad Index BinOpFloorDiv NameLoad Num Return TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign TupleStore NameStore NameStore TupleLoad ListLoad ListLoad For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Slice UnaryOpUSub Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameStore NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd Str Call AttributeLoad Str attr NameLoad Str For NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad Str Str body Assign NameStore ListLoad For NameStore NameLoad body TryExcept body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str Continue If CompareEq Call NameLoad NameLoad Num body Assign NameStore Str orelse Assign NameStore Call NameLoad Call NameLoad ListComp SubscriptLoad NameLoad Index Num comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Call NameLoad NameLoad Str Call AttributeLoad Str attr NameLoad Str Expr Call AttributeLoad NameLoad attr decorator_list
N/A N/A ChIP-Seq tasks associated with intervals.
 N/A sys N/A tempfile N/A optparse N/A shutil N/A itertools N/A csv N/A math N/A random N/A re N/A glob N/A os N/A shutil N/A collections N/A sqlite3 N/A cStringIO N/A CGAT.Experiment E N/A CGAT.Pipeline P N/A csv N/A CGAT.IndexedFasta IndexedFasta N/A CGAT.IndexedGenome IndexedGenome N/A CGAT.FastaIterator FastaIterator N/A CGAT.Genomics Genomics N/A CGAT.IOTools IOTools N/A CGAT.MAST MAST N/A CGAT.GTF GTF N/A CGAT.GFF GFF N/A CGAT.Bed Bed N/A CGAT.Stats Stats N/A pysam N/A numpy N/A gzip N/A fileinput N/A N/A N/A P getParameters N/A N/A %s/pipeline.ini N/A N/A N/A N/A os path splitext __file__ N/A 0 ../pipeline.ini pipeline.ini N/A PARAMS N/A P PARAMS N/A N/A N/A N/A os path exists conf.py N/A N/A N/A N/A E info reading additional configuration from conf.py N/A N/A execfile conf.py getPeakShift N/A N/A infile N/A N/A N/A get peak shift for filename infile (.macs output file).

    returns None if no shift found N/A shift None N/A N/A open infile r ins N/A N/A rx N/A N/A re compile #2   d: (\d+) N/A line ins N/A N/A x N/A N/A rx search line N/A x N/A N/A shift N/A int N/A N/A N/A x groups N/A 0 N/A N/A shift N/A getMappedReads N/A N/A infile N/A N/A N/A return number of reads mapped.
     N/A lines N/A open infile r N/A N/A data N/A N/A N/A lines N/A -1 split N/A N/A N/A N/A data N/A 1 startswith without duplicates N/A N/A N/A int N/A data N/A 0 N/A N/A getMinimumMappedReads N/A N/A infiles N/A N/A N/A find the minimum number of mapped reads in infiles. N/A v N/A N/A infile infiles N/A N/A x N/A getMappedReads infile N/A x N/A N/A N/A N/A v append x N/A N/A N/A len v 0 N/A N/A N/A N/A P PipelineError N/A could not find mapped reads in files %s N/A str infiles N/A N/A min v N/A buildNormalizedBAM N/A N/A infiles outfile normalize N/A True N/A N/A build a normalized BAM file.

    Infiles are merged and duplicated reads are removed. 
    If *normalize* is set, reads are removed such that all 
    files will have approximately the same number of reads.
     N/A min_reads N/A getMinimumMappedReads N/A N/A glob glob *.readstats N/A samfiles N/A N/A num_reads 0 N/A N/A infile statsfile infiles N/A N/A N/A N/A samfiles append N/A N/A pysam Samfile infile rb N/A num_reads N/A getMappedReads statsfile N/A threshold N/A N/A float min_reads num_reads N/A pysam_out N/A N/A pysam Samfile outfile wb template N/A samfiles N/A 0 N/A N/A ninput noutput nduplicates N/A 0 0 0 N/A N/A last_contig last_pos N/A None None N/A pysam_in samfiles N/A N/A read N/A N/A pysam_in fetch N/A N/A ninput 1 N/A N/A N/A N/A read rname last_contig N/A N/A read pos last_pos N/A N/A nduplicates 1 N/A N/A N/A normalize N/A N/A N/A random random threshold N/A N/A N/A N/A pysam_out write read N/A noutput 1 N/A N/A last_contig last_pos N/A N/A read rname N/A read pos N/A N/A N/A pysam_in close N/A N/A N/A pysam_out close N/A logs N/A open N/A outfile .log w N/A N/A N/A logs write N/A # min_reads=%i, threshold= %5.2f
 N/A min_reads threshold N/A N/A N/A logs write set	counts	percent
 N/A N/A N/A logs write N/A ninput	%i	%5.2f%%
 N/A ninput 100.0 N/A nwithout_dups N/A ninput nduplicates N/A N/A N/A logs write N/A duplicates	%i	%5.2f%%
 N/A nduplicates N/A N/A 100.0 nduplicates ninput N/A N/A N/A logs write N/A without duplicates	%i	%5.2f%%
 N/A nwithout_dups N/A N/A 100.0 nwithout_dups ninput N/A N/A N/A logs write N/A target	%i	%5.2f%%
 N/A min_reads N/A N/A 100.0 min_reads nwithout_dups N/A N/A N/A logs write N/A noutput	%i	%5.2f%%
 N/A noutput N/A N/A 100.0 noutput nwithout_dups N/A N/A N/A logs close N/A N/A N/A len samfiles 1 N/A N/A tmpfilename N/A N/A P getTempFilename N/A N/A N/A pysam sort outfile tmpfilename N/A N/A N/A shutil move N/A tmpfilename .bam outfile N/A N/A N/A os unlink tmpfilename N/A N/A N/A pysam index outfile N/A N/A N/A P info N/A buildNormalizedBam: %i input, %i output (%5.2f%%), should be %i N/A ninput noutput N/A N/A 100.0 noutput ninput min_reads N/A buildBAMStats N/A N/A infile outfile N/A N/A N/A calculate bamfile statistics
     N/A outs N/A open outfile w N/A N/A N/A outs write reads	category
 N/A line N/A N/A pysam flagstat infile N/A N/A data N/A N/A N/A line N/A -1 split N/A N/A N/A outs write N/A %s	%s
 N/A N/A data N/A 0 N/A N/A join N/A data N/A 1 N/A pysam_in N/A N/A pysam Samfile infile rb N/A outs_dupl N/A open N/A outfile .duplicates w N/A N/A N/A outs_dupl write contig	pos	counts
 N/A outs_hist N/A open N/A outfile .histogram w N/A N/A N/A outs_hist write duplicates	counts	cumul	freq	cumul_freq
 N/A N/A last_contig last_pos N/A None None N/A N/A ninput nduplicates N/A 0 0 N/A duplicates N/A N/A collections defaultdict int N/A counts N/A N/A collections defaultdict int N/A count 0 N/A read N/A N/A pysam_in fetch N/A N/A ninput 1 N/A N/A N/A N/A read rname last_contig N/A N/A read pos last_pos N/A N/A count 1 N/A nduplicates 1 N/A N/A N/A count 1 N/A N/A N/A N/A outs_dupl write N/A %s	%i	%i
 N/A last_contig last_pos count N/A N/A counts N/A count 1 N/A count 1 N/A N/A last_contig last_pos N/A N/A read rname N/A read pos N/A N/A N/A outs write N/A %i	duplicates (%5.2f%%)
 N/A nduplicates N/A N/A 100.0 nduplicates ninput N/A N/A N/A outs write N/A %i	without duplicates (%5.2f%%)
 N/A N/A ninput nduplicates N/A N/A 100.0 N/A ninput nduplicates ninput N/A N/A N/A pysam_in close N/A N/A N/A outs close N/A N/A N/A outs_dupl close N/A keys N/A N/A counts keys N/A c 0 N/A total N/A sum N/A N/A counts values N/A k N/A sorted keys N/A N/A c N/A counts N/A k N/A N/A N/A outs_hist write N/A %i	%i	%i	%f	%f
 N/A k N/A counts N/A k c N/A N/A 100.0 N/A counts N/A k total N/A N/A 100.0 c total N/A N/A N/A outs_hist close N/A exportIntervalsAsBed N/A N/A infile outfile N/A N/A N/A export sequences for all intervals. N/A dbhandle N/A N/A sqlite3 connect N/A PARAMS N/A database N/A N/A N/A infile endswith _macs.import N/A N/A track N/A infile N/A N/A N/A len _macs.import N/A N/A track N/A infile N/A N/A N/A len _intervals.import N/A N/A N/A track startswith control N/A N/A N/A cc N/A N/A dbhandle cursor N/A statement N/A SELECT contig, start, end, interval_id, peakval FROM %s_intervals ORDER by contig, start track N/A N/A N/A cc execute statement N/A outs N/A open outfile w N/A result cc N/A N/A N/A contig start end interval_id peakval result N/A peakval N/A int N/A min peakval 1000 N/A N/A N/A outs write N/A %s	%i	%i	%s	%i
 N/A contig start end N/A str interval_id peakval N/A N/A N/A cc close N/A N/A N/A outs close N/A exportPeaksAsBed N/A N/A infile outfile N/A N/A N/A export sequences for all peaks. N/A dbhandle N/A N/A sqlite3 connect N/A PARAMS N/A database N/A N/A N/A infile endswith _macs.import N/A N/A track N/A infile N/A N/A N/A len _macs.import N/A N/A track N/A infile N/A N/A N/A len _intervals.import N/A N/A N/A track startswith control N/A N/A N/A peakwidth N/A PARAMS N/A peakwidth N/A cc N/A N/A dbhandle cursor N/A statement N/A SELECT contig, peakcenter - %(peakwidth)i, peakcenter + %(peakwidth)i,
                          interval_id, peakval FROM %(track)s_intervals ORDER by contig, start N/A locals N/A N/A N/A cc execute statement N/A outs N/A open outfile w N/A result cc N/A N/A N/A contig start end interval_id peakval result N/A peakval N/A int N/A min peakval 1000 N/A N/A N/A outs write N/A %s	%i	%i	%s	%i
 N/A contig start end N/A str interval_id peakval N/A N/A N/A cc close N/A N/A N/A outs close N/A importCombinedIntervals N/A N/A infile outfile N/A N/A N/A import combined intervals.

    Also, re-evaluate the intervals by counting reads within
    the interval. In contrast to the initial pipeline, the
    genome is not binned. In particular, the meaning of the
    columns in the table changes to:

    nProbes: number of reads in interval
    PeakCenter: position with maximum number of reads in interval
    AvgVal: average coverage within interval

    If *replicates* is true, only replicates will be considered
    for the counting. Otherwise the counts aggregate both replicates
    and conditions.
     N/A tmpfile N/A N/A tempfile NamedTemporaryFile delete False N/A headers N/A AvgVal DisttoStart GeneList Length PeakCenter PeakVal Position interval_id nCpGs nGenes nPeaks nProbes nPromoters contig start end N/A N/A N/A tmpfile write N/A N/A N/A join headers N/A N/A avgval contig disttostart end genelist length peakcenter peakval position start interval_id ncpgs ngenes npeaks nprobes npromoters N/A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 N/A N/A samfiles offsets N/A N/A N/A N/A track N/A infile N/A N/A N/A len .bed N/A N/A cellline condition replicate N/A splitTrack track N/A N/A cellline condition N/A N/A replicate REPLICATES N/A N/A fn N/A FILEPATTERN N/A locals N/A N/A N/A samfiles append N/A N/A pysam Samfile N/A fn .norm.bam rb N/A N/A N/A N/A os path exists N/A fn .macs N/A N/A N/A N/A offsets append N/A getPeakShift N/A fn .macs N/A N/A condition N/A N/A cellline CELLLINES N/A N/A replicate REPLICATES N/A N/A fn N/A FILEPATTERN N/A locals N/A N/A N/A samfiles append N/A N/A pysam Samfile N/A fn .norm.bam rb N/A N/A N/A N/A os path exists N/A fn .macs N/A N/A N/A N/A offsets append N/A getPeakShift N/A fn .macs N/A mlength N/A int N/A PARAMS N/A merge_min_interval_length N/A line N/A open infile r N/A N/A N/A contig start end interval_id N/A N/A N/A N/A line N/A -1 split N/A 4 N/A N/A start end N/A N/A int start N/A int end N/A N/A N/A end start mlength N/A N/A N/A N/A npeaks peakcenter length avgval peakval nprobes N/A countPeaks contig start end samfiles offsets N/A N/A N/A tmpfile write N/A N/A N/A join N/A map str N/A avgval disttostart genelist length peakcenter peakval position interval_id ncpgs ngenes npeaks nprobes npromoters contig start end N/A N/A N/A tmpfile close N/A tmpfilename N/A tmpfile name N/A statement 
   python %(scriptsdir)s/csv2db.py %(csv2db_options)s               --index=interval_id               --table=%(track)s_intervals     < %(tmpfilename)s > %(outfile)s
     N/A N/A N/A P run N/A dict N/A N/A N/A N/A locals items N/A N/A PARAMS items N/A N/A N/A os unlink N/A tmpfile name N/A mergeBedFiles N/A N/A infiles outfile N/A N/A N/A generic method for merging bed files.
     N/A N/A N/A len infiles 2 N/A N/A N/A ValueError N/A expected at least two files to merge into %s outfile N/A infile N/A N/A join infiles N/A statement 
        cat %(infile)s |        mergeBed -i stdin |        cut -f 1-3 |        awk '{printf("%%s\t%%i\n",$0, ++a); }'
        > %(outfile)s 
         N/A N/A N/A P run N/A dict N/A N/A N/A N/A locals items N/A N/A PARAMS items N/A intersectBedFiles N/A N/A infiles outfile N/A N/A N/A generic method for merging bed files.
     N/A N/A N/A len infiles 2 N/A N/A N/A ValueError N/A expected two files to merge into %s outfile N/A statement N/A 
        intersectBed -a %s -b %s |        cut -f 1,2,3,4,5 |        awk 'BEGIN { OFS="\t"; } {$4=++a; print;}'
        > %%(outfile)s 
         N/A N/A infiles N/A 0 N/A infiles N/A 1 N/A N/A N/A P run N/A dict N/A N/A N/A N/A locals items N/A N/A PARAMS items N/A subtractBedFiles N/A N/A infile subtractfile outfile N/A N/A N/A subtract intervals in *subtractfile* from *infile*
    and store in *outfile*.
     N/A statement N/A 
        intersectBed -v -a %(infile)s -b %(subtractfile)s |        cut -f 1,2,3,4,5 |        awk 'BEGIN { OFS="\t"; } {$4=++a; print;}'
        > %%(outfile)s 
         N/A locals N/A N/A N/A P run N/A dict N/A N/A N/A N/A locals items N/A N/A PARAMS items N/A summarizeMACS N/A N/A infiles outfile N/A N/A N/A run MACS for peak detection. __get N/A N/A line stmt N/A N/A N/A x N/A N/A line search stmt N/A x N/A N/A N/A N/A x groups N/A N/A map_targets N/A N/A unique tags in treatment: (\d+) tag_treatment_unique N/A N/A total tags in treatment: (\d+) tag_treatment_total N/A N/A unique tags in control: (\d+) tag_control_unique N/A N/A total tags in control: (\d+) tag_control_total N/A N/A #2 number of paired peaks: (\d+) paired_peaks N/A N/A #2   min_tags: (\d+) min_tags N/A N/A #2   d: (\d+) shift N/A N/A #2   scan_window: (\d+) scan_window N/A N/A #3 Total number of candidates: (\d+) ncandidates N/A positive negative N/A #3 Finally, (\d+) peaks are called! called N/A positive negative N/A N/A mapper mapper_header N/A N/A N/A N/A N/A x y z map_targets N/A N/A N/A mapper N/A y N/A N/A re compile x N/A N/A mapper_header N/A y z N/A keys N/A N/A x N/A 1 N/A x map_targets N/A outs N/A open outfile w N/A headers N/A N/A k keys N/A N/A N/A mapper_header N/A k N/A N/A N/A N/A headers extend N/A N/A %s_%s N/A k x N/A x N/A mapper_header N/A k N/A N/A N/A N/A headers append k N/A N/A N/A outs write N/A N/A track	%s N/A N/A join headers N/A infile infiles N/A N/A results N/A N/A collections defaultdict list N/A N/A open infile f N/A N/A line f N/A N/A N/A diag: line N/A N/A N/A N/A x y N/A N/A mapper items N/A N/A s N/A N/A y search line N/A s N/A N/A N/A N/A N/A results N/A x append N/A N/A N/A s groups N/A 0 N/A N/A row N/A N/A infile N/A N/A N/A len .macs N/A key keys N/A N/A val N/A results N/A key N/A N/A N/A len val 0 N/A N/A v na N/A N/A c N/A len N/A mapper_header N/A key N/A N/A c 1 N/A N/A N/A N/A len val c N/A key=%s, expected=%i, got=%i, val=%s, c=%s N/A key N/A len val c N/A str val N/A mapper_header N/A key N/A v N/A N/A join val N/A N/A N/A row append v N/A N/A N/A outs write N/A N/A N/A join row N/A N/A N/A outs close N/A importMACSSummary N/A N/A infile outfile N/A N/A N/A import regions of interest. N/A table N/A outfile N/A N/A N/A len .import N/A statement 
   python %(scriptsdir)s/csv2db.py %(csv2db_options)s               --index=track               --table=%(table)s     < %(infile)s > %(outfile)s
     N/A N/A N/A P run N/A dict N/A N/A N/A N/A locals items N/A N/A PARAMS items N/A importMACS N/A N/A infile outfile suffix N/A .norm.bam N/A N/A import MACS results.

    Imports only positive peaks. It filters peaks by p-value,
    q-value and fold change and imports the diagnostic data.

    Does re-counting of peakcenter, peakval, ... using
    the normalized tag counts.
     N/A track N/A infile N/A N/A N/A len .macs N/A infilename N/A infile _peaks.xls N/A filename_diag N/A infile _diag.xls N/A filename_r N/A infile _model.r N/A N/A N/A N/A N/A os path exists infilename N/A N/A N/A N/A E warn N/A could not find %s infilename N/A outs N/A open outfile w N/A N/A N/A outs close N/A N/A shift N/A getPeakShift infile N/A N/A shift None N/A could not determine peak shift from MACS file %s infile N/A samfiles N/A N/A N/A pysam Samfile N/A track suffix rb N/A offsets N/A N/A shift 2 N/A outtemp N/A N/A P getTempFile N/A N/A N/A outtemp write N/A N/A N/A join N/A interval_id contig start end npeaks peakcenter length avgval peakval nprobes pvalue fold qvalue macs_summit macs_nprobes N/A id 0 N/A max_qvalue N/A float N/A PARAMS N/A macs_max_qvalue N/A min_pvalue N/A float N/A PARAMS N/A macs_min_pvalue N/A min_fold N/A float N/A PARAMS N/A macs_min_fold N/A counter N/A N/A E Counter N/A N/A open infilename r ins N/A N/A line ins N/A N/A N/A N/A line startswith # N/A N/A N/A N/A N/A line startswith chr	start N/A N/A N/A N/A counter input 1 N/A data N/A N/A N/A line N/A -1 split N/A N/A N/A len data 9 N/A N/A N/A contig start end length summit ntags pvalue fold qvalue data N/A N/A N/A N/A len data 8 N/A N/A N/A contig start end length summit ntags pvalue fold data N/A qvalue 1.0 N/A N/A N/A ValueError N/A could not parse line %s line N/A N/A pvalue qvalue summit fold N/A N/A float pvalue N/A float qvalue N/A int summit N/A float fold N/A N/A N/A qvalue max_qvalue N/A pvalue min_pvalue N/A fold min_fold N/A N/A N/A counter skipped 1 N/A N/A N/A start end N/A N/A N/A int start 1 N/A int end N/A N/A start end N/A start N/A max start 0 N/A N/A npeaks peakcenter length avgval peakval nreads N/A countPeaks contig start end samfiles offsets N/A N/A N/A outtemp write N/A N/A N/A join N/A map str N/A id contig start end npeaks peakcenter length avgval peakval nreads pvalue fold qvalue N/A N/A start summit 1 ntags N/A id 1 N/A N/A counter output 1 N/A N/A N/A outtemp close N/A tablename N/A %s_intervals track N/A tmpfilename N/A outtemp name N/A statement 
   python %(scriptsdir)s/csv2db.py %(csv2db_options)s               --index=interval_id               --table=%(tablename)s     < %(tmpfilename)s > %(outfile)s
     N/A N/A N/A P run N/A dict N/A N/A N/A N/A locals items N/A N/A PARAMS items N/A N/A N/A N/A os path exists filename_diag N/A N/A tablename N/A %s_macsdiag track N/A statement 
        sed "s/FC range.*/fc\tnpeaks\tp90\tp80\tp70\tp60\tp50\tp40\tp30\tp20/" < %(filename_diag)s |       python %(scriptsdir)s/csv2db.py %(csv2db_options)s                   --map=fc:str                   --table=%(tablename)s         > %(outfile)s
         N/A N/A N/A P run N/A dict N/A N/A N/A N/A locals items N/A N/A PARAMS items N/A N/A N/A N/A os path exists filename_r N/A N/A target_path N/A N/A N/A os path join N/A N/A os getcwd doc _static MACS N/A N/A N/A N/A N/A os makedirs target_path N/A N/A N/A OSError N/A N/A N/A statement 
        R --vanilla < %(track)s.macs_model.r > %(outfile)s
         N/A N/A N/A P run N/A dict N/A N/A N/A N/A locals items N/A N/A PARAMS items N/A N/A N/A shutil copyfile N/A %s.macs_model.pdf track N/A N/A N/A os path join target_path N/A %s_model.pdf track N/A N/A N/A os unlink tmpfilename N/A N/A N/A E info N/A %s: %s N/A track N/A str counter N/A runMACS N/A N/A infile outfile N/A N/A N/A run MACS for peak detection.

    The output bed files contain the P-value as their score field.
     N/A to_cluster True N/A N/A N/A infile endswith .norm.bam N/A N/A track N/A infile N/A N/A N/A len .norm.bam N/A N/A N/A track startswith control N/A N/A N/A N/A P touch outfile N/A N/A format bam N/A suffix .norm.bam N/A N/A N/A N/A infile endswith .bam N/A N/A track N/A infile N/A N/A N/A len .bam N/A N/A N/A track startswith control N/A N/A N/A N/A P touch outfile N/A N/A format bam N/A suffix .norm.bam N/A N/A N/A N/A infile endswith .bed.gz N/A N/A track N/A infile N/A N/A N/A len .bed.gz N/A N/A N/A track startswith control N/A N/A outs N/A open outfile w N/A N/A N/A outs close N/A N/A format bed N/A suffix .bed.gz N/A control N/A getControl track N/A N/A control None N/A N/A control suffix N/A N/A N/A N/A E info N/A %s: no control for track %s N/A outfile track N/A control None N/A control N/A N/A control N/A -c %s control N/A N/A control N/A statement 
    macs -t %(infile)s %(control)s     --diag     --name=%(outfile)s     --format=%(format)s     %(macs_options)s >& %(outfile)s N/A N/A N/A P run N/A dict N/A N/A N/A N/A locals items N/A N/A PARAMS items N/A getCounts N/A N/A contig start end samfiles offsets N/A N/A N/A N/A count reads per position. N/A N/A N/A N/A len offsets 0 N/A N/A len samfiles N/A len offsets N/A length N/A end start N/A counts N/A N/A numpy zeros length N/A nreads 0 N/A offsets N/A N/A N/A samfile offset N/A zip samfiles offsets N/A N/A N/A xstart xend N/A N/A max 0 N/A start offset N/A max 0 N/A end offset N/A read N/A N/A samfile fetch contig xstart xend N/A N/A N/A read is_reverse N/A N/A N/A nreads 1 N/A rstart N/A max 0 N/A N/A N/A read pos xstart offset N/A rend N/A min length N/A N/A N/A read pos xstart offset N/A N/A counts N/A rstart rend 1 N/A N/A xstart xend N/A N/A max 0 N/A start offset N/A max 0 N/A end offset N/A read N/A N/A samfile fetch contig xstart xend N/A N/A N/A N/A read is_reverse N/A N/A N/A nreads 1 N/A rstart N/A max 0 N/A N/A N/A N/A read pos N/A read rlen xstart offset N/A rend N/A min length N/A N/A N/A N/A read pos N/A read rlen xstart offset N/A N/A counts N/A rstart rend 1 N/A N/A samfile samfiles N/A N/A read N/A N/A samfile fetch contig start end N/A N/A nreads 1 N/A rstart N/A max 0 N/A N/A read pos start N/A rend N/A min length N/A N/A N/A read pos start N/A read rlen N/A N/A counts N/A rstart rend 1 N/A N/A nreads counts N/A countPeaks N/A N/A contig start end samfiles offsets N/A None N/A N/A update peak values within interval contig:start-end.

    If offsets is given, tags are moved by the offset
    before summarizing.
     N/A N/A nreads counts N/A getCounts contig start end samfiles offsets N/A N/A nreads 0 N/A no reads in interval %s:%i-%i N/A contig start end N/A length N/A end start N/A nprobes nreads N/A avgval N/A N/A numpy mean counts N/A peakval N/A max counts N/A peaks N/A N/A N/A numpy array N/A range 0 length N/A N/A counts peakval N/A npeaks N/A len peaks N/A peakcenter N/A start N/A peaks N/A N/A npeaks 2 N/A N/A npeaks peakcenter length avgval peakval nreads N/A makeIntervalCorrelation N/A N/A infiles outfile field N/A N/A N/A compute correlation of interval properties between sets
     N/A dbhandle N/A N/A sqlite3 connect N/A PARAMS N/A database N/A N/A tracks idx N/A N/A N/A N/A infile infiles N/A N/A track N/A infile N/A N/A N/A len .bed N/A cc N/A N/A dbhandle cursor N/A statement N/A SELECT contig, start, end, %(field)s FROM %(track)s_intervals N/A locals N/A N/A N/A cc execute statement N/A ix N/A N/A IndexedGenome IndexedGenome N/A N/A contig start end peakval cc N/A N/A N/A N/A ix add contig start end peakval N/A N/A N/A idx append ix N/A N/A N/A tracks append track N/A outs N/A open outfile w N/A N/A N/A outs write N/A N/A id	contig	start	end	 N/A N/A join tracks N/A bed N/A N/A Bed iterator infile N/A open merged.bed r N/A N/A row N/A N/A ix idx N/A N/A N/A N/A intervals N/A list N/A N/A ix get N/A bed contig N/A bed start N/A bed end N/A N/A N/A KeyError N/A N/A N/A N/A row append N/A N/A N/A N/A len intervals 0 N/A N/A peakval N/A N/A peakval N/A str N/A max N/A N/A x N/A 2 N/A x intervals N/A N/A N/A row append peakval N/A N/A N/A outs write N/A N/A N/A N/A str bed N/A N/A join row N/A N/A N/A outs close N/A