--- title: Title keywords: fastai sidebar: home_sidebar nb_path: "nbs/07_plotped.ipynb" ---
{% raw %}
{% endraw %}
{% raw %}
import graphviz
a = graphviz.Source.from_file('data/4_715.dot')
{% endraw %} {% raw %}
print(a.source)
digraph ped_4_715 {
page="7.17,10.12"  ;
ratio="auto" ;
mincross = 2.0 ;
label="pedigree 4_715 " ;
rotate=0  ;
URL="http://www.mrc-epid.cam.ac.uk"  ;
"4_715_3" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_1" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_10" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_11" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_12" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_13" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_14" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_15" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_16" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_17" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_18" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_19" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_2" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_20" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_21" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_22" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_23" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_24" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_25" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_26" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_27" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_28" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_29" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_30" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_31" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_4" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_5" [shape= circle ,height= 0.5 ,width= 0.75 style=filled,color=grey ] ;
"4_715_6" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_7" [shape= circle ,height= 0.5 ,width= 0.75 style=filled,color=grey ] ;
"4_715_8" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_9" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_99" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_32" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_33" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_34" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_35" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_36" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_37" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_39" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_38" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_40" [shape= box,regular=1 ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_3c" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_8c" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_6c" [shape= circle ,height= 0.5 ,width= 0.75 style="setlinewidth(2)" ] ;
"4_715_15x4_715_16" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"4_715_15"  ->  "4_715_15x4_715_16"  [dir=none,weight=1]  ;
"4_715_16"  ->  "4_715_15x4_715_16"  [dir=none,weight=1]  ;
"4_715_15x4_715_16"  ->  "4_715_1" [dir=none,weight=2]  ;
"4_715_15x4_715_16"  ->  "4_715_10" [dir=none,weight=2]  ;
"4_715_15x4_715_16"  ->  "4_715_11" [dir=none,weight=2]  ;
"4_715_17x4_715_18" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"4_715_17"  ->  "4_715_17x4_715_18"  [dir=none,weight=1]  ;
"4_715_18"  ->  "4_715_17x4_715_18"  [dir=none,weight=1]  ;
"4_715_17x4_715_18"  ->  "4_715_12" [dir=none,weight=2]  ;
"4_715_17x4_715_18"  ->  "4_715_13" [dir=none,weight=2]  ;
"4_715_17x4_715_18"  ->  "4_715_14" [dir=none,weight=2]  ;
"4_715_17x4_715_18"  ->  "4_715_2" [dir=none,weight=2]  ;
"4_715_1x4_715_2" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"4_715_1"  ->  "4_715_1x4_715_2"  [dir=none,weight=1]  ;
"4_715_2"  ->  "4_715_1x4_715_2"  [dir=none,weight=1]  ;
"4_715_1x4_715_2"  ->  "4_715_3" [dir=none,weight=2]  ;
"4_715_1x4_715_2"  ->  "4_715_4" [dir=none,weight=2]  ;
"4_715_1x4_715_2"  ->  "4_715_5" [dir=none,weight=2]  ;
"4_715_1x4_715_2"  ->  "4_715_6" [dir=none,weight=2]  ;
"4_715_1x4_715_2"  ->  "4_715_7" [dir=none,weight=2]  ;
"4_715_1x4_715_2"  ->  "4_715_8" [dir=none,weight=2]  ;
"4_715_1x4_715_2"  ->  "4_715_9" [dir=none,weight=2]  ;
"4_715_1x4_715_2"  ->  "4_715_99" [dir=none,weight=2]  ;
"4_715_19x4_715_5" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"4_715_19"  ->  "4_715_19x4_715_5"  [dir=none,weight=1]  ;
"4_715_5"  ->  "4_715_19x4_715_5"  [dir=none,weight=1]  ;
"4_715_19x4_715_5"  ->  "4_715_21" [dir=none,weight=2]  ;
"4_715_19x4_715_5"  ->  "4_715_24" [dir=none,weight=2]  ;
"4_715_19x4_715_5"  ->  "4_715_25" [dir=none,weight=2]  ;
"4_715_26x4_715_7" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"4_715_26"  ->  "4_715_26x4_715_7"  [dir=none,weight=1]  ;
"4_715_7"  ->  "4_715_26x4_715_7"  [dir=none,weight=1]  ;
"4_715_26x4_715_7"  ->  "4_715_27" [dir=none,weight=2]  ;
"4_715_26x4_715_7"  ->  "4_715_28" [dir=none,weight=2]  ;
"4_715_26x4_715_7"  ->  "4_715_29" [dir=none,weight=2]  ;
"4_715_26x4_715_7"  ->  "4_715_30" [dir=none,weight=2]  ;
"4_715_26x4_715_7"  ->  "4_715_31" [dir=none,weight=2]  ;
"4_715_20x4_715_99" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"4_715_20"  ->  "4_715_20x4_715_99"  [dir=none,weight=1]  ;
"4_715_99"  ->  "4_715_20x4_715_99"  [dir=none,weight=1]  ;
"4_715_20x4_715_99"  ->  "4_715_22" [dir=none,weight=2]  ;
"4_715_20x4_715_99"  ->  "4_715_23" [dir=none,weight=2]  ;
"4_715_3x4_715_3c" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"4_715_3"  ->  "4_715_3x4_715_3c"  [dir=none,weight=1]  ;
"4_715_3c"  ->  "4_715_3x4_715_3c"  [dir=none,weight=1]  ;
"4_715_3x4_715_3c"  ->  "4_715_32" [dir=none,weight=2]  ;
"4_715_3x4_715_3c"  ->  "4_715_33" [dir=none,weight=2]  ;
"4_715_8x4_715_8c" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"4_715_8"  ->  "4_715_8x4_715_8c"  [dir=none,weight=1]  ;
"4_715_8c"  ->  "4_715_8x4_715_8c"  [dir=none,weight=1]  ;
"4_715_8x4_715_8c"  ->  "4_715_34" [dir=none,weight=2]  ;
"4_715_8x4_715_8c"  ->  "4_715_35" [dir=none,weight=2]  ;
"4_715_6x4_715_6c" [shape=diamond,style=filled,label="",height=.1,width=.1] ;
"4_715_6"  ->  "4_715_6x4_715_6c"  [dir=none,weight=1]  ;
"4_715_6c"  ->  "4_715_6x4_715_6c"  [dir=none,weight=1]  ;
"4_715_6x4_715_6c"  ->  "4_715_36" [dir=none,weight=2]  ;
"4_715_6x4_715_6c"  ->  "4_715_37" [dir=none,weight=2]  ;
}

{% endraw %} {% raw %}
a
ped_4_715 pedigree 4_715 4_715_3 4_715_3 4_715_3x4_715_3c 4_715_3->4_715_3x4_715_3c 4_715_1 4_715_1 4_715_1x4_715_2 4_715_1->4_715_1x4_715_2 4_715_10 4_715_10 4_715_11 4_715_11 4_715_12 4_715_12 4_715_13 4_715_13 4_715_14 4_715_14 4_715_15 4_715_15 4_715_15x4_715_16 4_715_15->4_715_15x4_715_16 4_715_16 4_715_16 4_715_16->4_715_15x4_715_16 4_715_17 4_715_17 4_715_17x4_715_18 4_715_17->4_715_17x4_715_18 4_715_18 4_715_18 4_715_18->4_715_17x4_715_18 4_715_19 4_715_19 4_715_19x4_715_5 4_715_19->4_715_19x4_715_5 4_715_2 4_715_2 4_715_2->4_715_1x4_715_2 4_715_20 4_715_20 4_715_20x4_715_99 4_715_20->4_715_20x4_715_99 4_715_21 4_715_21 4_715_22 4_715_22 4_715_23 4_715_23 4_715_24 4_715_24 4_715_25 4_715_25 4_715_26 4_715_26 4_715_26x4_715_7 4_715_26->4_715_26x4_715_7 4_715_27 4_715_27 4_715_28 4_715_28 4_715_29 4_715_29 4_715_30 4_715_30 4_715_31 4_715_31 4_715_4 4_715_4 4_715_5 4_715_5 4_715_5->4_715_19x4_715_5 4_715_6 4_715_6 4_715_6x4_715_6c 4_715_6->4_715_6x4_715_6c 4_715_7 4_715_7 4_715_7->4_715_26x4_715_7 4_715_8 4_715_8 4_715_8x4_715_8c 4_715_8->4_715_8x4_715_8c 4_715_9 4_715_9 4_715_99 4_715_99 4_715_99->4_715_20x4_715_99 4_715_32 4_715_32 4_715_33 4_715_33 4_715_34 4_715_34 4_715_35 4_715_35 4_715_36 4_715_36 4_715_37 4_715_37 4_715_39 4_715_39 4_715_38 4_715_38 4_715_40 4_715_40 4_715_3c 4_715_3c 4_715_3c->4_715_3x4_715_3c 4_715_8c 4_715_8c 4_715_8c->4_715_8x4_715_8c 4_715_6c 4_715_6c 4_715_6c->4_715_6x4_715_6c 4_715_15x4_715_16->4_715_1 4_715_15x4_715_16->4_715_10 4_715_15x4_715_16->4_715_11 4_715_17x4_715_18->4_715_12 4_715_17x4_715_18->4_715_13 4_715_17x4_715_18->4_715_14 4_715_17x4_715_18->4_715_2 4_715_1x4_715_2->4_715_3 4_715_1x4_715_2->4_715_4 4_715_1x4_715_2->4_715_5 4_715_1x4_715_2->4_715_6 4_715_1x4_715_2->4_715_7 4_715_1x4_715_2->4_715_8 4_715_1x4_715_2->4_715_9 4_715_1x4_715_2->4_715_99 4_715_19x4_715_5->4_715_21 4_715_19x4_715_5->4_715_24 4_715_19x4_715_5->4_715_25 4_715_26x4_715_7->4_715_27 4_715_26x4_715_7->4_715_28 4_715_26x4_715_7->4_715_29 4_715_26x4_715_7->4_715_30 4_715_26x4_715_7->4_715_31 4_715_20x4_715_99->4_715_22 4_715_20x4_715_99->4_715_23 4_715_3x4_715_3c->4_715_32 4_715_3x4_715_3c->4_715_33 4_715_8x4_715_8c->4_715_34 4_715_8x4_715_8c->4_715_35 4_715_6x4_715_6c->4_715_36 4_715_6x4_715_6c->4_715_37
{% endraw %} {% raw %}
graphviz.Source.from_file('data/10081.dot')
Warning: using box for unknown shape 1
ped_10081 pedigree 10081 10R_R78_42 10R_R78_42 10R_R78_1 10R_R78_1 10R_R78_2x10R_R78_1 10R_R78_1->10R_R78_2x10R_R78_1 10R_R78_6 10R_R78_6 10R_R78_7x10R_R78_6 10R_R78_6->10R_R78_7x10R_R78_6 10R_R78_10 10R_R78_10 10R_R78_11x10R_R78_10 10R_R78_10->10R_R78_11x10R_R78_10 10R_R78_12 10R_R78_12 10R_R78_12x10R_R78_47 10R_R78_12->10R_R78_12x10R_R78_47 10R_R78_16 10R_R78_16 10R_R78_18 10R_R78_18 10R_R78_25 10R_R78_25 10R_R78_26 10R_R78_26 10R_R78_20 10R_R78_20 10R_R78_21 10R_R78_21 10R_R78_53x10R_R78_21 10R_R78_21->10R_R78_53x10R_R78_21 10R_R78_28 10R_R78_28 10R_R78_28x10R_R78_29 10R_R78_28->10R_R78_28x10R_R78_29 10R_R78_35 10R_R78_35 10R_R78_35x10R_R78_36 10R_R78_35->10R_R78_35x10R_R78_36 10R_R78_39 10R_R78_39 10R_R78_33 10R_R78_33 10R_R78_33x10R_R78_34 10R_R78_33->10R_R78_33x10R_R78_34 10R_R78_41 10R_R78_41 10R_R78_14 10R_R78_14 10R_R78_11 10R_R78_11 10R_R78_11->10R_R78_11x10R_R78_10 10R_R78_19 10R_R78_19 10R_R78_2 10R_R78_2 10R_R78_2->10R_R78_2x10R_R78_1 10R_R78_22 10R_R78_22 10R_R78_23x10R_R78_22 10R_R78_22->10R_R78_23x10R_R78_22 10R_R78_23 10R_R78_23 10R_R78_23->10R_R78_23x10R_R78_22 10R_R78_29 10R_R78_29 10R_R78_29->10R_R78_28x10R_R78_29 10R_R78_3 10R_R78_3 10R_R78_4x10R_R78_3 10R_R78_3->10R_R78_4x10R_R78_3 10R_R78_30 10R_R78_30 10R_R78_43x10R_R78_30 10R_R78_30->10R_R78_43x10R_R78_30 10R_R78_34 10R_R78_34 10R_R78_34->10R_R78_33x10R_R78_34 10R_R78_36 10R_R78_36 10R_R78_36->10R_R78_35x10R_R78_36 10R_R78_38 10R_R78_38 10R_R78_4 10R_R78_4 10R_R78_4->10R_R78_4x10R_R78_3 10R_R78_43 10R_R78_43 10R_R78_43->10R_R78_43x10R_R78_30 10R_R78_44 10R_R78_44 10R_R78_9x10R_R78_44 10R_R78_44->10R_R78_9x10R_R78_44 10R_R78_45 10R_R78_45 10R_R78_46 10R_R78_46 10R_R78_47 10R_R78_47 10R_R78_47->10R_R78_12x10R_R78_47 10R_R78_48 10R_R78_48 10R_R78_50 10R_R78_50 10R_R78_51x10R_R78_50 10R_R78_50->10R_R78_51x10R_R78_50 10R_R78_51 10R_R78_51 10R_R78_51->10R_R78_51x10R_R78_50 10R_R78_52 10R_R78_52 10R_R78_53 10R_R78_53 10R_R78_53->10R_R78_53x10R_R78_21 10R_R78_7 10R_R78_7 10R_R78_7->10R_R78_7x10R_R78_6 10R_R78_9 10R_R78_9 10R_R78_9->10R_R78_9x10R_R78_44 10R_R78_24 10R_R78_24 10R_R78_5 10R_R78_5 10R_R78_13 10R_R78_13 10R_R78_31 10R_R78_31 10R_R78_32 10R_R78_32 10R_R78_37 10R_R78_37 10R_R78_40 10R_R78_40 10R_R78_55 10R_R78_55 10R_R78_56 10R_R78_56 10R_R78_11x10R_R78_10->10R_R78_25 10R_R78_11x10R_R78_10->10R_R78_26 10R_R78_11x10R_R78_10->10R_R78_19 10R_R78_2x10R_R78_1->10R_R78_16 10R_R78_2x10R_R78_1->10R_R78_14 10R_R78_23x10R_R78_22->10R_R78_3 10R_R78_23x10R_R78_22->10R_R78_50 10R_R78_28x10R_R78_29->10R_R78_46 10R_R78_33x10R_R78_34->10R_R78_39 10R_R78_33x10R_R78_34->10R_R78_41 10R_R78_33x10R_R78_34->10R_R78_40 10R_R78_35x10R_R78_36->10R_R78_38 10R_R78_4x10R_R78_3->10R_R78_1 10R_R78_4x10R_R78_3->10R_R78_6 10R_R78_4x10R_R78_3->10R_R78_10 10R_R78_4x10R_R78_3->10R_R78_12 10R_R78_4x10R_R78_3->10R_R78_9 10R_R78_4x10R_R78_3->10R_R78_5 10R_R78_4x10R_R78_3->10R_R78_13 10R_R78_43x10R_R78_30->10R_R78_42 10R_R78_12x10R_R78_47->10R_R78_48 10R_R78_12x10R_R78_47->10R_R78_55 10R_R78_12x10R_R78_47->10R_R78_56 10R_R78_51x10R_R78_50->10R_R78_20 10R_R78_51x10R_R78_50->10R_R78_21 10R_R78_51x10R_R78_50->10R_R78_28 10R_R78_51x10R_R78_50->10R_R78_35 10R_R78_51x10R_R78_50->10R_R78_33 10R_R78_51x10R_R78_50->10R_R78_30 10R_R78_51x10R_R78_50->10R_R78_31 10R_R78_51x10R_R78_50->10R_R78_32 10R_R78_51x10R_R78_50->10R_R78_37 10R_R78_53x10R_R78_21->10R_R78_52 10R_R78_7x10R_R78_6->10R_R78_18 10R_R78_9x10R_R78_44->10R_R78_45
{% endraw %} {% raw %}
import pandas as pd
{% endraw %} {% raw %}
ped = pd.read_csv('data/nodp_ped_with_depth_trim.csv',header=0,index_col=None)
{% endraw %} {% raw %}
new_twom_fam = pd.read_csv('data/new_twoormore_member_fam.csv',header=None,names=['fid','iid','fathid','mothid','sex','ad','vcf'])
{% endraw %} {% raw %}
new_twom_fam
fid iid fathid mothid sex ad vcf
0 4_364 4_364_99 4_364_1 4_364_2 2 2 True
1 4_44 4_44_3 4_44_1 4_44_2 2 2 True
2 27_104 27_104_62571 27_104_84753 27_104_84752 1 2 True
3 27_90 27_90_84583 27_90_84575 27_90_84574 2 2 True
4 27_90 27_90_84784 27_90_84575 27_90_84574 2 2 True
... ... ... ... ... ... ... ...
19101 27_119 27_119_86892 0 0 2 -9 False
19102 27_192 27_192_86089 0 0 2 -9 False
19103 10R_R1 10R_R1_20 0 0 2 -9 False
19104 10R_R57 10R_R57_R15 0 0 2 -9 False
19105 10R_R114 10R_R114_R12 0 0 2 -9 False

19106 rows × 7 columns

{% endraw %} {% raw %}
fi = ped[ped.fid =='997']
{% endraw %} {% raw %}

update_attributes[source]

update_attributes(r)

{% endraw %} {% raw %}

plotped[source]

plotped(fi, output=False, folder='', format='svg')

{% endraw %} {% raw %}
{% endraw %} {% raw %}
[plotped(new_twom_fam[new_twom_fam.fid ==i],output=True,folder='data/',format='pdf') for i in ['4_364','27_104','4_461','215','10R_R99']]
[<graphviz.graphs.Digraph at 0x2b8e8f9d8a60>,
 <graphviz.graphs.Digraph at 0x2b8e96f7abb0>,
 <graphviz.graphs.Digraph at 0x2b8e973b39a0>,
 <graphviz.graphs.Digraph at 0x2b8e9743f070>,
 <graphviz.graphs.Digraph at 0x2b8e9743f760>]
{% endraw %} {% raw %}
new_twom_fam[new_twom_fam.fid =='10R_R99']
fid iid fathid mothid sex ad vcf
754 10R_R99 10R_R99_15 10R_R99_8 10R_R99_7 2 2 True
759 10R_R99 10R_R99_12 10R_R99_8 10R_R99_7 2 2 True
762 10R_R99 10R_R99_1 10R_R99_8 10R_R99_7 2 2 True
763 10R_R99 10R_R99_5 10R_R99_8 10R_R99_7 1 1 True
764 10R_R99 10R_R99_6 10R_R99_8 10R_R99_7 2 1 True
765 10R_R99 10R_R99_10 10R_R99_2 10R_R99_1 2 1 True
766 10R_R99 10R_R99_17 10R_R99_29 10R_R99_15 1 1 True
767 10R_R99 10R_R99_19 10R_R99_2 10R_R99_1 1 1 True
14360 10R_R99 10R_R99_2 0 0 1 -9 False
14361 10R_R99 10R_R99_20 10R_R99_2 10R_R99_1 1 1 False
14362 10R_R99 10R_R99_21 10R_R99_2 10R_R99_1 1 1 False
14363 10R_R99 10R_R99_22 10R_R99_29 10R_R99_15 1 1 False
14364 10R_R99 10R_R99_29 0 0 1 2 False
14365 10R_R99 10R_R99_7 0 0 2 2 False
14366 10R_R99 10R_R99_8 0 0 1 1 False
18613 10R_R99 10R_R99_8 10R_R99_19 10R_R99_5 2 1 False
{% endraw %} {% raw %}
dot=plotped(new_twom_fam[new_twom_fam.fid =='10R_R99'],output=True,folder='data/',format='pdf')
{% endraw %} {% raw %}
print(dot.source)
digraph {
	"10R_R99_15" [shape=box fillcolor=dimgrey fontcolor=black height=0.3 regular=0 shape=ellipse style="filled,setlinewidth(4)" width=0.5]
	"10R_R99_8x10R_R99_7" -> "10R_R99_15"
	"10R_R99_15" -> "10R_R99_29x10R_R99_15"
	"10R_R99_12" [shape=box fillcolor=dimgrey fontcolor=black height=0.3 regular=0 shape=ellipse style="filled,setlinewidth(4)" width=0.5]
	"10R_R99_8x10R_R99_7" -> "10R_R99_12"
	"10R_R99_1" [shape=box fillcolor=dimgrey fontcolor=black height=0.3 regular=0 shape=ellipse style="filled,setlinewidth(4)" width=0.5]
	"10R_R99_8x10R_R99_7" -> "10R_R99_1"
	"10R_R99_1" -> "10R_R99_2x10R_R99_1"
	"10R_R99_5" [shape=box fillcolor=white fontcolor=black height=0.3 regular=0 shape=box style="filled,setlinewidth(4)" width=0.5]
	"10R_R99_8x10R_R99_7" -> "10R_R99_5"
	"10R_R99_5" -> "10R_R99_19x10R_R99_5"
	"10R_R99_6" [shape=box fillcolor=white fontcolor=black height=0.3 regular=0 shape=ellipse style="filled,setlinewidth(4)" width=0.5]
	"10R_R99_8x10R_R99_7" -> "10R_R99_6"
	"10R_R99_10" [shape=box fillcolor=white fontcolor=black height=0.3 regular=0 shape=ellipse style="filled,setlinewidth(4)" width=0.5]
	"10R_R99_2x10R_R99_1" -> "10R_R99_10"
	"10R_R99_17" [shape=box fillcolor=white fontcolor=black height=0.3 regular=0 shape=box style="filled,setlinewidth(4)" width=0.5]
	"10R_R99_29x10R_R99_15" -> "10R_R99_17"
	"10R_R99_19" [shape=box fillcolor=white fontcolor=black height=0.3 regular=0 shape=box style="filled,setlinewidth(4)" width=0.5]
	"10R_R99_2x10R_R99_1" -> "10R_R99_19"
	"10R_R99_19" -> "10R_R99_19x10R_R99_5"
	"10R_R99_2" [shape=box fillcolor=aquamarine3 fontcolor=black height=0.3 regular=0 shape=box style=filled width=0.5]
	"10R_R99_2" -> "10R_R99_2x10R_R99_1"
	"10R_R99_20" [shape=box fillcolor=white fontcolor=black height=0.3 regular=0 shape=box style=filled width=0.5]
	"10R_R99_2x10R_R99_1" -> "10R_R99_20"
	"10R_R99_21" [shape=box fillcolor=white fontcolor=black height=0.3 regular=0 shape=box style=filled width=0.5]
	"10R_R99_2x10R_R99_1" -> "10R_R99_21"
	"10R_R99_22" [shape=box fillcolor=white fontcolor=black height=0.3 regular=0 shape=box style=filled width=0.5]
	"10R_R99_29x10R_R99_15" -> "10R_R99_22"
	"10R_R99_29" [shape=box fillcolor=dimgrey fontcolor=black height=0.3 regular=0 shape=box style=filled width=0.5]
	"10R_R99_29" -> "10R_R99_29x10R_R99_15"
	"10R_R99_7" [shape=box fillcolor=dimgrey fontcolor=black height=0.3 regular=0 shape=ellipse style=filled width=0.5]
	"10R_R99_7" -> "10R_R99_8x10R_R99_7"
	"10R_R99_8" [shape=box fillcolor=white fontcolor=black height=0.3 regular=0 shape=box style=filled width=0.5]
	"10R_R99_8" -> "10R_R99_8x10R_R99_7"
	"10R_R99_8" [shape=box fillcolor=white fontcolor=black height=0.3 regular=0 shape=ellipse style=filled width=0.5]
	"10R_R99_19x10R_R99_5" -> "10R_R99_8"
	"10R_R99_8" -> "10R_R99_8x10R_R99_7"
	"10R_R99_2x10R_R99_1" [label="" height=.1 shape=diamond width=.1]
	"10R_R99_19x10R_R99_5" [label="" height=.1 shape=diamond width=.1]
	"10R_R99_29x10R_R99_15" [label="" height=.1 shape=diamond width=.1]
	"10R_R99_8x10R_R99_7" [label="" height=.1 shape=diamond width=.1]
}

{% endraw %} {% raw %}
dot
%3 10R_R99_15 10R_R99_15 10R_R99_29x10R_R99_15 10R_R99_15->10R_R99_29x10R_R99_15 10R_R99_8x10R_R99_7 10R_R99_8x10R_R99_7->10R_R99_15 10R_R99_12 10R_R99_12 10R_R99_8x10R_R99_7->10R_R99_12 10R_R99_1 10R_R99_1 10R_R99_8x10R_R99_7->10R_R99_1 10R_R99_5 10R_R99_5 10R_R99_8x10R_R99_7->10R_R99_5 10R_R99_6 10R_R99_6 10R_R99_8x10R_R99_7->10R_R99_6 10R_R99_17 10R_R99_17 10R_R99_29x10R_R99_15->10R_R99_17 10R_R99_22 10R_R99_22 10R_R99_29x10R_R99_15->10R_R99_22 10R_R99_2x10R_R99_1 10R_R99_1->10R_R99_2x10R_R99_1 10R_R99_10 10R_R99_10 10R_R99_2x10R_R99_1->10R_R99_10 10R_R99_19 10R_R99_19 10R_R99_2x10R_R99_1->10R_R99_19 10R_R99_20 10R_R99_20 10R_R99_2x10R_R99_1->10R_R99_20 10R_R99_21 10R_R99_21 10R_R99_2x10R_R99_1->10R_R99_21 10R_R99_19x10R_R99_5 10R_R99_5->10R_R99_19x10R_R99_5 10R_R99_8 10R_R99_8 10R_R99_19x10R_R99_5->10R_R99_8 10R_R99_19->10R_R99_19x10R_R99_5 10R_R99_2 10R_R99_2 10R_R99_2->10R_R99_2x10R_R99_1 10R_R99_29 10R_R99_29 10R_R99_29->10R_R99_29x10R_R99_15 10R_R99_7 10R_R99_7 10R_R99_7->10R_R99_8x10R_R99_7 10R_R99_8->10R_R99_8x10R_R99_7 10R_R99_8->10R_R99_8x10R_R99_7
{% endraw %}

Output plot

{% raw %}
plotped(ped[ped.fid =='1036'])
%3 1036_5 1036_5 1036_6x1036_99 1036_6x1036_99->1036_5 1036_4 1036_4 1036_6x1036_99->1036_4 1036_3 1036_3 1036_6x1036_99->1036_3 1036_99 1036_99 1036_99->1036_6x1036_99 1036_1x1036_2 1036_1x1036_2->1036_99 1036_6 1036_6 1036_6->1036_6x1036_99 1036_1 1036_1 1036_1->1036_1x1036_2 1036_2 1036_2 1036_2->1036_1x1036_2
{% endraw %} {% raw %}
trim_ped = ped[ped.trim==False]
{% endraw %} {% raw %}
trim_smry = pd.DataFrame([[ped.depth[ped.fid == i].max() for i in trim_ped.fid.unique()],[trim_ped.depth[trim_ped.fid == i].max() for i in trim_ped.fid.unique()]])
trim_smry = trim_smry.T
trim_smry.index = trim_ped.fid.unique()
trim_smry.columns = ['before','after']
trim_smry.hist()
array([[<AxesSubplot:title={'center':'before'}>,
        <AxesSubplot:title={'center':'after'}>]], dtype=object)
{% endraw %} {% raw %}
len(trim_smry.index[(trim_smry.before>3) & (trim_smry.after<4)])
103
{% endraw %} {% raw %}
sum(trim_smry.before>4)
62
{% endraw %} {% raw %}
sum(trim_smry.after<4)
717
{% endraw %} {% raw %}
sum((tmp[0]<) & (tmp[1]<4))
0
{% endraw %} {% raw %}
dots1 = [plotped(ped[ped.fid ==i],folder='data/ADfam_depthless4') for i in trim_smry.index[trim_smry.before<4]]
{% endraw %} {% raw %}
dots2 = [plotped(ped[ped.fid ==i],folder='data/ADfam_trimless4/') for i in trim_smry.index[(trim_smry.before>3) & (trim_smry.after<4)]]
{% endraw %} {% raw %}
dots3 = [plotped(ped[ped.fid ==i],folder='data/ADfam_trimmore4/') for i in trim_smry.index[trim_smry.after>3]]
{% endraw %} {% raw %}
plotped(ped[ped.fid =='336'])
%3 336_43 336_43 336_42x336_9 336_42x336_9->336_43 336_44 336_44 336_42x336_9->336_44 336_8 336_8 336_10x336_99 336_10x336_99->336_8 336_9 336_9 336_10x336_99->336_9 336_6 336_6 336_10x336_99->336_6 336_7 336_7 336_10x336_99->336_7 336_9->336_42x336_9 336_24 336_24 336_25x336_26 336_25x336_26->336_24 336_39 336_39 336_37x336_38 336_37x336_38->336_39 336_40 336_40 336_37x336_38->336_40 336_41 336_41 336_37x336_38->336_41 336_13 336_13 336_5x336_15 336_5x336_15->336_13 336_14 336_14 336_5x336_15->336_14 336_16 336_16 336_5x336_15->336_16 336_17 336_17 336_5x336_15->336_17 336_18 336_18 336_5x336_15->336_18 336_19 336_19 336_5x336_15->336_19 336_20 336_20 336_5x336_15->336_20 336_21 336_21 336_5x336_15->336_21 336_22 336_22 336_5x336_15->336_22 336_23 336_23 336_5x336_15->336_23 336_99 336_99 336_99->336_10x336_99 336_1x336_2 336_1x336_2->336_99 336_5 336_5 336_1x336_2->336_5 336_4 336_4 336_1x336_2->336_4 336_3 336_3 336_1x336_2->336_3 336_11 336_11 336_1x336_12 336_1x336_12->336_11 336_5->336_5x336_15 336_25 336_25 336_25->336_25x336_26 336_28x336_27 336_28x336_27->336_25 336_37 336_37 336_37->336_37x336_38 336_35x336_36 336_35x336_36->336_37 336_2 336_2 336_2->336_1x336_2 336_29x336_30 336_29x336_30->336_2 336_1 336_1 336_1->336_1x336_2 336_1->336_1x336_12 336_31x336_32 336_31x336_32->336_1 336_27 336_27 336_31x336_32->336_27 336_35 336_35 336_31x336_32->336_35 336_27->336_28x336_27 336_35->336_35x336_36 336_31 336_31 336_31->336_31x336_32 336_34x336_33 336_34x336_33->336_31 336_29 336_29 336_34x336_33->336_29 336_29->336_29x336_30 336_12 336_12 336_12->336_1x336_12 336_10 336_10 336_10->336_10x336_99 336_15 336_15 336_15->336_5x336_15 336_32 336_32 336_32->336_31x336_32 336_28 336_28 336_28->336_28x336_27 336_26 336_26 336_26->336_25x336_26 336_33 336_33 336_33->336_34x336_33 336_34 336_34 336_34->336_34x336_33 336_30 336_30 336_30->336_29x336_30 336_36 336_36 336_36->336_35x336_36 336_38 336_38 336_38->336_37x336_38 336_42 336_42 336_42->336_42x336_9
{% endraw %} {% raw %}
dot
%3 1036_5 1036_5 1036_6x1036_99 1036_6x1036_99->1036_5 1036_4 1036_4 1036_6x1036_99->1036_4 1036_3 1036_3 1036_6x1036_99->1036_3 1036_99 1036_99 1036_99->1036_6x1036_99 1036_1x1036_2 1036_1x1036_2->1036_99 1036_6 1036_6 1036_6->1036_6x1036_99 1036_1 1036_1 1036_1->1036_1x1036_2 1036_2 1036_2 1036_2->1036_1x1036_2
{% endraw %}