Module Import alias Import alias ImportFrom alias ImportFrom alias Import alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str handlers ExceptHandler body Assign NameStore NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str handlers ExceptHandler body Assign NameStore NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str orelse If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad orelse If CompareIsNot NameLoad NameLoad body Assign NameStore NameLoad orelse Return TupleLoad Num Num Call NameLoad NameLoad ListLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice Num BinOpAdd NameLoad Num attr Str Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice Num BinOpAdd NameLoad Num attr Str Assign NameStore BinOpAdd BinOpSub NameLoad BinOpAdd NameLoad NameLoad Num Return TupleLoad NameLoad NameLoad NameLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad For NameStore NameLoad body If Call NameLoad NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad AugAssignSub NameStore NameLoad AugAssignSub NameStore NameLoad AugAssignSub NameStore NameLoad While BoolOpAnd CompareLtE NameLoad AttributeLoad NameLoad attr CompareLtE NameLoad AttributeLoad NameLoad attr body If BoolOpAnd CompareNotEq NameLoad Str CompareNotEq NameLoad Str body AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num orelse If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler body Break If CompareGtE NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad GeneratorExp NameLoad comprehension NameStore NameLoad CompareNotIn NameLoad ListLoad Str Str Assign NameStore Call NameLoad GeneratorExp NameLoad comprehension NameStore NameLoad CompareNotIn NameLoad ListLoad Str Str Assign NameStore BinOpSub NameLoad NameLoad If CompareGtE NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpDiv Call NameLoad BinOpMult Call NameLoad NameLoad Num Call NameLoad NameLoad Print Call AttributeLoad Str attr GeneratorExp Call NameLoad NameLoad comprehension NameStore ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad Call NameLoad NameLoad Num NameLoad orelse Assign NameStore ListLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore ListLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Str For NameStore NameLoad body TryExcept body Assign NameStore SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad orelse For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpAdd BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Print Call AttributeLoad Str attr ListLoad Str Str Str Str Str Str Str Assign NameStore Num Assign NameStore Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore NameLoad For NameStore NameLoad body AugAssignAdd NameStore Num If CompareEq BinOpMod NameLoad Num Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str If BoolOpAnd CompareNotEq NameLoad NameLoad CompareIsNot NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareLt NameLoad AttributeLoad NameLoad attr body Continue If BoolOpOr CompareEq NameLoad NameLoad CompareEq NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr SubscriptLoad NameLoad Index Str orelse If CompareEq NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str orelse If CompareEq NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str Assign NameStore NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad decorator_list
N/A N/A os N/A sys collections defaultdict gemini_constants * N/A GeminiQuery Site N/A object N/A __init__ N/A N/A self row N/A N/A N/A N/A self chrom N/A row N/A chrom N/A N/A self end N/A int N/A row N/A end N/A N/A self gt_type None N/A N/A _prune_run N/A N/A run N/A N/A N/A 
    Prune the current run of genotypes.

    Remove genotypes from the left of the first
    non-homozygous genotype, since, owing to the
    same logic behind run length encoding, those
    genotypes cannot be part of a longer run than
    we have seen before.

    For example:

    breaks   =       *       *       *
    run      = H H H h H H H U H H H h H H H H H H
    prune_1  =         H H H U H H H h H H H H H H
    prune_2  =                 H H H h H H H H H H
    prune_3  =                         H H H H H H
     N/A N/A N/A first_het_idx N/A N/A run index H N/A N/A N/A N/A first_het_idx None N/A N/A N/A first_unk_idx N/A N/A run index U N/A N/A N/A N/A first_unk_idx None N/A N/A N/A first_het_idx None N/A first_unk_idx None N/A N/A idx_of_first_disruption N/A min N/A N/A run index H N/A N/A run index U N/A N/A N/A first_het_idx None N/A N/A idx_of_first_disruption first_het_idx N/A N/A N/A first_unk_idx None N/A N/A idx_of_first_disruption first_unk_idx N/A N/A N/A 0 0 N/A len run N/A N/A hets_removed N/A N/A N/A run N/A 0 N/A idx_of_first_disruption 1 count H N/A unks_removed N/A N/A N/A run N/A 0 N/A idx_of_first_disruption 1 count U N/A homs_removed N/A N/A idx_of_first_disruption N/A hets_removed unks_removed 1 N/A N/A hets_removed unks_removed homs_removed N/A run N/A N/A idx_of_first_disruption 1 N/A sweep_genotypes_for_rohs N/A N/A args chrom samples N/A N/A N/A 
    Sweep through the genotypes for each sample in search of ROHs.

    Note: If the genotype was homozygous, the end position
          of the variant is stored.  Otherwise 'H' for het
          and 'U' for unknown.
     N/A hom_count 0 N/A het_count 0 N/A unk_count 0 N/A curr_run N/A N/A sample samples N/A N/A sites N/A iter N/A samples N/A sample N/A site sites N/A N/A N/A len curr_run N/A N/A N/A hets_removed unks_removed homs_removed curr_run N/A _prune_run curr_run N/A hom_count homs_removed N/A het_count hets_removed N/A unk_count unks_removed N/A N/A N/A het_count N/A args max_hets N/A unk_count N/A args max_unknowns N/A N/A N/A N/A site H N/A site U N/A N/A hom_count 1 N/A N/A N/A curr_run append site N/A N/A N/A site H N/A N/A N/A N/A curr_run append site N/A het_count 1 N/A N/A N/A site U N/A N/A N/A N/A curr_run append site N/A unk_count 1 N/A N/A N/A site N/A N/A sites next N/A N/A N/A N/A N/A N/A hom_count N/A args min_snps N/A N/A run_start N/A min N/A c N/A c curr_run N/A c N/A H U N/A run_end N/A max N/A c N/A c curr_run N/A c N/A H U N/A run_length N/A run_end run_start N/A N/A run_length N/A args min_size N/A N/A density_per_kb N/A N/A float N/A N/A len curr_run 1000 N/A float run_length N/A N/A N/A join N/A N/A str s N/A s N/A chrom run_start run_end sample hom_count N/A round density_per_kb 4 run_length N/A N/A curr_run N/A N/A hom_count 0 N/A het_count 0 N/A unk_count 0 N/A get_homozygosity_runs N/A N/A args N/A N/A N/A gq N/A N/A GeminiQuery GeminiQuery N/A args db N/A idx2smp N/A gq index2sample N/A smp2idx N/A gq sample2index N/A sm_index N/A N/A N/A N/A args samples None N/A N/A sample_filter N/A N/A N/A N/A N/A args samples strip split , N/A sample sample_filter N/A N/A N/A N/A idx N/A smp2idx N/A sample N/A N/A N/A N/A N/A N/A sys exit N/A ERROR: Sample %s could not be found. Exiting.
 sample N/A N/A N/A sm_index append N/A smp2idx N/A sample N/A N/A sample smp2idx N/A N/A N/A N/A sm_index append N/A smp2idx N/A sample N/A query N/A N/A SELECT chrom, start, end, gt_types, gt_depths               FROM variants               WHERE type = 'snp'               AND   filter is NULL               AND   depth >=  N/A str N/A args min_total_depth  ORDER BY chrom, end N/A N/A N/A N/A sys stderr write LOG: Querying and ordering variants by chromosomal position.
 N/A N/A N/A gq run query needs_genotypes True N/A N/A N/A join N/A chrom start end sample num_of_snps density_per_kb run_length_in_bp N/A variants_seen 0 N/A samples N/A defaultdict list N/A prev_chrom None N/A curr_chrom None N/A row gq N/A N/A variants_seen 1 N/A N/A N/A variants_seen 10000 0 N/A N/A N/A N/A N/A sys stderr write N/A LOG: Loaded %d variants. Current variant on %s, position %d.
 N/A variants_seen N/A row N/A chrom N/A row N/A end N/A gt_types N/A row N/A gt_types N/A gt_depths N/A row N/A gt_depths N/A curr_chrom N/A row N/A chrom N/A N/A N/A curr_chrom prev_chrom N/A prev_chrom None N/A N/A N/A sweep_genotypes_for_rohs args prev_chrom samples N/A samples N/A defaultdict list N/A idx sm_index N/A N/A sample N/A idx2smp N/A idx N/A gt_type N/A gt_types N/A idx N/A depth N/A gt_depths N/A idx N/A N/A depth N/A args min_genotype_depth N/A N/A N/A N/A N/A gt_type HOM_ALT N/A gt_type HOM_REF N/A N/A N/A N/A N/A samples N/A sample append N/A row N/A end N/A N/A N/A gt_type HET N/A N/A N/A N/A N/A samples N/A sample append H N/A N/A N/A gt_type UNKNOWN N/A N/A N/A N/A N/A samples N/A sample append U N/A prev_chrom curr_chrom N/A N/A sweep_genotypes_for_rohs args curr_chrom samples N/A run N/A N/A parser args N/A N/A N/A N/A N/A N/A os path exists N/A args db N/A N/A N/A get_homozygosity_runs args N/A