Skip to content

Commit

Permalink
Merge pull request #84 from KrishnaswamyLab/dev
Browse files Browse the repository at this point in the history
scprep v1.0.0
  • Loading branch information
scottgigante authored Oct 8, 2019
2 parents f64a098 + fce05c1 commit f0fa702
Show file tree
Hide file tree
Showing 61 changed files with 2,777 additions and 419 deletions.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Standalone code to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Actual behavior**
Include full traceback if applicable.

**scprep version**
Output of `scprep.__version__`

**Output of `pd.show_versions()`**

<details>

```
paste pd.show_versions() here
```

</details>

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or code snippets related to the feature request here.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
- gfortran
- libblas-dev
- liblapack-dev
- libglu1-mesa-dev
- freeglut3-dev
- mesa-common-dev
- libgsl-dev

cache:
- pip
Expand All @@ -25,7 +29,7 @@
- $HOME/R/Library

install:
- python setup.py install
- pip install -U .

before_script:
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
Expand Down
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

Contributing to scprep
============================

There are many ways to contribute to `scprep`, with the most common ones
being contribution of code or documentation to the project. Improving the
documentation is no less important than improving the library itself. If you
find a typo in the documentation, or have made improvements, do not hesitate to
submit a GitHub pull request.

But there are many other ways to help. In particular answering queries on the
[issue tracker](https://github.com/KrishnaswamyLab/scprep/issues),
investigating bugs, and [reviewing other developers' pull
requests](https://github.com/KrishnaswamyLab/scprep/pulls)
are very valuable contributions that decrease the burden on the project
maintainers.

Another way to contribute is to report issues you're facing, and give a "thumbs
up" on issues that others reported and that are relevant to you. It also helps
us if you spread the word: reference the project from your blog and articles,
link to it from your website, or simply star it in GitHub to say "I use it".

Code of Conduct
---------------

We abide by the principles of openness, respect, and consideration of others
of the Python Software Foundation: https://www.python.org/psf/codeofconduct/.

Attribution
---------------

This `CONTRIBUTING.md` was adapted from [scikit-learn](https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md).
15 changes: 10 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
=============
scprep
=============
.. image:: logo.png
:alt: scprep logo

.. image:: https://img.shields.io/pypi/v/scprep.svg
:target: https://pypi.org/project/scprep/
Expand All @@ -24,8 +23,14 @@ scprep
:target: https://github.com/KrishnaswamyLab/scprep/
:alt: GitHub stars

`scprep` provides an all-in-one framework for loading, preprocessing, and plotting matrices in Python, with a focus on single-cell genomics.

Tools for loading and preprocessing biological matrices in Python.
The philosophy of `scprep`:

* Data shouldn't be hidden in a complex and bespoke class object. `scprep` works with `numpy` arrays, `pandas` data frames, and `scipy` sparse matrices, all of which are popular data formats in Python and accepted as input to most common algorithms.
* Your analysis pipeline shouldn't have to change based on data format. Changing from a `numpy` array to a `pandas` data frame introduces endless technical differences (e.g. in indexing matrices). `scprep` provides data-agnostic methods that work the same way on all formats.
* Simple analysis should mean simple code. `scprep` takes care of annoying edge cases and sets nice defaults so you don't have to.
* Using a framework shouldn't be limiting. Because nothing is hidden from you, you have access to the power of `numpy`, `scipy`, `pandas` and `matplotlib` just as you would if you used them directly.

Installation
------------
Expand Down Expand Up @@ -72,4 +77,4 @@ Examples
Help
----

If you have any questions or require assistance using scprep, please read the documentation at https://scprep.readthedocs.io/ or contact us at https://krishnaswamylab.org/get-help
If you have any questions or require assistance using scprep, please read the documentation at https://scprep.readthedocs.io/ or contact us at https://krishnaswamylab.org/get-help
17 changes: 12 additions & 5 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
===========================================================================
scprep
===========================================================================
.. raw:: html

<a href="https://github.com/KrishnaswamyLab/scprep/"><img src="https://raw.githubusercontent.com/KrishnaswamyLab/scprep/dev/logo.png" alt="scprep logo"></a><br>

.. raw:: html

Expand All @@ -26,7 +26,14 @@ scprep

<a href="https://github.com/KrishnaswamyLab/scprep/"><img src="https://img.shields.io/github/stars/KrishnaswamyLab/scprep.svg?style=social&label=Stars" alt="GitHub stars"></a>

Tools for building and manipulating graphs in Python.
`scprep` provides an all-in-one framework for loading, preprocessing, and plotting matrices in Python, with a focus on single-cell genomics.

The philosophy of `scprep`:

* Data shouldn't be hidden in a complex and bespoke class object. `scprep` works with `numpy` arrays, `pandas` data frames, and `scipy` sparse matrices, all of which are popular data formats in Python and accepted as input to most common algorithms.
* Your analysis pipeline shouldn't have to change based on data format. Changing from a `numpy` array to a `pandas` data frame introduces endless technical differences (e.g. in indexing matrices). `scprep` provides data-agnostic methods that work the same way on all formats.
* Simple analysis should mean simple code. `scprep` takes care of annoying edge cases and sets nice defaults so you don't have to.
* Using a framework shouldn't be limiting. Because nothing is hidden from you, you have access to the power of `numpy`, `scipy`, `pandas` and `matplotlib` just as you would if you used them directly.

.. toctree::
:maxdepth: 2
Expand Down Expand Up @@ -63,4 +70,4 @@ You can use `scprep` with your single cell data as follows::
Help
====

If you have any questions or require assistance using scprep, please contact us at https://krishnaswamylab.org/get-help
If you have any questions or require assistance using scprep, please contact us at https://krishnaswamylab.org/get-help
33 changes: 30 additions & 3 deletions doc/source/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@ Data Input/Output
:imported-members:
:show-inheritance:

HDF5
~~~~

.. automodule:: scprep.io.hdf5
:autosummary:
:members:
:inherited-members:
:show-inheritance:

Download
~~~~~~~~

.. automodule:: scprep.io.download
:autosummary:
:members:
:inherited-members:
:show-inheritance:

Filtering
---------

Expand Down Expand Up @@ -103,10 +121,19 @@ External Tools
:imported-members:
:show-inheritance:

HDF5
----
Splatter
~~~~~~~~

.. automodule:: scprep.io.hdf5
.. automodule:: scprep.run.splatter
:autosummary:
:members:
:inherited-members:
:show-inheritance:

Slingshot
~~~~~~~~~

.. automodule:: scprep.run.slingshot
:autosummary:
:members:
:inherited-members:
Expand Down
10 changes: 5 additions & 5 deletions doc/source/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
numpy>=1.10.0
scipy>=0.18.0
numpy>=1.12.0
scipy>=0.18.1
scikit-learn>=0.19.1
pandas>=0.19.0,<0.24
decorator
matplotlib
pandas>=0.25
decorator>=4.3.0
matplotlib>=3.0
sphinx<=1.8.5
sphinxcontrib-napoleon
autodocsumm
Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy>=1.10.0
scipy>=0.18.0
numpy>=1.12.0
scipy>=0.18.1
scikit-learn>=0.19.1
pandas>=0.19.0,<0.24
pandas>=0.25
decorator>=4.3.0
18 changes: 10 additions & 8 deletions scprep/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
import scprep.reduce
import scprep.run

import pandas as _pd
if int(_pd.__version__.split(".")[1]) < 24:
import numpy as _np

def __rmatmul__(self, other):
""" Matrix multiplication using binary `@` operator in Python>=3.5 """
return self.dot(_np.transpose(other))
_pd.core.series.Series.__rmatmul__ = __rmatmul__
import pandas as pd
if int(pd.__version__.split('.')[1]) < 26:
def fill_value(self):
# Used in reindex_indexer
try:
return self.values.dtype.fill_value
except AttributeError:
return self.values.dtype.na_value
from pandas.core.internals.blocks import ExtensionBlock
setattr(ExtensionBlock, 'fill_value', property(fill_value))
3 changes: 2 additions & 1 deletion scprep/_lazyload.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
'rinterface',
{'rinterface_lib': ['callbacks']}],
'h5py': [],
'tables': []
'tables': [],
'statsmodels': [{'nonparametric': ['smoothers_lowess']}],
}


Expand Down
Loading

0 comments on commit f0fa702

Please sign in to comment.