--- title: Core module keywords: fastai sidebar: home_sidebar summary: "The core functions for making CHP markers" description: "The core functions for making CHP markers" nb_path: "nbs/01_Core.ipynb" ---
{% raw %}
{% endraw %}

1. import

{% raw %}
{% endraw %}

2. RData class

{% raw %}
{% endraw %} {% raw %}

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)

{% endraw %}

3.RegionExtractor class

{% raw %}
{% endraw %} {% raw %}

class RegionExtractor[source]

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

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

{% endraw %}

5.MarkerMaker class

{% raw %}
{% endraw %} {% raw %}

class MarkerMaker[source]

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

{% endraw %}

Functions for __Haplotype

{% raw %}
{% endraw %} {% raw %}

get_family_with_var[source]

get_family_with_var(data)

{% endraw %} {% raw %}

phasing_haps[source]

phasing_haps(chrom, item, fvar, fgeno)

{% endraw %}

6.LinkageWriter class

{% raw %}
{% endraw %} {% raw %}

class LinkageWriter[source]

LinkageWriter(num_missing_append=0)

{% endraw %} {% raw %}

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

{% endraw %}

7.Run linagke analysis

{% raw %}
{% endraw %} {% raw %}

run_each_region[source]

run_each_region()

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

{% endraw %}