imputation allele frequency dosage

From PyPedia
Jump to: navigation, search

Contents

[edit] Documentation

Computes allele frequency from dosage

[edit] Parameters

Dosage:

<inputs>
<param name='dosage' type='eval' value='[1.0388, 0.3234, 1.992, 0.0582]' label='Dosage: '/>
</inputs>

[edit] Return

A float value with the imputation allele freauency

[edit] See also

imputation_allele_frequency

[edit] Code

def imputation_allele_frequency_dosage(dosage):
   """
   >>> print imputation_allele_frequency_dosage([1.0388, 0.3234, 1.992, 0.0582])
   0.42655
   """
   l = float(len(dosage))
   return sum(dosage) / (2.0*l)

[edit] Unit Tests

def test_1(): 
    import doctest
    doctest.run_docstring_examples(imputation_allele_frequency_dosage, globals())

[edit] Development Code

def imputation_allele_frequency_dosage(dosage):
   """
   >>> print imputation_allele_frequency_dosage([1.0388, 0.3234, 1.992, 0.0582])
   0.42655
   """
   l = float(len(dosage))
   return sum(dosage) / (2.0*l)

[edit] Permissions

[edit] Documentation Permissions

Admin

[edit] Code Permissions

Admin

[edit] Unit Tests Permissions

Admin

[edit] Permissions Permissions

Admin

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox