The core functions for making CHP markers

1. import

2. RData class

class RData[source]

RData(vcf, tfam, anno_file=None, fam_pop_file=None, allele_freq_info=None, included_variant_file=None) :: dict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

3.RegionExtractor class

class RegionExtractor[source]

RegionExtractor(filename, build=None, chr_prefix=None)

Extract given genomic region from VCF converting genotypes into dictionary of genotype list

5.MarkerMaker class

class MarkerMaker[source]

MarkerMaker(wsize=1, maf_cutoff=None, recomb=False)

Functions for __Haplotype

get_family_with_var[source]

get_family_with_var(data)

phasing_haps[source]

phasing_haps(chrom, item, fvar, fgeno)

6.LinkageWriter class

class LinkageWriter[source]

LinkageWriter(num_missing_append=0)

class EncoderWorker[source]

EncoderWorker(queue, length, data, extractor, coder, writer) :: Process

Process objects represent activity that is run in a separate process

The class is analogous to threading.Thread

7.Run linagke analysis

run_each_region[source]

run_each_region()

get the haplotypes and allele frequency of variants in each region and run linkage analysis