Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad Assign NameStore BinOpDiv NameLoad NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Slice BinOpMult NameLoad NameLoad BinOpMult BinOpAdd NameLoad Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad Return TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Num BinOpSub NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Num BinOpSub NameLoad Num If CompareGt NameLoad NameLoad body Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad AugAssignAdd NameStore Num Assign NameStore SubscriptLoad NameLoad Slice NameLoad NameLoad Assign NameStore BinOpAdd BinOpAdd SubscriptLoad NameLoad Slice NameLoad SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice NameLoad Return TupleLoad Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Num BinOpSub NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Num BinOpSub NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Num BinOpSub NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Num BinOpSub NameLoad Num If CompareGt NameLoad NameLoad body Assign TupleStore NameStore NameStore TupleLoad NameLoad NameLoad AugAssignAdd NameStore Num For NameStore Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad UnaryOpUSub SubscriptLoad NameLoad Index NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Num BinOpSub NameLoad Num Assign SubscriptStore NameLoad Index NameLoad UnaryOpUSub SubscriptLoad NameLoad Index NameLoad Return TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults TupleLoad Num body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr keyword Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr keyword Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore ListComp NameLoad comprehension NameStore NameLoad UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore IfExp NameLoad Call AttributeLoad NameLoad attr NameLoad Dict Assign NameStore Num Assign NameStore Num While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assign SubscriptStore NameLoad Slice NameLoad Assign NameStore IfExp NameLoad Call AttributeLoad NameLoad attr NameLoad Dict Assign NameStore SubscriptLoad NameLoad Index Str If BoolOpAnd CompareEq BinOpMod NameLoad Num Num NameLoad body Print AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad If CompareGt NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad AugAssignAdd NameStore Num If CompareGt BinOpSub NameLoad NameLoad NameLoad body Break Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num Num Num NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad NameLoad NameLoad If CompareGt NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call NameLoad NameLoad NameLoad Num Num NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index Num If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Return TupleLoad NameLoad AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Assign TupleStore NameStore NameStore TupleLoad Num Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Slice Num Num SubscriptLoad SubscriptLoad NameLoad Slice Num Num Slice Num Assign SubscriptStore NameLoad Slice Num Num SubscriptLoad SubscriptLoad NameLoad Slice Num Num Slice Num Print NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad keyword NameLoad Assign TupleStore NameStore AttributeStore NameLoad attr Call NameLoad NameLoad keyword Num Print NameLoad AttributeLoad NameLoad attr
N/A N/A 
This module contains methods to interface with DEAP evolutionary computation
framewor, including a Genetic Algorithm (GA) based method to solve scaffold
ordering and orientation problem.
 N/A sys N/A array N/A random N/A logging N/A multiprocessing deap base creator tools deap.algorithms varAnd jcvi.algorithms.lis longest_monotonic_subseq_length make_data N/A N/A POINTS SCF N/A N/A N/A seq N/A range POINTS N/A scaffolds N/A N/A batch N/A POINTS SCF N/A i N/A xrange SCF N/A N/A p N/A seq N/A N/A i batch N/A N/A i 1 batch N/A N/A N/A scaffolds append p N/A scaffolds N/A colinear_evaluate N/A N/A tour scaffolds N/A N/A N/A series N/A N/A t tour N/A N/A N/A N/A series extend N/A scaffolds N/A t N/A N/A score diff N/A longest_monotonic_subseq_length series N/A N/A score N/A genome_mutation N/A N/A candidate N/A N/A N/A Return the mutants created by inversion mutation on the candidates.

    This function performs inversion or insertion. It randomly chooses two
    locations along the candidate and reverses the values within that
    slice. Insertion is done by popping one item and insert it back at random
    position.
     N/A size N/A len candidate N/A prob N/A N/A random random N/A N/A prob 0.5 N/A N/A p N/A N/A random randint 0 N/A size 1 N/A q N/A N/A random randint 0 N/A size 1 N/A N/A p q N/A N/A N/A p q N/A q p N/A q 1 N/A s N/A candidate N/A p q N/A x N/A N/A N/A candidate N/A p N/A s N/A -1 N/A candidate N/A q N/A N/A N/A N/A creator Individual x N/A N/A p N/A N/A random randint 0 N/A size 1 N/A q N/A N/A random randint 0 N/A size 1 N/A cq N/A N/A candidate pop q N/A N/A N/A candidate insert p cq N/A N/A candidate N/A genome_mutation_orientation N/A N/A candidate N/A N/A N/A size N/A len candidate N/A prob N/A N/A random random N/A N/A prob 0.5 N/A N/A p N/A N/A random randint 0 N/A size 1 N/A q N/A N/A random randint 0 N/A size 1 N/A N/A p q N/A N/A N/A p q N/A q p N/A q 1 N/A x N/A xrange p q N/A N/A N/A candidate N/A x N/A N/A candidate N/A x N/A N/A p N/A N/A random randint 0 N/A size 1 N/A N/A candidate N/A p N/A N/A candidate N/A p N/A N/A candidate N/A GA_setup N/A N/A guess weights N/A N/A 1.0 N/A N/A N/A N/A creator create FitnessMax N/A base Fitness weights weights N/A N/A N/A creator create Individual N/A array array typecode i fitness N/A creator FitnessMax N/A toolbox N/A N/A base Toolbox N/A N/A N/A toolbox register individual N/A creator Individual guess N/A N/A N/A toolbox register population N/A tools initRepeat list N/A toolbox individual N/A N/A N/A toolbox register mate N/A tools cxPartialyMatched N/A N/A N/A toolbox register mutate genome_mutation N/A N/A N/A toolbox register select N/A tools selTournament tournsize 3 N/A toolbox N/A eaSimpleConverge N/A N/A population toolbox cxpb mutpb ngen stats halloffame callback verbose N/A None None None True N/A N/A This algorithm reproduce the simplest evolutionary algorithm as
    presented in chapter 7 of [Back2000]_.

    Modified to allow checking if there is no change for ngen, as a simple
    rule for convergence. Interface is similar to eaSimple(). However, in
    eaSimple, ngen is total number of iterations; in eaSimpleConverge, we
    terminate only when the best is NOT updated for ngen iterations.
     N/A invalid_ind N/A ind N/A ind population N/A N/A N/A ind fitness valid N/A fitnesses N/A N/A toolbox map N/A toolbox evaluate invalid_ind N/A N/A ind fit N/A zip invalid_ind fitnesses N/A N/A N/A N/A ind fitness values fit N/A N/A halloffame None N/A N/A N/A N/A halloffame update population N/A record N/A stats N/A N/A stats compile population N/A N/A gen 1 N/A best 0 N/A True N/A N/A offspring N/A N/A toolbox select population N/A len population N/A offspring N/A varAnd offspring toolbox cxpb mutpb N/A invalid_ind N/A ind N/A ind offspring N/A N/A N/A ind fitness valid N/A fitnesses N/A N/A toolbox map N/A toolbox evaluate invalid_ind N/A N/A ind fit N/A zip invalid_ind fitnesses N/A N/A N/A N/A ind fitness values fit N/A N/A halloffame None N/A N/A N/A N/A halloffame update offspring N/A N/A callback None N/A N/A N/A callback N/A halloffame N/A 0 gen N/A N/A population N/A offspring N/A record N/A stats N/A N/A stats compile population N/A N/A current_best N/A record N/A max N/A N/A N/A N/A gen 20 0 verbose N/A N/A N/A sys stderr N/A N/A Current iteration {0}: max_score={1} format gen current_best N/A N/A current_best best N/A N/A best current_best N/A updated gen N/A gen 1 N/A N/A N/A gen updated ngen N/A N/A N/A population N/A GA_run N/A N/A toolbox ngen npop seed cpus callback N/A 500 100 666 1 None N/A N/A N/A N/A logging debug N/A N/A GA setup: ngen={0} npop={1} cpus={2} seed={3} format ngen npop cpus seed N/A N/A cpus 1 N/A N/A pool N/A N/A multiprocessing Pool cpus N/A N/A N/A toolbox register map N/A pool map N/A N/A N/A random seed seed N/A pop N/A N/A toolbox population n npop N/A hof N/A N/A tools HallOfFame 1 N/A stats N/A N/A tools Statistics N/A N/A N/A ind N/A N/A N/A ind fitness values N/A N/A N/A stats register max max N/A N/A N/A stats register min min N/A N/A eaSimpleConverge pop toolbox 0.7 0.2 ngen stats stats halloffame hof callback callback N/A tour N/A hof N/A 0 N/A N/A cpus 1 N/A N/A N/A N/A pool terminate N/A N/A tour N/A tour fitness N/A N/A N/A __name__ __main__ N/A N/A N/A POINTS SCF N/A 200 20 N/A scaffolds N/A make_data POINTS SCF N/A guess N/A range SCF N/A N/A guess N/A 5 15 N/A N/A guess N/A 5 15 N/A -1 N/A N/A guess N/A 7 18 N/A N/A guess N/A 7 18 N/A -1 N/A guess N/A toolbox N/A GA_setup guess N/A N/A N/A toolbox register evaluate colinear_evaluate scaffolds scaffolds N/A N/A tour N/A tour fitness N/A GA_run toolbox cpus 8 N/A tour N/A tour fitness