Skip to content

Commit

Permalink
Merge pull request #12 from faridrashidi/release/v0.0.9
Browse files Browse the repository at this point in the history
release v0.0.9
  • Loading branch information
faridrashidi authored Jun 17, 2021
2 parents a00c9cf + 02dae1e commit c34cfd5
Show file tree
Hide file tree
Showing 103 changed files with 1,936 additions and 1,253 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.0.8
current_version = 0.0.9
commit = True
tag = False
files = setup.py trisicell/__init__.py
Expand Down
33 changes: 25 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
exclude: ^.bumpversion.cfg$ # trailing whitespace
exclude: ^.bumpversion.cfg$
- id: check-case-conflict
- id: check-docstring-first
# - id: check-yaml
Expand All @@ -45,10 +45,10 @@ repos:
- id: script-must-have-extension
name: Check executable files use .sh extension
types: [shell, executable]
# - repo: https://github.com/myint/rstcheck
# rev: 3f92957478422df87bd730abde66f089cc1ee19b
# hooks:
# - id: rstcheck
- repo: https://github.com/myint/rstcheck
rev: 3f92957478422df87bd730abde66f089cc1ee19b
hooks:
- id: rstcheck
- repo: https://github.com/asottile/blacken-docs
rev: v1.10.0
hooks:
Expand All @@ -67,7 +67,24 @@ repos:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
# - repo: https://github.com/PyCQA/doc8
# rev: 0.9.0a1
- repo: https://github.com/PyCQA/doc8
rev: 0.9.0a1
hooks:
- id: doc8
args: [--max-line-length=88]
# - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
# rev: v2.0.0
# hooks:
# - id: doc8
# - id: pretty-format-yaml
# args: [--autofix, --indent, '4']
- repo: https://github.com/PyCQA/flake8
rev: 3.9.0
hooks:
- id: flake8
additional_dependencies: [flake8-tidy-imports, flake8-docstrings, flake8-comprehensions, flake8-bugbear, flake8-blind-except]
args: [--max-line-length=88, --config=setup.cfg]
- repo: https://github.com/asottile/yesqa
rev: v1.2.2
hooks:
- id: yesqa
additional_dependencies: [flake8-tidy-imports, flake8-docstrings, flake8-comprehensions, flake8-bugbear, flake8-blind-except]
2 changes: 1 addition & 1 deletion .rstcheck.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[rstcheck]
ignore_messages=(Unknown target name:.*|No (directive|role) entry for "(auto)?(class|method|property|function|func|mod|module)" in module "docutils\.parsers\.rst\.languages\.en"\.)
ignore_messages=( No directive entry for.*|Hyperlink target.*|Unknown target name:.*|No (directive|role) entry for "(auto)?(class|method|property|function|func|mod|module)" in module "docutils\.parsers\.rst\.languages\.en"\.)
report=info
77 changes: 54 additions & 23 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
Contributing guidelines
~~~~~~~~~~~~~~~~~~~~~~~

Welcome to `Trisicell <https://github.com/faridrashidi/trisicell>`_! Before sending your pull requests, make sure that you **read the whole guidelines**. If you have any doubt on the contributing guide, please feel free to `state it clearly in an issue <https://github.com/faridrashidi/trisicell/issues/new/choose>`_.
Welcome to `Trisicell project <https://github.com/faridrashidi/trisicell>`_!
Before sending your pull requests, make sure that you **read the whole
guidelines**. If you have any doubt on the contributing guide, please
feel free to `state it clearly in an
issue <https://github.com/faridrashidi/trisicell/issues/new/choose>`_.

Table of Contents
=================
Expand All @@ -26,7 +30,8 @@ Install the development mode::

pip install -e '.[dev]'

Then install pre-commit. This will ensure that the pushed code passes the linting steps::
Then install pre-commit. This will ensure that the pushed code passes the
linting steps::

pre-commit install

Expand All @@ -37,13 +42,21 @@ The Trisicell project:

- `trisicell <trisicell>`_: the root of the package.

- `trisicell/io <trisicell/io>`_: the read/write module, offers a bunch of functions for reading and writing of the data.
- `trisicell/pl <trisicell/pl>`_: the plotting module, offers plotting the tree in clonal or dendrogram format.
- `trisicell/pp <trisicell/pp>`_: the preprocessing module, offers a bunch of functions for filtering and preprocessing of the data.
- `trisicell/tl <trisicell/tl>`_: the tools module, offers a high-level API to compute the conflict-free solution and calculating the probability of mutations seeding particular cells.
- `trisicell/ul <trisicell/ul>`_: the utils module, offers a bunch of utility functions.
- `trisicell/commands <trisicell/commands>`_: the CLI commands module, offers running trisicell in command-line interface (CLI) mode
- `trisicell/datasets <trisicell/datasets>`_: the datasets module, offers some of the published single-cell datasets and generating simulations
- `trisicell/io <trisicell/io>`_: the read/write module, offers a bunch of
functions for reading and writing of the data.
- `trisicell/pl <trisicell/pl>`_: the plotting module, offers plotting the
tree in clonal or dendrogram format.
- `trisicell/pp <trisicell/pp>`_: the preprocessing module, offers a bunch
of functions for filtering and preprocessing of the data.
- `trisicell/tl <trisicell/tl>`_: the tools module, offers a high-level API
to compute the conflict-free solution and calculating the probability of
mutations seeding particular cells.
- `trisicell/ul <trisicell/ul>`_: the utils module, offers a bunch of
utility functions.
- `trisicell/commands <trisicell/commands>`_: the CLI commands module,
offers running trisicell in command-line interface (CLI) mode.
- `trisicell/datasets <trisicell/datasets>`_: the datasets module, offers
some of the published single-cell datasets and generating simulations.

Tests structure:

Expand All @@ -52,12 +65,14 @@ Tests structure:

Code style guide
----------------
We rely on ``black`` and ``isort`` to do the most of the formatting - both of them are integrated as pre-commit hooks.
You can use ``pre-commit`` to check the changes::
We rely on ``black`` and ``isort`` to do the most of the formatting - both of
them are integrated as pre-commit hooks. You can use ``pre-commit`` to check
the changes::

make lint

Keep in mind to use tags like ``TODO[colon]`` and ``FIXME[colon]`` to make other developers aware of what to do next.
Keep in mind to use tags like ``TODO[colon]`` and ``FIXME[colon]`` to make
other developers aware of what to do next.


Testing
Expand All @@ -69,10 +84,13 @@ We use ``pytest`` to automate our testing. To execute the tests, run::

Writing documentation
---------------------
We use ``numpy``-style docstrings for the documentation with the following additions and modifications:
We use ``numpy``-style docstrings for the documentation with the following
additions and modifications:

- when referring to some argument within the same docstring, enclose that reference in \`\`.
- prefer putting references in the ``references.bib`` instead under the ``References`` sections of the docstring.
- when referring to some argument within the same docstring, enclose that
reference in \`\`.
- prefer putting references in the ``references.bib`` instead under the
``References`` sections of the docstring.

In order to build the documentation, run::

Expand All @@ -83,29 +101,42 @@ Building c files
----------------
For building ``.cpp`` files from ``.pyx`` files you need to execute::

CYTHONIZE=1 pip install -e .
CYTHONIZE=1 python setup.py install
pip install -e .


Submitting a PR
---------------
Before submitting a new pull request, please make sure you followed these instructions:
Before submitting a new pull request, please make sure you followed these
instructions:

- make sure that your code follows the above specified conventions (see `Code style guide`_ and `Writing documentation`_).
- if applicable, make sure you've added/modified at least 1 test to account for the changes you've made
- make sure that your code follows the above specified conventions (see
`Code style guide`_ and `Writing documentation`_).
- if applicable, make sure you've added/modified at least 1 test to account
for the changes you've made.
- make sure that all tests pass locally (see `Testing`_).
- if there is no issue which this PR solves, create a new `one <https://github.com/faridrashidi/trisicell/issues/new>`_ and briefly explaining what the problem is.
- if there is no issue which this PR solves, create a new
`one <https://github.com/faridrashidi/trisicell/issues/new>`_ and briefly
explaining what the problem is.


Creating a new release
----------------------
If you are a core developer and you want to create a new release, you need to install ``bump2version`` first as::
If you are a core developer and you want to create a new release, you need to
install ``bump2version`` first as::

pip install bump2version

Depending on what part of the release you want to update, you can run::

bump2version {major,minor,patch}

By default, this will create a new tag and automatically update the ``__version__`` wherever necessary, commit the changes and create a new tag. If you have uncommitted files in the tree, you can use ``--allow-dirty`` flag to include them in the commit.
By default, this will create a new tag and automatically update the
``__version__`` wherever necessary, commit the changes and create a new tag.
If you have uncommitted files in the tree, you can use ``--allow-dirty``
flag to include them in the commit.

After the version has been bumped, make sure to push the commit **AND** the newly create tag to the upstream. This can be done by e.g. setting ``push.followtags=true`` in your git config or use ``git push --atomic <branch> <tag>``.
After the version has been bumped, make sure to push the commit **AND**
the newly create tag to the upstream. This can be done by e.g. setting
``push.followtags=true`` in your git config or use
``git push --atomic <branch> <tag>``.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test:
pytest --disable-pytest-warnings --cov=trisicell ./tests
pytest --cov=trisicell ./tests
rm -rf .coverage*

lint:
Expand Down
32 changes: 21 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
|DOI| |Stars| |PyPI| |PyPIDownloads| |Contributions Welcome| |Build Status| |Docs Status| |Pre-commit| |Code Style|
|DOI| |Stars| |PyPI| |PyPIDownloads| |Contributions Welcome| |Build Status|
|Docs Status| |Pre-commit| |Code Style| |Code Score|


Trisicell - Scalable intratumor heterogeneity inference and validation from single-cell data
============================================================================================
Trisicell - |subst|
===================


.. image:: https://raw.githubusercontent.com/faridrashidi/trisicell/master/docs/source/_static/images/overview.png
:target: https://trisicell.readthedocs.io
:alt: overview
:align: center


Trisicell (**Tri**\ ple-toolkit for **si**\ ngle-\ **cell** intratumor heterogeneity inference),
pronounced as "tricycle", is a new computational toolkit for scalable intratumor heterogeneity inference
and evaluation from single-cell RNA, as well as single-cell genome or exome, sequencing data. Trisicell
utilizes expressed SNVs and Indels to infer evolutionary relationships between genomic alterations
and the cells that harbor them.
Trisicell (**Tri**\ ple-toolkit for **si**\ ngle-\ **cell** intratumor
heterogeneity inference), pronounced as "tricycle", is a new computational
toolkit for scalable intratumor heterogeneity inference and evaluation from
single-cell RNA, as well as single-cell genome or exome, sequencing data.
Trisicell utilizes expressed SNVs and Indels to infer evolutionary
relationships between genomic alterations and the cells that harbor them.


Manuscript
Expand All @@ -31,15 +34,18 @@ Your help to improve Trisicell is highly appreciated.
Trisicell was developed in collaboration between the `Cancer Data Science Laboratory (CDSL) <https://ccr.cancer.gov/cancer-data-science-laboratory>`_ and the `Laboratory of Cancer Biology and Genetics (LCBG) <https://ccr.cancer.gov/laboratory-of-cancer-biology-and-genetics>`_ at the `National Cancer Institute (NCI) <https://www.cancer.gov>`_.


.. |subst| replace:: Scalable intratumor heterogeneity inference and validation
from single-cell data

.. |DOI| image:: https://img.shields.io/badge/DOI-10.1101/2021.03.26.437185-orange?style=flat-square
:target: https://doi.org/10.1101/2021.03.26.437185
:alt: DOI

.. |PyPI| image:: https://img.shields.io/pypi/v/trisicell?style=flat-square&color=blue
.. |PyPI| image:: https://img.shields.io/pypi/v/trisicell?logo=PyPi&logoColor=FFFFFF&style=flat-square&color=blue
:target: https://pypi.org/project/trisicell
:alt: PyPI

.. |PyPIDownloads| image:: https://img.shields.io/badge/dynamic/json?style=flat-square&color=blue&label=downloads&query=%24.total_downloads&url=https%3A%2F%2Fapi.pepy.tech%2Fapi%2Fprojects%2Ftrisicell
.. |PyPIDownloads| image:: https://img.shields.io/badge/dynamic/json?logo=PyPi&logoColor=FFFFFF&style=flat-square&color=blue&label=downloads&query=%24.total_downloads&url=https%3A%2F%2Fapi.pepy.tech%2Fapi%2Fprojects%2Ftrisicell
:target: https://pepy.tech/project/trisicell
:alt: PyPIDownloads

Expand All @@ -51,7 +57,7 @@ Trisicell was developed in collaboration between the `Cancer Data Science Labora
:target: https://github.com/faridrashidi/trisicell/blob/master/CONTRIBUTING.rst
:alt: Contributions Welcome

.. |Build Status| image:: https://img.shields.io/github/workflow/status/faridrashidi/trisicell/CI/master?label=CI&logo=github&style=flat-square
.. |Build Status| image:: https://img.shields.io/github/workflow/status/faridrashidi/trisicell/CI/master?label=build&logo=github&style=flat-square
:target: https://github.com/faridrashidi/trisicell/actions?query=workflow%3ACI
:alt: Build Status

Expand All @@ -67,4 +73,8 @@ Trisicell was developed in collaboration between the `Cancer Data Science Labora
:target: https://github.com/python/black
:alt: Code Style

.. |Code Score| image:: https://img.shields.io/lgtm/grade/python/github/faridrashidi/trisicell.svg?logo=lgtm&logoWidth=18&style=flat-square
:target: https://lgtm.com/projects/g/faridrashidi/trisicell/context:python
:alt: Code Style

.. _preprint: https://doi.org/10.1101/2021.03.26.437185
Loading

0 comments on commit c34cfd5

Please sign in to comment.