Commit 52cfdd37 authored by akdel's avatar akdel

rename to OptiSpeed-denoise and added to setup.py

parent 15e12020
......@@ -75,7 +75,8 @@ class CompressedAndScored:
pass
@classmethod
def from_waves(cls, waves: ty.List[sw.SquareWave], nbits: int = 32, length: int = 250, segment_limit: ty.Tuple[float, float] = (0.25, 0.75)) -> "CompressedAndScored":
def from_waves(cls, waves: ty.List[sw.SquareWave], nbits: int = 32, length: int = 250,
segment_limit: ty.Tuple[float, float] = (0.25, 0.75)) -> "CompressedAndScored":
all_segments: ty.List[np.ndarray] = list()
molecules: ty.List[CompressedMolecule] = list()
segment_to_molecules: ty.Dict[SegmentHash, ty.List[MoleculeIndex]] = dict()
......@@ -246,7 +247,7 @@ class OptiSpeedResults:
current_id: int = molecule_array.molid_to_arrayindex[mol_id]
signal: np.ndarray = molecule_array.molecule_array[current_id][: molecule_array.lengths[current_id]]
res = align.get_filtered_alignments(signal,
molecule_array.molecule_array,
molecule_array.molecule_array, # change to epsilon
molecule_array.lengths,
matched_ids, limit=length_limit)
......
......@@ -14,6 +14,7 @@ pip install .
## Test with toy data
```shell script
OptiSpeed ./data/molecules.npy --first_score=0.8 --second_score=0.75 --output_filename=test_output.tsv --combine_sparse=True
OptiSpeed ./data/molecules.bnx --first_score=0.8 --second_score=0.75 --output_filename=test_output.tsv --combine_sparse=True
OptiSpeed-denoise ./data/molecules.npy --first_score=0.8 --second_score=0.75 --output_filename=denoised_molecules.npy
OptiSpeed ./data/denoised_molecules.bnx --first_score=0.8 --second_score=0.75 --output_filename=test_output.tsv --combine_sparse=True
```
\ No newline at end of file
......@@ -70,6 +70,8 @@ def compute_pairwise_deep(input_filename: str,
else:
exit(1)
molecule_array.molecule_array += 0.0001
if not combine_sparse:
comp.OptiSpeedResults \
.from_molecule_array_all_vs_all(molecule_array)\
......
......@@ -65,6 +65,8 @@ def compute_pairwise_naive(input_filename: str,
else:
exit(1)
molecule_array.molecule_array += 0.0001
comp.OptiSpeedResults \
.from_molecule_array_all_vs_all(molecule_array) \
.to_all_correlation_results(molecule_array, thr=score, length_limit=min_overlap_length) \
......
......@@ -65,6 +65,8 @@ def compute_pairwise_sparse(input_filename: str, min_number_of_nicks: int = 12,
else:
exit(1)
molecule_array.molecule_array += 0.0001
comp.OptiSpeedResults \
.from_molecule_array_all_vs_all(molecule_array)\
.pairs_to_sparse_correlation_results(molecule_array,
......
......@@ -81,6 +81,8 @@ def compute_pairwise_from_optispeed(input_filename: str,
else:
exit(1)
molecule_array.molecule_array += 0.0001
if not combine_sparse:
comp.OptiSpeedResults \
.from_optispeed_results_file(optispeed_file)\
......
......@@ -84,6 +84,8 @@ def compute_pairwise_from_optispeed(input_filename: str,
else:
exit(1)
molecule_array.molecule_array += 0.0001
molecule_array = comp.OptiSpeedResults \
.from_optispeed_results_file(optispeed_file) \
.to_all_correlation_results(molecule_array, thr=first_score) \
......
......@@ -10,7 +10,7 @@ setup(name='OptiMap',
"bin/OptiMap-naive",
"bin/OptiMap-sparse",
"bin/OptiSpeed",
"bin/OptiSpeed-polish"],
"bin/OptiSpeed-denoise"],
packages=['OptiMap', "OptiMap/OptiSpeed"],
install_requires=["sqlalchemy", "numpy", "numba", "scipy", "intervaltree",
"matplotlib", "cython", "Simple-LSH", "fire", "ray"])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment