Module Expr Str ImportFrom alias alias alias alias alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias FunctionDef arguments args defaults body Assign NameStore TupleLoad TupleLoad Str Str TupleLoad Str Str TupleLoad Str Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Expr Call AttributeLoad NameLoad attr TupleLoad Num Num TupleLoad Num Num Str keyword Num Expr Call AttributeLoad NameLoad attr TupleLoad Num Num TupleLoad Num Num Str keyword Str keyword Str keyword Num keyword Num Expr Call AttributeLoad NameLoad attr TupleLoad Num Num TupleLoad Num Num Str keyword Num Expr Call AttributeLoad NameLoad attr TupleLoad Num TupleLoad Num Str keyword Str keyword Str keyword Num keyword Num Expr Call AttributeLoad NameLoad attr TupleLoad Num TupleLoad Num Str keyword Str keyword Str keyword Num keyword Num Assign NameStore Call NameLoad TupleLoad Num Num Num keyword NameLoad keyword Num keyword Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num Assign TupleStore NameStore NameStore TupleLoad Num Num Expr Call AttributeLoad NameLoad attr Str TupleLoad NameLoad NameLoad TupleLoad NameLoad BinOpAdd NameLoad NameLoad keyword NameLoad Expr Call NameLoad NameLoad Num Num Str Expr Call NameLoad NameLoad Num Num Str Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd Call NameLoad Str Expr Call NameLoad NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Assign NameStore TupleLoad TupleLoad TupleLoad Num Num TupleLoad Num Num TupleLoad TupleLoad Num Num TupleLoad Num Num TupleLoad TupleLoad Num Num TupleLoad Num Num TupleLoad TupleLoad Num Num TupleLoad Num Num TupleLoad TupleLoad Num Num TupleLoad Num Num TupleLoad TupleLoad Num Num TupleLoad Num Num Assign NameStore TupleLoad Num Num Num Assign NameStore TupleLoad Str Str Str Assign NameStore Num Assign NameStore Num Assign NameStore Lambda arguments args NameParam defaults BinOpAdd BinOpMult BinOpDiv NameLoad NameLoad Num Num For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad Call NameLoad NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Num Expr Call AttributeLoad NameLoad attr TupleLoad Num Num TupleLoad NameLoad NameLoad Str keyword Str keyword Num keyword Num Expr Call AttributeLoad NameLoad attr TupleLoad Num Num TupleLoad NameLoad NameLoad Str keyword Str keyword Num keyword Num Expr Call NameLoad NameLoad Num BinOpAdd NameLoad BinOpMult Num NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num NameLoad Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Num NameLoad Str keyword Str keyword Str Assign NameStore NameLoad If CompareGtE NameLoad Num body Assign NameStore SubscriptLoad NameLoad Slice Num For TupleStore TupleStore NameStore NameStore TupleStore NameStore NameStore NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore ListComp Call NameLoad NameLoad comprehension NameStore TupleLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad TupleLoad NameLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad BinOpMult Num NameLoad keyword Str keyword Num keyword Num Assign NameStore Call NameLoad TupleLoad NameLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad BinOpMult Num NameLoad keyword Str keyword Num keyword Num Assign NameStore Call NameLoad TupleLoad NameLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad BinOpMult Num NameLoad keyword NameLoad keyword Num Assign NameStore Call NameLoad TupleLoad NameLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad BinOpMult Num NameLoad keyword NameLoad keyword Num Assign NameStore Call NameLoad TupleLoad TupleLoad NameLoad BinOpSub NameLoad NameLoad TupleLoad NameLoad BinOpAdd NameLoad NameLoad TupleLoad NameLoad BinOpAdd NameLoad NameLoad TupleLoad NameLoad BinOpSub NameLoad NameLoad keyword Str keyword Num Assign NameStore TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Assign NameStore SubscriptLoad NameLoad Slice Num For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore TupleLoad ListLoad ListLoad For TupleStore TupleStore NameStore NameStore TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad BinOpAdd NameLoad Num BinOpSub NameLoad Num For TupleStore TupleStore NameStore NameStore TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad BinOpAdd NameLoad Num BinOpSub NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore BinOpSub NameLoad Num For TupleStore NameStore TupleStore TupleStore NameStore NameStore TupleStore NameStore NameStore Call NameLoad NameLoad body AugAssignAdd NameStore Num Assign TupleStore NameStore NameStore NameStore NameStore ListComp Call NameLoad NameLoad comprehension NameStore TupleLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpDiv BinOpAdd BinOpAdd BinOpAdd NameLoad NameLoad NameLoad NameLoad Num Expr Call NameLoad NameLoad NameLoad NameLoad Call NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore TupleLoad TupleLoad Str NameLoad TupleLoad Str NameLoad TupleLoad Str NameLoad TupleLoad Str NameLoad For TupleStore NameStore TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore IfExp CompareEq BinOpMod NameLoad Num Num Num Num Assign NameStore BinOpSub NameLoad BinOpMult BinOpDiv NameLoad Num NameLoad AugAssignAdd NameStore Num Expr Call NameLoad NameLoad NameLoad NameLoad Call NameLoad NameLoad Assign NameStore IfExp NameLoad Str Str Expr Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad NameLoad NameLoad keyword Num keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd Call NameLoad Str Expr Call NameLoad NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Num Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Assign NameStore TupleLoad Num Num Str TupleLoad Num Assign NameStore TupleLoad Num Num Str TupleLoad Num Assign NameStore TupleLoad Num Num Str TupleLoad Num Assign NameStore TupleLoad Num Num Str TupleLoad Num Assign NameStore TupleLoad Num Num Str TupleLoad Num Num Assign NameStore TupleLoad Num Num Str TupleLoad Num Num Num Assign NameStore TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore TupleLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Assign NameStore Num Assign NameStore Num For TupleStore NameStore NameStore NameStore NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Str keyword Str Assign NameStore BinOpMult Call NameLoad NameLoad Num For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad BinOpMult NameLoad NameLoad Assign NameStore BinOpSub NameLoad BinOpMult NameLoad NameLoad Expr Call NameLoad NameLoad BinOpAdd BinOpSub NameLoad NameLoad BinOpMult NameLoad NameLoad NameLoad NameLoad keyword Num Assign NameStore TupleLoad TupleLoad Num Num Str TupleLoad Num Num Str For TupleStore NameStore NameStore NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword Num keyword Str keyword Str Assign NameStore Num For TupleStore NameStore NameStore NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad TupleLoad BinOpSub NameLoad NameLoad BinOpAdd NameLoad BinOpMult Num NameLoad Str keyword Num keyword Num Assign NameStore BinOpAdd Call NameLoad Str Expr Call NameLoad NameLoad keyword Num decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 
Scripts for the Brapa bites paper

Tang et al. (2012) Altered Patterns of Fractionation and Exon Deletions in
Brassica rapa Support a Two-Step Model of Paleohexaploidy. Genetics.
<http://www.genetics.org/content/190/4/1563.short>
 jcvi.graphics.base plt Rectangle Polygon CirclePolygon savefig jcvi.graphics.glyph RoundLabel arrowprops TextCircle jcvi.graphics.chromosome Chromosome jcvi.utils.iter pairwise jcvi.apps.base OptionParser ActionDispatcher fname main N/A N/A N/A N/A N/A actions N/A N/A excision show intra-chromosomal recombination N/A bites show the bites calling pipeline N/A scenario show step-wise genome merger events in brapa N/A p N/A ActionDispatcher actions N/A N/A N/A p dispatch N/A globals N/A excision N/A N/A args N/A N/A N/A 
    %prog excision

    Illustrate the mechanism of illegitimate recombination.
     N/A p N/A OptionParser __doc__ N/A N/A opts args N/A N/A p parse_args args N/A fig N/A N/A plt figure 1 N/A 5 5 N/A root N/A N/A fig add_axes N/A 0 0 1 1 N/A N/A N/A plt plot N/A 0.2 0.8 N/A 0.6 0.6 r- lw 3 N/A N/A N/A plt plot N/A 0.4 0.6 N/A 0.6 0.6 b>- mfc g mec w ms 12 lw 3 N/A N/A N/A plt plot N/A 0.3 0.7 N/A 0.5 0.5 r- lw 3 N/A N/A N/A plt plot N/A 0.5 N/A 0.5 b>- mfc g mec w ms 12 lw 3 N/A N/A N/A plt plot N/A 0.5 N/A 0.45 b>- mfc g mec w ms 12 lw 3 N/A circle N/A CirclePolygon N/A 0.5 0.4 0.05 fill False lw 3 ec b N/A N/A N/A root add_patch circle N/A arrow_dist 0.07 N/A N/A ar_xpos ar_ypos N/A 0.5 0.52 N/A N/A N/A root annotate N/A ar_xpos ar_ypos N/A ar_xpos N/A ar_ypos arrow_dist arrowprops arrowprops N/A N/A RoundLabel root 0.2 0.64 Gene N/A N/A RoundLabel root 0.3 0.54 Excision N/A N/A N/A root set_xlim 0 1 N/A N/A N/A root set_ylim 0 1 N/A N/A N/A root set_axis_off N/A figname N/A N/A fname .pdf N/A N/A savefig figname dpi 300 N/A bites N/A N/A args N/A N/A N/A 
    %prog bites

    Illustrate the pipeline for automated bite discovery.
     N/A p N/A OptionParser __doc__ N/A N/A opts args N/A N/A p parse_args N/A fig N/A N/A plt figure 1 N/A 6 6 N/A root N/A N/A fig add_axes N/A 0 0 1 1 N/A hsps N/A N/A N/A 50 150 N/A 60 180 N/A N/A 190 250 N/A 160 235 N/A N/A 300 360 N/A 270 330 N/A N/A 430 470 N/A 450 490 N/A N/A 570 620 N/A 493 543 N/A N/A 540 555 N/A 370 385 N/A titlepos N/A 0.9 0.65 0.4 N/A titles N/A Compare orthologous region Find collinear HSPs Scan paired gaps N/A ytip 0.01 N/A mrange 650.0 N/A m N/A N/A N/A x N/A N/A N/A N/A x mrange 0.7 0.1 N/A N/A i N/A ya title N/A enumerate N/A zip titlepos titles N/A N/A yb N/A ya 0.1 N/A N/A N/A plt plot N/A 0.1 0.8 N/A ya ya - color gray lw 2 zorder 1 N/A N/A N/A plt plot N/A 0.1 0.8 N/A yb yb - color gray lw 2 zorder 1 N/A N/A RoundLabel root 0.5 N/A ya N/A 4 ytip title N/A N/A N/A root text 0.9 ya A. thaliana ha center va center N/A N/A N/A root text 0.9 yb B. rapa ha center va center N/A myhsps hsps N/A N/A i 1 N/A N/A myhsps N/A hsps N/A -1 N/A N/A N/A a b N/A c d myhsps N/A N/A N/A a b c d N/A N/A m x N/A x N/A a b c d N/A r1 N/A Rectangle N/A a N/A ya ytip N/A b a N/A 2 ytip fc r lw 0 zorder 2 N/A r2 N/A Rectangle N/A c N/A yb ytip N/A d c N/A 2 ytip fc r lw 0 zorder 2 N/A r3 N/A Rectangle N/A a N/A ya ytip N/A b a N/A 2 ytip fill False zorder 3 N/A r4 N/A Rectangle N/A c N/A yb ytip N/A d c N/A 2 ytip fill False zorder 3 N/A r5 N/A Polygon N/A N/A a N/A ya ytip N/A c N/A yb ytip N/A d N/A yb ytip N/A b N/A ya ytip fc r alpha 0.2 N/A rr N/A r1 r2 r3 r4 r5 N/A N/A i 2 N/A N/A rr N/A rr N/A -1 N/A r rr N/A N/A N/A N/A root add_patch r N/A N/A hspa hspb N/A zip myhsps N/A N/A gapa gapb N/A N/A N/A N/A N/A N/A a b N/A c d N/A pairwise hspa N/A N/A N/A N/A gapa append N/A N/A b 1 N/A c 1 N/A N/A N/A a b N/A c d N/A pairwise hspb N/A N/A N/A N/A gapb append N/A N/A b 1 N/A c 1 N/A gaps N/A zip gapa gapb N/A tpos N/A titlepos N/A -1 N/A yy N/A tpos 0.05 N/A N/A i N/A N/A a b N/A c d N/A enumerate gaps N/A N/A i 1 N/A N/A a b c d N/A N/A m x N/A x N/A a b c d N/A xx N/A N/A N/A N/A a b c d 4 N/A N/A TextCircle root xx yy N/A str i N/A ystart 0.24 N/A ytip 0.05 N/A bites N/A N/A Bite(40=>-15) True N/A Bite(50=>35) False N/A Bite(70=>120) False N/A Bite(100=>3) True N/A N/A i N/A bite selected N/A enumerate bites N/A N/A xx N/A N/A N/A i 2 0 0.15 0.55 N/A yy N/A ystart N/A N/A i 2 ytip N/A i 1 N/A N/A TextCircle root xx yy N/A str i N/A color N/A selected k gray N/A N/A N/A root text N/A xx ytip yy bite size 10 color color va center N/A N/A N/A root set_xlim 0 1 N/A N/A N/A root set_ylim 0 1 N/A N/A N/A root set_axis_off N/A figname N/A N/A fname .pdf N/A N/A savefig figname dpi 300 N/A scenario N/A N/A args N/A N/A N/A 
    %prog scenario

    Illustration of the two-step genome merger process for B. rapa companion paper.
     N/A p N/A OptionParser __doc__ N/A N/A opts args N/A N/A p parse_args N/A fig N/A N/A plt figure 1 N/A 5 5 N/A root N/A N/A fig add_axes N/A 0 0 1 1 N/A N/A N/A root set_xlim 0 1 N/A N/A N/A root set_ylim 0 1 N/A N/A N/A root set_axis_off N/A anc N/A 0.5 0.9 Ancestor N/A 1 N/A s1 N/A 0.2 0.6 Genome I N/A 1 N/A s2 N/A 0.5 0.6 Genome II N/A 1 N/A s3 N/A 0.8 0.6 Genome III N/A 1 N/A tetra N/A 0.35 0.4 Tetraploid I / II N/A 0.5 0.9 N/A hexa N/A 0.5 0.1 Hexaploid I / II / III N/A 0.36 0.46 0.9 N/A labels N/A anc s1 s2 s3 tetra hexa N/A connections N/A N/A anc s1 N/A anc s2 N/A anc s3 N/A s1 tetra N/A s2 tetra N/A tetra hexa N/A s3 hexa N/A xinterval 0.02 N/A yratio 0.05 N/A N/A xx yy label chrl labels N/A N/A N/A N/A root text xx yy label ha center va center N/A offset N/A N/A len label 0.012 N/A N/A i c N/A enumerate chrl N/A N/A ya N/A yy N/A yratio c N/A yb N/A yy N/A yratio c N/A N/A Chromosome root N/A N/A xx offset N/A i xinterval ya yb width 0.01 N/A comments N/A N/A 0.15 0.33 II dominant N/A 0.25 0.03 III dominant N/A N/A xx yy c comments N/A N/A N/A N/A root text xx yy c size 9 ha center va center N/A tip 0.04 N/A N/A a b connections N/A N/A N/A xa ya la chra a N/A N/A xb yb lb chrb b N/A N/A N/A plt plot N/A xa xb N/A N/A ya tip N/A yb N/A 2 tip k- lw 2 alpha 0.5 N/A figname N/A N/A fname .pdf N/A N/A savefig figname dpi 300 N/A N/A N/A __name__ __main__ N/A N/A N/A main