Skip to content

Commit

Permalink
add print func
Browse files Browse the repository at this point in the history
  • Loading branch information
yangli committed Oct 10, 2022
1 parent 7d139a4 commit da6d64a
Show file tree
Hide file tree
Showing 7 changed files with 270 additions and 17 deletions.
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ $ pip install mssw

## Benchmark

The result is tested in Linux x86_64 4 cores and 4GB of memory.
The result is tested in Linux x86_64 4 cores and 4GB of memory.

### With BioPython

| Query Length | Reference Length | mssw Time (s) | bio python Time (s) | Speedup |
| ------------ | ---------------- | ------------- | ------------------- | :------- |
| 15 | 39 | 4.470348e-05 | 1.424551e-04 | 3.186666 |
| 150 | 390 | 2.179623e-04 | 2.270699e-03 | 10.41785 |
| 150 | 390 | 2.179623e-04 | 2.270699e-03 | 10.41785 |
| 1500 | 3900 | 1.665862e-02 | 1.534623e-01 | 9.212187 |
| 15000 | 39000 | 1.696888e+00 | 1.574137e+01 | 9.276609 |

Expand Down Expand Up @@ -90,3 +90,17 @@ assert alignment.ref_end_next_best == 0
assert alignment.mismatches == 2
assert alignment.cigar_string == "4=1X4=1I5="
```

### Example 5: Print Alignment Result

```python
import mssw

reference = "CAGCCTTTCTGACCCGGAAATCAAAATAGGCACAACAAA"
query = "CTGAGCCGGTAAATC"
aligner = mssw.Aligner(match=3, mismatch=1, gap_open=2, gap_extend=2)
alignment = aligner.align(query, reference)
alignment.print()
```

![img.png](images/img.png)
Binary file added images/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
131 changes: 129 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mssw"
version = "0.1.4"
version = "0.1.5"
description = "Modern Cpp binding for complete-striped-smith-watern-library"
authors = ["Yangyang Li <[email protected]>"]
license = "MIT"
Expand All @@ -15,14 +15,13 @@ classifiers = [
'Operating System :: Unix',
'Operating System :: MacOS',
'Programming Language :: Python',
'Topic :: Communications :: Email',
'Topic :: Software Development :: Bug Tracking',
]

[tool.poetry.dependencies]
python = "^3.7"
pybind11 = "^2.10.0"
setuptools = "^65.4.1"
rich = "^12.6.0"


[tool.poetry.group.dev.dependencies]
Expand Down
Loading

0 comments on commit da6d64a

Please sign in to comment.