Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
Update documentation for variant_utils.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 308677340
  • Loading branch information
MariaNattestad authored and copybara-github committed Apr 27, 2020
1 parent 1a99546 commit 31804d5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/source/nucleus/util/variant_utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Name | Description
[`only_call`](#only_call)`(variant)` | Ensures the Variant has exactly one VariantCall, and returns it.
[`set_info`](#set_info)`(variant, field_name, value, vcf_object=None)` | Sets a field of the info map of the `Variant` to the given value(s).
[`simplify_alleles`](#simplify_alleles)`(*alleles)` | Simplifies alleles by stripping off common postfix bases.
[`simplify_variant_alleles`](#simplify_variant_alleles)`(variant)` | Replaces the alleles in variants with their simplified versions.
[`sorted_variants`](#sorted_variants)`(variants)` | Returns sorted(variants, key=variant_range_tuple).
[`unphase_all_genotypes`](#unphase_all_genotypes)`(variant)` | Sorts genotype and removes phasing bit of all calls in variant.
[`variant_is_deletion`](#variant_is_deletion)`(variant, exclude_alleles=None)` | Are all the variant's alt alleles deletions?
Expand Down Expand Up @@ -613,6 +614,23 @@ Returns:
bases stripped off.
```

<a name="simplify_variant_alleles"></a>
### `simplify_variant_alleles(variant)`
```
Replaces the alleles in variants with their simplified versions.
This function takes a variant and replaces its ref and alt alleles with those
produced by a call to variant_utils.simplify_alleles() to remove common
postfix bases in the alleles that may be present due to pruning away alleles.
Args:
variant: learning.genomics.genomics.Variant proto we want to simplify.
Returns:
variant with its ref and alt alleles replaced with their simplified
equivalents.
```

<a name="sorted_variants"></a>
### `sorted_variants(variants)`
```
Expand Down

0 comments on commit 31804d5

Please sign in to comment.