Skip to content

Commit

Permalink
Merge pull request #33 from dbolser/patch-1
Browse files Browse the repository at this point in the history
Update usage.rst
  • Loading branch information
horta committed Mar 5, 2024
2 parents b580df7 + 8f67a54 commit de1b160
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions doc/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ It is as simple as:
a0 (variant) object 'C' 'G' 'G' 'C' 'C' 'T' ... 'A' 'C' 'A' 'A' 'T'
a1 (variant) object 'T' 'C' 'C' 'T' 'T' 'A' ... 'G' 'T' 'G' 'C' 'C'

The matrix :data:`G` is a special matrix: :class:`xarray.DataArray`. It provides labes
The matrix :data:`G` is a special matrix: :class:`xarray.DataArray`. It provides labels
for its dimensions (:const:`"sample"` for rows and :const:`"variant"` for columns) and
additional metadata for those dimensions.
Lets print the genotype value of sample :const:`"B003"` and variant :const:`"variant5"`:
Expand All @@ -62,9 +62,10 @@ Lets print the genotype value of sample :const:`"B003"` and variant :const:`"var
>>> print(G.a0.sel(variant=variant).values)
T

It means that sample :data:`"B003"` has two alleles **T** at the variant
It shows that sample :data:`"B003"` has two **T** alleles (`a0`) at the variant
:data:`"variant5"`.
Likewise, sample :data:`"B003"` has two alleles **C** at the variant

Likewise, sample :data:`"B003"` has two **C** alleles (`a1`) at the variant
:data:`"variant135"`:

.. doctest::
Expand All @@ -75,6 +76,8 @@ Likewise, sample :data:`"B003"` has two alleles **C** at the variant
>>> print(G.a1.sel(variant=variant).values)
C

To see how the genotype value maps to the alleles, see below.

Now lets print a summary of the genotype values:

.. doctest::
Expand Down

0 comments on commit de1b160

Please sign in to comment.