-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from faridrashidi/develop
release v0.0.19
- Loading branch information
Showing
44 changed files
with
611 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,5 @@ pyyaml | |
scikit_learn | ||
scipy | ||
seaborn | ||
termcolor | ||
tqdm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
__author__ = ", ".join(["Farid Rashidi"]) | ||
__maintainer__ = ", ".join(["Farid Rashidi"]) | ||
__email__ = ", ".join(["[email protected]"]) | ||
__version__ = "0.0.18" | ||
__version__ = "0.0.19" | ||
|
||
if platform == "linux" or platform == "linux2": | ||
os.environ["CC"] = "g++" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import trisicell as tsc | ||
|
||
|
||
class TestIO: | ||
def test_read_newick(self): | ||
f1 = tsc.ul.get_file("trisicell.datasets/test/T00.nwk") | ||
f2 = tsc.ul.get_file("trisicell.datasets/test/T06.nwk") | ||
df1 = tsc.io.read(f1) | ||
df2 = tsc.io.read(f2) | ||
assert df1.shape == (185, 368) | ||
assert df2.shape == (185, 368) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ | |
__author__ = ", ".join(["Farid Rashidi"]) | ||
__maintainer__ = ", ".join(["Farid Rashidi"]) | ||
__email__ = ", ".join(["[email protected]"]) | ||
__version__ = "0.0.18" | ||
__version__ = "0.0.19" | ||
__all__ = (datasets, io, logg, pl, pp, settings, tl, ul) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
|
||
import click | ||
|
||
import trisicell as tsc | ||
|
||
|
||
@click.command(short_help="Run GRMT.") | ||
@click.argument( | ||
"genotype_file", | ||
required=True, | ||
type=click.Path( | ||
exists=True, file_okay=True, dir_okay=False, readable=True, resolve_path=True | ||
), | ||
) | ||
@click.argument( | ||
"alpha", | ||
required=True, | ||
type=float, | ||
) | ||
@click.argument( | ||
"beta", | ||
required=True, | ||
type=float, | ||
) | ||
@click.option( | ||
"--n_threads", | ||
"-p", | ||
default=1, | ||
type=int, | ||
show_default=True, | ||
help="Number of threads.", | ||
) | ||
def grmt(genotype_file, alpha, beta, n_threads): | ||
"""GRMT. | ||
Generative Reconstruction of Mutation Tree From Scratch Using Single-Cell | ||
Sequencing Data :cite:`GRMT`. | ||
trisicell grmt input.SC 0.0001 0.1 | ||
""" | ||
|
||
outfile = os.path.splitext(genotype_file)[0] | ||
|
||
tsc.settings.verbosity = "info" | ||
tsc.settings.logfile = f"{outfile}.grmt.log" | ||
|
||
df_in = tsc.io.read(genotype_file) | ||
df_out = tsc.tl.grmt(df_in, alpha=alpha, beta=beta, n_threads=n_threads) | ||
tsc.io.write(df_out, f"{outfile}.grmt.CFMatrix") | ||
|
||
return None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import os | ||
|
||
import click | ||
|
||
import trisicell as tsc | ||
|
||
|
||
@click.command(short_help="Run SPhyR.") | ||
@click.argument( | ||
"genotype_file", | ||
required=True, | ||
type=click.Path( | ||
exists=True, file_okay=True, dir_okay=False, readable=True, resolve_path=True | ||
), | ||
) | ||
@click.argument( | ||
"alpha", | ||
required=True, | ||
type=float, | ||
) | ||
@click.argument( | ||
"beta", | ||
required=True, | ||
type=float, | ||
) | ||
@click.option( | ||
"--n_restarts", | ||
"-r", | ||
default=10, | ||
type=int, | ||
show_default=True, | ||
help="Number of restarts.", | ||
) | ||
@click.option( | ||
"--n_threads", | ||
"-p", | ||
default=1, | ||
type=int, | ||
show_default=True, | ||
help="Number of threads.", | ||
) | ||
def sphyr(genotype_file, alpha, beta, n_restarts, n_threads): | ||
"""SPhyR. | ||
Tumor phylogeny estimation from single-cell sequencing data under loss and error | ||
:cite:`SPhyR`. | ||
trisicell sphyr input.SC 0.0001 0.1 | ||
""" | ||
|
||
outfile = os.path.splitext(genotype_file)[0] | ||
|
||
tsc.settings.verbosity = "info" | ||
tsc.settings.logfile = f"{outfile}.sphyr.log" | ||
|
||
df_in = tsc.io.read(genotype_file) | ||
df_out = tsc.tl.sphyr( | ||
df_in, alpha=alpha, beta=beta, n_restarts=n_restarts, n_threads=n_threads | ||
) | ||
tsc.io.write(df_out, f"{outfile}.sphyr.CFMatrix") | ||
|
||
return None |
Oops, something went wrong.