Skip to content

Commit 98c67b5

Browse files
authored
Merge pull request #97 from apriha/develop
v4.1.2
2 parents e58bd2b + d75c710 commit 98c67b5

File tree

6 files changed

+658
-597
lines changed

6 files changed

+658
-597
lines changed

Pipfile.lock

Lines changed: 264 additions & 281 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Capabilities
1313
- Compute centiMorgans (cMs) of shared DNA using a variety of genetic maps (e.g., HapMap Phase II, 1000 Genomes Project)
1414
- Plot shared DNA between individuals
1515
- Find discordant SNPs between child and parent(s)
16-
- Read, write, merge, and remaps SNPs for an individual via the `snps <https://github.com/apriha/snps>`_ package
16+
- Read, write, merge, and remap SNPs for an individual via the `snps <https://github.com/apriha/snps>`_ package
1717

1818
Supported Genotype Files
1919
------------------------
@@ -27,7 +27,7 @@ Python dependencies) via ``pip``::
2727

2828
$ pip install lineage
2929

30-
Also see the `installation documentation <https://lineage.readthedocs.io/en/latest/installation.html>`_.
30+
Also see the `installation documentation <https://lineage.readthedocs.io/en/stable/installation.html>`_.
3131

3232
Dependencies
3333
------------
@@ -91,7 +91,7 @@ files for this individual. Specifically:
9191
151 SNP genotypes were found to be discrepant.
9292

9393
``user662`` is represented by an ``Individual`` object, which inherits from ``snps.SNPs``.
94-
Therefore, all of the `properties and methods <https://snps.readthedocs.io/en/latest/snps.html>`_
94+
Therefore, all of the `properties and methods <https://snps.readthedocs.io/en/stable/snps.html>`_
9595
available to a ``SNPs`` object are available here; for example:
9696

9797
>>> len(user662.discrepant_merge_genotypes)
@@ -117,15 +117,15 @@ Loading SNPs('resources/663.23andme.305.txt.gz')
117117

118118
Now we can perform some analysis between the ``User662`` and ``User663`` datasets.
119119

120-
`Find Discordant SNPs <https://lineage.readthedocs.io/en/latest/lineage.html#lineage.Lineage.find_discordant_snps>`_
120+
`Find Discordant SNPs <https://lineage.readthedocs.io/en/stable/lineage.html#lineage.Lineage.find_discordant_snps>`_
121121
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
122122
First, let's find discordant SNPs (i.e., SNP data that is not consistent with Mendelian
123123
inheritance):
124124

125125
>>> discordant_snps = l.find_discordant_snps(user662, user663, save_output=True)
126126
Saving output/discordant_snps_User662_User663_GRCh37.csv
127127

128-
All `output files <https://lineage.readthedocs.io/en/latest/output_files.html>`_ are saved to
128+
All `output files <https://lineage.readthedocs.io/en/stable/output_files.html>`_ are saved to
129129
the output directory (a parameter to ``Lineage``).
130130

131131
This method also returns a ``pandas.DataFrame``, and it can be inspected interactively at
@@ -136,7 +136,7 @@ the prompt, although the same output is available in the CSV file.
136136

137137
Not counting mtDNA SNPs, there are 37 discordant SNPs between these two datasets.
138138

139-
`Find Shared DNA <https://lineage.readthedocs.io/en/latest/lineage.html#lineage.Lineage.find_shared_dna>`_
139+
`Find Shared DNA <https://lineage.readthedocs.io/en/stable/lineage.html#lineage.Lineage.find_shared_dna>`_
140140
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
141141
``lineage`` uses the probabilistic recombination rates throughout the human genome from the
142142
`International HapMap Project <https://www.genome.gov/10001688/international-hapmap-project/>`_
@@ -173,14 +173,14 @@ In this example, there are 27 segments of shared DNA:
173173
>>> len(results['one_chrom_shared_dna'])
174174
27
175175

176-
Also, `output files <https://lineage.readthedocs.io/en/latest/output_files.html>`_ are
176+
Also, `output files <https://lineage.readthedocs.io/en/stable/output_files.html>`_ are
177177
created; these files are detailed in the documentation and their generation can be disabled with a
178178
``save_output=False`` argument. In this example, the output files consist of a CSV file that
179179
details the shared segments of DNA on one chromosome and a plot that illustrates the shared DNA:
180180

181181
.. image:: https://raw.githubusercontent.com/apriha/lineage/master/docs/images/shared_dna_User662_User663_HapMap2.png
182182

183-
`Find Shared Genes <https://lineage.readthedocs.io/en/latest/lineage.html#lineage.Lineage.find_shared_dna>`_
183+
`Find Shared Genes <https://lineage.readthedocs.io/en/stable/lineage.html#lineage.Lineage.find_shared_dna>`_
184184
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
185185
The `Central Dogma of Molecular Biology <https://en.wikipedia.org/wiki/Central_dogma_of_molecular_biology>`_
186186
states that genetic information flows from DNA to mRNA to proteins: DNA is transcribed into
@@ -251,7 +251,7 @@ Thanks to Whit Athey, Ryan Dale, Binh Bui, Jeff Gill, Gopal Vashishtha,
251251
:target: https://github.com/apriha/lineage/actions/workflows/ci.yml
252252
.. |codecov| image:: https://codecov.io/gh/apriha/lineage/branch/master/graph/badge.svg
253253
:target: https://codecov.io/gh/apriha/lineage
254-
.. |docs| image:: https://readthedocs.org/projects/lineage/badge/?version=latest
254+
.. |docs| image:: https://readthedocs.org/projects/lineage/badge/?version=stable
255255
:target: https://lineage.readthedocs.io/
256256
.. |pypi| image:: https://img.shields.io/pypi/v/lineage.svg
257257
:target: https://pypi.python.org/pypi/lineage

src/lineage/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def find_shared_dna(
410410
df = df.join(ind.snps["genotype"], how="inner")
411411
df = df.rename(columns={"genotype": cols[i + 1]})
412412

413-
# set a flag for if one individuals is male (i.e., only one chromosome match on the X
413+
# set a flag for if one individual is male (i.e., only one chromosome match on the X
414414
# chromosome is possible in the non-PAR region)
415415
one_x_chrom = self._is_one_individual_male(individuals)
416416

tests/__init__.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@
3737
class BaseLineageTestCase(TestCase):
3838
def setUp(self):
3939
self.l = Lineage()
40-
self.del_output_dir_helper()
41-
42-
def tearDown(self):
43-
self.del_output_dir_helper()
44-
45-
@staticmethod
46-
def del_output_dir_helper():
47-
if os.path.exists("output"):
48-
shutil.rmtree("output")
4940

5041
def simulate_snps(
5142
self,

0 commit comments

Comments
 (0)