Skip to content

Commit

Permalink
release v0.0.12 (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
faridrashidi authored Jul 7, 2021
1 parent 70969a5 commit 53bcbdd
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 18 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.11
current_version = 0.0.12
commit = True
tag = False
files = setup.py trisicell/__init__.py
Expand Down
31 changes: 22 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
|DOI| |Stars| |PyPI| |PyPIDownloads| |Contributions Welcome| |Build Status|
|Docs Status| |Pre-commit| |Code Score| |Code Style|
|DOI| |Stars| |Compatible| |PyPI| |PyPiDownloads| |Contributions Welcome| |Build Status|
|Docs Status| |Pre-commit| |Code Score| |License| |Code Style|


Trisicell - |subst|
Expand Down Expand Up @@ -37,39 +37,47 @@ Trisicell was developed in collaboration between the `Cancer Data Science Labora
.. |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
.. |DOI| image:: https://img.shields.io/badge/DOI-10.1101/2021.03.26.437185-orange?logo=gitbook&logoColor=FFFFFF&style=flat-square
:target: https://doi.org/10.1101/2021.03.26.437185
:alt: DOI

.. |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?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
.. |PyPyDownloads| 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
:alt: PyPyDownloads

.. |PyPiDownloads| image:: https://img.shields.io/pypi/dm/trisicell.svg?logo=docusign&logoColor=FFFFFF&style=flat-square&color=blue
:target: https://pepy.tech/project/trisicell
:alt: PyPiDownloads

.. |Stars| image:: https://img.shields.io/github/stars/faridrashidi/trisicell?logo=GitHub&color=yellow&style=flat-square
:target: https://github.com/faridrashidi/trisicell
:alt: Stars

.. |Contributions Welcome| image:: https://img.shields.io/static/v1.svg?label=contributions&message=welcome&color=0059b3&style=flat-square
.. |Contributions Welcome| image:: https://img.shields.io/static/v1.svg?label=contributions&message=welcome&color=0059b3&logo=handshake&logoColor=FFFFFF&style=flat-square
: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=build&logo=github&style=flat-square
.. |Compatible| image:: https://img.shields.io/pypi/pyversions/trisicell.svg?logo=python&logoColor=FFFFFF&style=flat-square&color=blue
:target: https://pypi.org/project/trisicell
:alt: Compatible

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

.. |Docs Status| image:: https://readthedocs.org/projects/trisicell/badge/?version=latest&style=flat-square
.. |Docs Status| image:: https://img.shields.io/readthedocs/trisicell/latest?logo=readthedocs&logoColor=FFFFFF&style=flat-square
:target: https://trisicell.readthedocs.io
:alt: Docs Status

.. |Pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white&style=flat-square
:target: https://github.com/pre-commit/pre-commit
:alt: Pre-commit

.. |Code Style| image:: https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square
.. |Code Style| image:: https://img.shields.io/badge/code%20style-black-000000.svg?logo=visualstudiocode&logoColor=FFFFFF&style=flat-square
:target: https://github.com/python/black
:alt: Code Style

Expand All @@ -81,4 +89,9 @@ Trisicell was developed in collaboration between the `Cancer Data Science Labora
:target: https://codecov.io/gh/faridrashidi/trisicell
:alt: Codecov

.. |License| image:: https://img.shields.io/pypi/l/trisicell.svg?logo=creativecommons&logoColor=FFFFFF&style=flat-square&color=blueviolet
:target: https://github.com/faridrashidi/trisicell/blob/master/LICENSE
:alt: License


.. _preprint: https://doi.org/10.1101/2021.03.26.437185
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__author__ = ", ".join(["Farid Rashidi"])
__maintainer__ = ", ".join(["Farid Rashidi"])
__email__ = ", ".join(["[email protected]"])
__version__ = "0.0.11"
__version__ = "0.0.12"

if platform == "linux" or platform == "linux2":
os.environ["CC"] = "g++"
Expand Down
2 changes: 1 addition & 1 deletion trisicell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
__author__ = ", ".join(["Farid Rashidi"])
__maintainer__ = ", ".join(["Farid Rashidi"])
__email__ = ", ".join(["[email protected]"])
__version__ = "0.0.11"
__version__ = "0.0.12"
__all__ = (datasets, io, logg, pl, pp, settings, tl, ul)
16 changes: 13 additions & 3 deletions trisicell/commands/_phiscs.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,21 @@ def phiscsb(genotype_file, alpha, beta):
)
@click.option(
"--time_out",
"-to",
"-t",
default=86400,
type=int,
show_default=True,
help="Timelimit of the program.",
)
def phiscsi(genotype_file, alpha, beta, time_out):
@click.option(
"--n_threads",
"-p",
default=1,
type=int,
show_default=True,
help="Number of threads.",
)
def phiscsi(genotype_file, alpha, beta, time_out, n_threads):
"""PhISCS-I.
A combinatorial approach for subperfect
Expand All @@ -87,7 +95,9 @@ def phiscsi(genotype_file, alpha, beta, time_out):
tsc.settings.logfile = f"{outfile}.phiscsi.log"

df_in = tsc.io.read(genotype_file)
df_out = tsc.tl.phiscsi(df_in, alpha=alpha, beta=beta, time_out=time_out)
df_out = tsc.tl.phiscsi(
df_in, alpha=alpha, beta=beta, time_out=time_out, n_threads=n_threads
)
tsc.io.write(df_out, f"{outfile}.phiscsi.CFMatrix")

return None
7 changes: 4 additions & 3 deletions trisicell/tl/solver/_phiscs.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,14 @@ def phiscsb(df_input, alpha, beta, experiment=False):
return df_output


def phiscsi(df_input, alpha, beta, time_out=86400):
def phiscsi(df_input, alpha, beta, time_out=86400, n_threads=1):
gp, gp_is_not_imported = tsc.ul.import_gurobi()
if gp_is_not_imported:
tsc.logg.error("Unable to import a package!")

tsc.logg.info(
f"running PhISCS-I with alpha={alpha}, beta={beta}, time_out={time_out}"
f"running PhISCS-I with alpha={alpha}, beta={beta}, time_out={time_out}, "
f"n_threads={n_threads}"
)
cells = list(df_input.index)
snvs = list(df_input.columns)
Expand All @@ -140,7 +141,7 @@ def phiscsi(df_input, alpha, beta, time_out=86400):
model = gp.Model("ILP")
model.Params.OutputFlag = 0
model.Params.LogFile = ""
model.Params.Threads = 1
model.Params.Threads = n_threads
model.Params.TimeLimit = time_out

num_cells = len(cells)
Expand Down
3 changes: 3 additions & 0 deletions trisicell/tl/solver/booster/_subsamples.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def subsampling(
# )
# tsc.logg.info(f"id,m,i0,i1,i3,o0,o1,f01,f10,f30,f31,r")

if solver.lower() == "scite":
time_out = n_iterations

@tsc.ul.with_timeout(time_out)
def run(i):
if sample_on == "muts":
Expand Down

0 comments on commit 53bcbdd

Please sign in to comment.