Repository navigation
Expand file tree
/
Copy pathdemo-python.qmd
More file actions
88 lines (62 loc) · 1.73 KB
/
Copy pathdemo-python.qmd
File metadata and controls
88 lines (62 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
title: "Demo: Python package seguid"
format: html
engine: markdown
filters:
- pyodide
pyodide:
show-startup-message: false
packages: ["seguid"]
---
This is an online demo of the Python package **[seguid]** and the
SEGUID v2 algorithm. The below examples run an Python instance
completely within your web browser based on [Pyodide] and
[WebAssembly] via [coatless/pyodide].
To run the examples, click 'Run Code'. Feel free to edit any of them
as you prefer. Nothing you type or enter below leaves your web
browser. See **[seguid]** for the details on these functions,
including what type of arguments they take.
<!--
NOTE: This requires that the following 'coatless/pyodide' patches have
been applied:
* https://github.com/coatless-quarto/pyodide/pull/31
* https://github.com/coatless-quarto/pyodide/pull/32
-->
```{pyodide-python}
#| context: setup
#| autorun: true
from seguid import *
```
## Examples
### Linear, single-stranded DNA
```{pyodide-python}
lsseguid("GATTACA")
```
### Linear, double-stranded DNA
```{pyodide-python}
ldseguid("GATTACA", "TGTAATC")
```
### Staggered linear, double-stranded DNA
```{pyodide-python}
ldseguid("-ATTACA", "--TAATC")
```
### Circular, single-stranded DNA
```{pyodide-python}
csseguid("GATTACA")
```
### Circular, double-stranded DNA
```{pyodide-python}
cdseguid("GATTACA", "TGTAATC")
```
### Protein
```{pyodide-python}
lsseguid("QSALTQPASV", alphabet = "{protein}")
```
### Expanded epigenetic double-stranded DNA
```{pyodide-python}
ldseguid("TTGmGCAA", "TTGC1CAA", alphabet = "{DNA},m1,h2,f3,c4")
```
[seguid]: https://seguid-python.seguid.org/
[Pyodide]: https://pyodide.org/en/stable/
[WebAssembly]: https://webassembly.org/
[coatless/pyodide]: https://github.com/coatless-quarto/pyodide