Skip to content

Commit

Permalink
Merge pull request #35 from apriha/develop
Browse files Browse the repository at this point in the history
v0.6.0
  • Loading branch information
apriha committed Nov 2, 2019
2 parents 7a49923 + 97940b4 commit a798a61
Show file tree
Hide file tree
Showing 20 changed files with 695 additions and 206 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,4 @@ tests/input/discrepant_snps[12].csv
tests/input/empty.txt
tests/input/ftdna.csv.gz
tests/input/generic.fa.gz
tests/input/testvcf.vcf.gz
3 changes: 3 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ verify_ssl = true
pytest = "*"
pytest-cov = "*"
pytest-watch = "*"
sphinx = "*"
sphinx-rtd-theme = "*"
black = "==19.10b0"

[packages]
snps = {editable = true,path = "."}
Expand Down
367 changes: 316 additions & 51 deletions Pipfile.lock

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Dependencies
- `numpy <http://www.numpy.org>`_
- `pandas <http://pandas.pydata.org>`_
- `atomicwrites <https://github.com/untitaker/python-atomicwrites>`_
- `PyVCF <https://github.com/jamescasbon/PyVCF>`_

Installation
------------
Expand All @@ -48,7 +47,14 @@ Examples
--------
Download Example Data
`````````````````````
Let's download some example data from `openSNP <https://opensnp.org>`_:
First, let's setup logging to get some helpful output:

>>> import logging, sys
>>> logger = logging.getLogger()
>>> logger.setLevel(logging.DEBUG)
>>> logger.addHandler(logging.StreamHandler(sys.stdout))

Now we're ready to download some example data from `openSNP <https://opensnp.org>`_:

>>> from snps.resources import Resources
>>> r = Resources()
Expand All @@ -63,7 +69,8 @@ Load a `23andMe <https://www.23andme.com>`_ raw data file:
>>> from snps import SNPs
>>> s = SNPs('resources/662.23andme.340.txt.gz')

The loaded SNPs are available via a ``pandas.DataFrame``:
The ``SNPs`` class accepts a path to a file or a bytes object. A ``Reader`` class attempts to
infer the data source and load the SNPs. The loaded SNPs are available via a ``pandas.DataFrame``:

>>> df = s.snps
>>> df.columns.values
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __getattr__(cls, name):
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_static_path = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
README <readme>
output_files
snps_banner
snps

Indices and tables
==================
Expand Down
7 changes: 0 additions & 7 deletions docs/modules.rst

This file was deleted.

25 changes: 12 additions & 13 deletions docs/snps.rst
Original file line number Diff line number Diff line change
@@ -1,46 +1,45 @@
snps package
============

Module
------

.. automodule:: snps
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

snps\.ensembl module
--------------------
~~~~~~~~~~~~~~~~~~~~

.. automodule:: snps.ensembl
:members:
:undoc-members:
:show-inheritance:

snps\.io module
---------------
~~~~~~~~~~~~~~~

.. automodule:: snps.io
:members:
:undoc-members:
:show-inheritance:

snps\.resources module
----------------------
~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: snps.resources
:members:
:undoc-members:
:show-inheritance:

snps\.utils module
------------------
~~~~~~~~~~~~~~~~~~

.. automodule:: snps.utils
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: snps
:members:
:undoc-members:
:show-inheritance:
8 changes: 0 additions & 8 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,8 @@ addopts =
--tb=short

# http://coverage.readthedocs.io/en/latest/
[coverage:paths]
source =
src
*/site-packages

[coverage:run]
branch = true
source =
src
tests
omit = */snps/_version.py

[coverage:report]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"Issue Tracker": "https://github.com/apriha/snps/issues",
},
keywords="snps dna chromosomes bioinformatics",
install_requires=["numpy", "pandas", "atomicwrites", "PyVCF"],
install_requires=["numpy", "pandas", "atomicwrites"],
python_requires=">=3.5",
platforms=["any"],
)
Loading

0 comments on commit a798a61

Please sign in to comment.