Skip to content

Commit

Permalink
Merge pull request #114 from faridrashidi/develop
Browse files Browse the repository at this point in the history
release v0.1.0
  • Loading branch information
faridrashidi authored Jun 25, 2022
2 parents c5a6a0e + fa64456 commit 4847b14
Show file tree
Hide file tree
Showing 14 changed files with 116 additions and 16 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.21
current_version = 0.1.0
commit = True
message = [skip ci] {current_version} → {new_version}
tag = False
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
fail-fast: false
max-parallel: 20
matrix:
python: [3.6, 3.7, 3.8, 3.9]
python: [3.7, 3.8, 3.9]
os: [ubuntu-latest, macos-latest]
env:
OS: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
- id: check-merge-conflict
- id: check-ast
- id: check-symlinks
- id: check-added-large-files
# - id: check-added-large-files
- id: check-executables-have-shebangs
- id: fix-encoding-pragma
args: [--remove]
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
clean:
rm -rf docs/build
rm -rf htmlcov
rm -rf .coverage*
rm -rf docs/source/trisicell*
rm -rf docs/source/auto_examples
rm -rf docs/source/gen_modules

test:
pytest --cov=trisicell ./tests
rm -rf .coverage*
Expand Down
2 changes: 2 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,5 @@ This module offers a bunch of functions for simulating data.
:toctree: .

datasets.example
datasets.sublines_bwes
datasets.sublines_scrnaseq
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"sklearn": ("https://scikit-learn.org/stable/", None),
"seaborn": ("https://seaborn.pydata.org/", None),
"anndata": ("https://anndata.readthedocs.io/en/latest/", None),
"mudata": ("https://mudata.readthedocs.io/en/latest/", None),
}


Expand Down
29 changes: 19 additions & 10 deletions docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@ Release Notes
=============


Version 0.1.0 :small:`June 24, 2022`
------------------------------------

This version includes:

- Add sublines bWES dataset.
- Add sublines scRNAseq dataset.


Version 0.0.21 :small:`April 22, 2022`
-----------------------------------------
--------------------------------------

This version includes:

Expand Down Expand Up @@ -93,7 +102,7 @@ This version includes:


Version 0.0.12 :small:`July 7, 2021`
-------------------------------------
------------------------------------

This version includes:

Expand All @@ -102,7 +111,7 @@ This version includes:


Version 0.0.11 :small:`July 4, 2021`
-------------------------------------
------------------------------------

This version includes:

Expand All @@ -112,7 +121,7 @@ This version includes:


Version 0.0.10 :small:`July 3, 2021`
-------------------------------------
------------------------------------

This version includes:

Expand All @@ -121,7 +130,7 @@ This version includes:


Version 0.0.9 :small:`June 17, 2021`
-------------------------------------
------------------------------------

This version includes:

Expand All @@ -130,7 +139,7 @@ This version includes:


Version 0.0.8 :small:`June 12, 2021`
-------------------------------------
------------------------------------

This version includes:

Expand All @@ -139,7 +148,7 @@ This version includes:


Version 0.0.7 :small:`May 29, 2021`
-------------------------------------
-----------------------------------

This version includes:

Expand All @@ -152,7 +161,7 @@ This version includes:


Version 0.0.6 :small:`May 25, 2021`
-------------------------------------
-----------------------------------

This version includes:

Expand All @@ -168,7 +177,7 @@ This version includes:


Version 0.0.5 :small:`May 4, 2021`
-------------------------------------
----------------------------------

This version includes:

Expand All @@ -186,7 +195,7 @@ This version includes:


Version 0.0.3 :small:`April 8, 2021`
-------------------------------------
------------------------------------

This version includes:

Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ ete3
ipython
joblib
matplotlib
mudata
natsort
networkx
networkx<=2.8.3
numba
numpy
pandas
Expand Down
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.21"
__version__ = "0.1.0"

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.21"
__version__ = "0.1.0"
__all__ = (datasets, io, logg, pl, pp, settings, tl, ul)
4 changes: 4 additions & 0 deletions trisicell/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
myeloproliferative_neoplasms712,
oligodendroglioma_idh_mutated_tumor,
renal_cell_carcinoma,
sublines_bwes,
sublines_scrnaseq,
test,
tnbc,
)
Expand Down Expand Up @@ -56,4 +58,6 @@
simulate,
add_noise,
add_doublets,
sublines_bwes,
sublines_scrnaseq,
)
75 changes: 75 additions & 0 deletions trisicell/datasets/_datasets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,81 @@
import mudata as md

import trisicell as tsc


def sublines_scrnaseq():
"""Trisicell sublines scRNAseq data.
The size is n_cells × n_muts = 175 × 450
Returns
-------
:class:`mudata.MuData`
A mudata with two modalities (`.mod`)
Examples
--------
>>> mdata = tsc.datasets.sublines_scrnaseq()
>>> mdata
MuData object with n_obs × n_vars = 175 × 55851
2 modalities
expression: 175 x 55401
obs: 'cells', 'uniquely_mapped_percent', 'num_splices', ...
layers: 'fpkm', 'tpm'
mutation: 175 x 450
obs: 'cells', 'clone', 'group', 'group_color', 'is_red', 'is_sub', ...
var: 'kind', 'amino_acid_change', 'ensemble', 'gene', 'chrom', ...
layers: 'genotype', 'mutant', 'total', 'trisicell_input', 'trisicell_output'
See Also
--------
:func:`trisicell.datasets.sublines_bwes`.
"""

mdata = md.read_h5mu(
tsc.ul.get_file("trisicell.datasets/data/sublines_scrnaseq.h5md.gz")
)
return mdata


def sublines_bwes():
"""Trisicell sublines bWES data.
The size is n_sublines × n_muts = 24 × 6653
Returns
-------
:class:`anndata.AnnData`
An anndata in which `.var` contains information about the mutations.
- `.layers['trisicell_input']` the binary input genotype matrix used as
input to the Trisicell.
- `.layers['trisicell_output']` the binary input genotype matrix inferred by
Trisicell-boost(SCITE).
- `.layers['genotype']` noisy genotype matrix, 0: reference, 1: heterozygous
2: unknown and 3: homozygous_alt.
- `.layers['mutant']` number of mutant reads.
- `.layers['total']` number of total reads.
Examples
--------
>>> adata = tsc.datasets.sublines_bwes()
>>> adata
AnnData object with n_obs × n_vars = 24 × 6653
var: 'kind', 'amino_acid_change', 'ensemble', 'gene', 'chrom', 'position', ...
layers: 'genotype', 'mutant', 'total', 'trisicell_input', 'trisicell_output'
See Also
--------
:func:`trisicell.datasets.sublines_scrnaseq`.
"""
adata = tsc.io.read(
tsc.ul.get_file("trisicell.datasets/data/sublines_bwes.h5ad.gz")
)
return adata


def example(is_expression=False):
"""Return an example for sanity checking and playing with Trisicell.
Expand Down
Binary file added trisicell/datasets/data/sublines_scrnaseq.h5md.gz
Binary file not shown.
Binary file added trisicell/datasets/data/sublines_wes.h5ad.gz
Binary file not shown.

0 comments on commit 4847b14

Please sign in to comment.