bioLOLPython 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
File without changes
@@ -0,0 +1,3 @@
1
+ from bioLOLPython.cli import main
2
+
3
+ main()
File without changes
@@ -0,0 +1,59 @@
1
+ import re
2
+ from Bio.Seq import Seq
3
+
4
+ IUPAC_DNA_RNA = set("ACGTUNRYSWKMBDHVacgtunryswkmbdhv")
5
+
6
+
7
+ class BioSeq:
8
+ def __init__(self, sequence, validate=True):
9
+ if validate and sequence:
10
+ invalid = set(sequence) - IUPAC_DNA_RNA
11
+ if invalid:
12
+ raise ValueError(
13
+ f"Invalid characters in sequence: {''.join(sorted(invalid))}. "
14
+ f"Only IUPAC nucleotide codes are allowed (ACGTUNRYSWKMBDHV)."
15
+ )
16
+ self.seq = Seq(sequence)
17
+
18
+ def reverse_complement(self):
19
+ return str(self.seq.reverse_complement())
20
+
21
+ def complement(self):
22
+ return str(self.seq.complement())
23
+
24
+ def gc_content(self):
25
+ length = len(self.seq)
26
+ if length == 0:
27
+ gc = 0.0
28
+ else:
29
+ g = self.seq.upper().count('G')
30
+ c = self.seq.upper().count('C')
31
+ gc = (g + c) / length * 100
32
+ return gc
33
+
34
+ def length(self):
35
+ return len(self.seq)
36
+
37
+ def find_orf(self):
38
+ """Find the first open reading frame (ATG to stop codon)."""
39
+ seq_str = str(self.seq).upper()
40
+ start = seq_str.find("ATG")
41
+ if start == -1:
42
+ return None
43
+ stop_codons = ("TAA", "TAG", "TGA")
44
+ for i in range(start, len(seq_str) - 2, 3):
45
+ codon = seq_str[i:i+3]
46
+ if codon in stop_codons and i > start:
47
+ return seq_str[start:i+3]
48
+ # No stop codon found — return from ATG to end
49
+ return seq_str[start:]
50
+
51
+ def find_motif(self, pattern):
52
+ """Find all occurrences of a motif pattern in the sequence."""
53
+ matches = []
54
+ for m in re.finditer(pattern, str(self.seq), re.IGNORECASE):
55
+ matches.append((m.start() + 1, m.end())) # 1-indexed
56
+ return matches
57
+
58
+ def __str__(self):
59
+ return str(self.seq)
bioLOLPython/cli.py ADDED
@@ -0,0 +1,88 @@
1
+ # bioLOLPython/cli.py
2
+ import sys
3
+ from bioLOLPython.interpreter import handle_line, reset_bio_vars, set_dialect
4
+ from bioLOLPython.dialects import list_dialects, dialect_names, reload_dialects
5
+
6
+
7
+ def repl(dialect_name="lolcat"):
8
+ """Interactive REPL mode."""
9
+ set_dialect(dialect_name)
10
+ print(f"🐾 bioLOL REPL v0.1 ({dialect_name} mode)")
11
+ print(f" Type bio commands. Ctrl+C or 'exit' to quit.\n")
12
+ reset_bio_vars()
13
+ try:
14
+ while True:
15
+ try:
16
+ line = input("> ").strip()
17
+ except EOFError:
18
+ break
19
+ if line.lower() in ("exit", "quit"):
20
+ break
21
+ if line:
22
+ handle_line(line, dialect_name=dialect_name)
23
+ except KeyboardInterrupt:
24
+ pass
25
+ print("\nšŸ‘‹ kthxbye!")
26
+
27
+
28
+ def print_dialects():
29
+ """Print available dialects."""
30
+ print("Available dialects:\n")
31
+ for d in list_dialects():
32
+ print(f" {d['name']:12s} {d['era']:14s} {d['description']}")
33
+ print()
34
+
35
+
36
+ def do_update(force=False):
37
+ """Fetch latest dialects from remote registry."""
38
+ from bioLOLPython.dialects.remote import update_dialects
39
+ print("šŸ”„ Updating dialects from remote registry...")
40
+ results = update_dialects(force=force)
41
+ for name, status in results:
42
+ icon = "āœ…" if status == "updated" else "šŸ“¦" if status == "cached" else "āŒ"
43
+ print(f" {icon} {name}: {status}")
44
+ reload_dialects()
45
+ print(f"\n{len(dialect_names())} dialect(s) available.")
46
+
47
+
48
+ def main():
49
+ dialect = "lolcat"
50
+ args = sys.argv[1:]
51
+
52
+ if "--list-dialects" in args:
53
+ print_dialects()
54
+ return
55
+
56
+ if "--update" in args:
57
+ force = "--force" in args
58
+ do_update(force=force)
59
+ return
60
+
61
+ if "--dialect" in args:
62
+ idx = args.index("--dialect")
63
+ if idx + 1 < len(args):
64
+ dialect = args[idx + 1]
65
+ if dialect not in dialect_names():
66
+ print(f"āŒ Unknown dialect '{dialect}'.")
67
+ print_dialects()
68
+ return
69
+ args = args[:idx] + args[idx + 2:]
70
+ else:
71
+ print("āŒ --dialect requires a name argument.")
72
+ print_dialects()
73
+ return
74
+
75
+ if not args:
76
+ repl(dialect)
77
+ return
78
+
79
+ filename = args[0]
80
+ reset_bio_vars()
81
+ set_dialect(dialect)
82
+ with open(filename) as f:
83
+ for line in f:
84
+ handle_line(line.strip(), dialect_name=dialect)
85
+
86
+
87
+ if __name__ == "__main__":
88
+ main()
@@ -0,0 +1,67 @@
1
+ """
2
+ Dialect registry for bioLOLPython.
3
+
4
+ Each dialect maps internet slang from a specific era to bioinformatics commands.
5
+ Dialects are loaded from YAML files in this order (later overrides earlier):
6
+ 1. Bundled definitions (bioLOLPython/dialects/definitions/*.yaml)
7
+ 2. User definitions (~/.bioLOL/dialects/*.yaml)
8
+ """
9
+ from bioLOLPython.dialects.base import (
10
+ BUNDLED_DIR,
11
+ USER_DIR,
12
+ compile_dialect,
13
+ discover_yaml_dialects,
14
+ load_yaml_dialect,
15
+ validate_dialect,
16
+ )
17
+
18
+ _DIALECTS = {}
19
+
20
+
21
+ def _load_all():
22
+ """Load dialects from YAML files (bundled + user)."""
23
+ global _DIALECTS
24
+ _DIALECTS = discover_yaml_dialects(BUNDLED_DIR, USER_DIR)
25
+
26
+ # Fallback: if no YAML files found, load from Python modules
27
+ if not _DIALECTS:
28
+ from bioLOLPython.dialects.lolcat import DIALECT as _lolcat
29
+ from bioLOLPython.dialects.gen_z import DIALECT as _gen_z
30
+ from bioLOLPython.dialects.brainrot import DIALECT as _brainrot
31
+ for d in (_lolcat, _gen_z, _brainrot):
32
+ compiled = compile_dialect(d)
33
+ _DIALECTS[compiled["name"]] = compiled
34
+
35
+
36
+ _load_all()
37
+
38
+
39
+ def reload_dialects():
40
+ """Reload all dialects from disk. Useful after fetching remote dialects."""
41
+ _load_all()
42
+
43
+
44
+ def register_dialect(dialect_def):
45
+ """Register a dialect from a Python dict (for programmatic use)."""
46
+ validate_dialect(dialect_def)
47
+ compiled = compile_dialect(dialect_def)
48
+ _DIALECTS[compiled["name"]] = compiled
49
+ return compiled
50
+
51
+
52
+ def get_dialect(name):
53
+ if name not in _DIALECTS:
54
+ available = ", ".join(sorted(_DIALECTS.keys()))
55
+ raise ValueError(f"Unknown dialect '{name}'. Available: {available}")
56
+ return _DIALECTS[name]
57
+
58
+
59
+ def list_dialects():
60
+ return [
61
+ {"name": d["name"], "era": d["era"], "description": d["description"]}
62
+ for d in _DIALECTS.values()
63
+ ]
64
+
65
+
66
+ def dialect_names():
67
+ return sorted(_DIALECTS.keys())
@@ -0,0 +1,105 @@
1
+ """
2
+ Base dialect infrastructure.
3
+
4
+ Each dialect defines patterns for bio commands using a template syntax:
5
+ - {name}, {a}, {b} -> capture a variable name (word characters)
6
+ - {seq} -> capture a quoted sequence string
7
+ - {pattern} -> capture a quoted pattern string
8
+ - Remaining text -> matched literally (case-sensitive)
9
+
10
+ Patterns are compiled into regexes at registration time.
11
+ Dialects can be defined as YAML files or Python dicts.
12
+ """
13
+ import re
14
+ import os
15
+ import yaml
16
+ from pathlib import Path
17
+
18
+ # Template placeholders -> regex groups
19
+ _PLACEHOLDER_RE = re.compile(r"\{(\w+)\}")
20
+
21
+ _PLACEHOLDER_PATTERNS = {
22
+ "seq": r'"(?P<seq>[^"]*)"',
23
+ "pattern": r'"(?P<pattern>[^"]*)"',
24
+ }
25
+
26
+ # Required commands every dialect must define
27
+ REQUIRED_COMMANDS = [
28
+ "init", "end", "declare", "reverse", "gc_content",
29
+ "print", "transcribe", "translate", "align", "mutate",
30
+ "length", "complement", "find_orf", "motif",
31
+ ]
32
+
33
+ # Bundled YAML definitions directory
34
+ BUNDLED_DIR = Path(__file__).parent / "definitions"
35
+
36
+ # User dialect directory
37
+ USER_DIR = Path.home() / ".bioLOL" / "dialects"
38
+
39
+
40
+ def _compile_pattern(template):
41
+ """Compile a dialect pattern template into a regex."""
42
+ parts = _PLACEHOLDER_RE.split(template)
43
+ regex_parts = []
44
+ for i, part in enumerate(parts):
45
+ if i % 2 == 0:
46
+ # Literal text — escape and normalize spaces to \s+
47
+ escaped = re.escape(part.strip())
48
+ escaped = escaped.replace(r"\ ", r"\s+")
49
+ regex_parts.append(escaped)
50
+ else:
51
+ # Placeholder name
52
+ if part in _PLACEHOLDER_PATTERNS:
53
+ regex_parts.append(_PLACEHOLDER_PATTERNS[part])
54
+ else:
55
+ regex_parts.append(rf"(?P<{part}>\w+)")
56
+ return re.compile(r"^\s*" + r"\s+".join(p for p in regex_parts if p) + r"(?:\s+.*)?$")
57
+
58
+
59
+ def compile_dialect(dialect_def):
60
+ """Compile all patterns in a dialect definition, adding 'matcher' to each command."""
61
+ for cmd_name, cmd_def in dialect_def["commands"].items():
62
+ cmd_def["matcher"] = _compile_pattern(cmd_def["pattern"])
63
+ return dialect_def
64
+
65
+
66
+ def validate_dialect(dialect_def):
67
+ """Validate a dialect definition has all required fields."""
68
+ for field in ("name", "era", "description", "commands"):
69
+ if field not in dialect_def:
70
+ raise ValueError(f"Dialect missing required field: '{field}'")
71
+ for cmd in REQUIRED_COMMANDS:
72
+ if cmd not in dialect_def["commands"]:
73
+ raise ValueError(
74
+ f"Dialect '{dialect_def['name']}' missing command: '{cmd}'"
75
+ )
76
+ if "pattern" not in dialect_def["commands"][cmd]:
77
+ raise ValueError(
78
+ f"Dialect '{dialect_def['name']}' command '{cmd}' missing 'pattern'"
79
+ )
80
+ return True
81
+
82
+
83
+ def load_yaml_dialect(path):
84
+ """Load and compile a dialect from a YAML file."""
85
+ with open(path, "r") as f:
86
+ dialect_def = yaml.safe_load(f)
87
+ validate_dialect(dialect_def)
88
+ return compile_dialect(dialect_def)
89
+
90
+
91
+ def discover_yaml_dialects(*dirs):
92
+ """Discover all .yaml dialect files in the given directories.
93
+ Later directories override earlier ones (user overrides bundled)."""
94
+ dialects = {}
95
+ for d in dirs:
96
+ if not d.is_dir():
97
+ continue
98
+ for path in sorted(d.glob("*.yaml")):
99
+ try:
100
+ dialect = load_yaml_dialect(path)
101
+ dialects[dialect["name"]] = dialect
102
+ except Exception as e:
103
+ # Skip invalid files silently in discovery
104
+ print(f"āš ļø Skipping {path.name}: {e}")
105
+ return dialects
@@ -0,0 +1,64 @@
1
+ DIALECT = {
2
+ "name": "brainrot",
3
+ "era": "~2023-2026",
4
+ "description": "skibidi DNA sigma rizz. Gen Alpha brainrot meets bioinformatics.",
5
+ "commands": {
6
+ "init": {
7
+ "pattern": "SKIBIDI GENOME",
8
+ "greeting": "🚽 SKIBIDI BIOLAB ACTIVATED sigma grindset 🧬",
9
+ },
10
+ "end": {
11
+ "pattern": "MOGGER OUT",
12
+ },
13
+ "declare": {
14
+ "pattern": "SIGMA {name} RIZZ {seq}",
15
+ },
16
+ "reverse": {
17
+ "pattern": "FANUM TAX {name}",
18
+ },
19
+ "gc_content": {
20
+ "pattern": "AURA CHECK {name}",
21
+ "response": "✨ GC aura: {value:.2f}% {rating} 🧬",
22
+ },
23
+ "print": {
24
+ "pattern": "HAWK TUAH",
25
+ },
26
+ "transcribe": {
27
+ "pattern": "EDGING {name}",
28
+ },
29
+ "translate": {
30
+ "pattern": "LOOKSMAX {name}",
31
+ },
32
+ "align": {
33
+ "pattern": "MEWING CONTEST {a} VS {b}",
34
+ "response": "šŸ—æ MEWING SCOREZ: {score:.2f} {rating}",
35
+ },
36
+ "mutate": {
37
+ "pattern": "ONLY IN OHIO {name}",
38
+ "response": "šŸ’€ ohio moment for {name} at pos {pos}: {old} āžœ {new}",
39
+ },
40
+ "length": {
41
+ "pattern": "GYATT HOW LONG {name}",
42
+ "response": "šŸ“ {name} is {value} bases long gyatt",
43
+ },
44
+ "complement": {
45
+ "pattern": "REVERSE UNO {name}",
46
+ },
47
+ "find_orf": {
48
+ "pattern": "SIGMA GRIND {name}",
49
+ "orf_found": "šŸ’Ŗ sigma ORF found: {orf} ({length} bp) W",
50
+ "orf_missing": "šŸ’€ {name} is not sigma (no ATG start codon) L",
51
+ },
52
+ "motif": {
53
+ "pattern": "SUSSY SEARCH {name} FOR {pattern}",
54
+ "found": "šŸ” '{pattern}' is sus in {name} {count} time(s):",
55
+ "position": " pos {start}-{end}",
56
+ "not_found": "šŸ” '{pattern}' is not sus in {name}",
57
+ },
58
+ },
59
+ "examples": {
60
+ "GC Content": 'SKIBIDI GENOME\nSIGMA X RIZZ "ATGCATGC"\nAURA CHECK X\nMOGGER OUT',
61
+ "Protein Translation": 'SKIBIDI GENOME\nSIGMA Y RIZZ "ATGGAGGAGCC"\nLOOKSMAX Y\nHAWK TUAH "Protein: " + Y\nMOGGER OUT',
62
+ "Alignment": 'SKIBIDI GENOME\nSIGMA A RIZZ "ATGCGTAGG"\nSIGMA B RIZZ "ATGCGTACG"\nMEWING CONTEST A VS B\nMOGGER OUT',
63
+ },
64
+ }
File without changes
@@ -0,0 +1,71 @@
1
+ name: brainrot
2
+ era: "~2023-2026"
3
+ description: "skibidi DNA sigma rizz. Gen Alpha brainrot meets bioinformatics."
4
+
5
+ commands:
6
+ init:
7
+ pattern: "SKIBIDI GENOME"
8
+ greeting: "🚽 SKIBIDI BIOLAB ACTIVATED sigma grindset 🧬"
9
+ end:
10
+ pattern: "MOGGER OUT"
11
+ declare:
12
+ pattern: 'SIGMA {name} RIZZ {seq}'
13
+ reverse:
14
+ pattern: "FANUM TAX {name}"
15
+ gc_content:
16
+ pattern: "AURA CHECK {name}"
17
+ response: "✨ GC aura: {value:.2f}% {rating} 🧬"
18
+ print:
19
+ pattern: "HAWK TUAH"
20
+ transcribe:
21
+ pattern: "EDGING {name}"
22
+ translate:
23
+ pattern: "LOOKSMAX {name}"
24
+ align:
25
+ pattern: "MEWING CONTEST {a} VS {b}"
26
+ response: "šŸ—æ MEWING SCOREZ: {score:.2f} {rating}"
27
+ mutate:
28
+ pattern: "ONLY IN OHIO {name}"
29
+ response: "šŸ’€ ohio moment for {name} at pos {pos}: {old} āžœ {new}"
30
+ length:
31
+ pattern: "GYATT HOW LONG {name}"
32
+ response: "šŸ“ {name} is {value} bases long gyatt"
33
+ complement:
34
+ pattern: "REVERSE UNO {name}"
35
+ find_orf:
36
+ pattern: "SIGMA GRIND {name}"
37
+ orf_found: "šŸ’Ŗ sigma ORF found: {orf} ({length} bp) W"
38
+ orf_missing: "šŸ’€ {name} is not sigma (no ATG start codon) L"
39
+ motif:
40
+ pattern: 'SUSSY SEARCH {name} FOR {pattern}'
41
+ found: "šŸ” '{pattern}' is sus in {name} {count} time(s):"
42
+ position: " pos {start}-{end}"
43
+ not_found: "šŸ” '{pattern}' is not sus in {name}"
44
+
45
+ examples:
46
+ GC Content: |
47
+ SKIBIDI GENOME
48
+ SIGMA X RIZZ "ATGCATGC"
49
+ AURA CHECK X
50
+ MOGGER OUT
51
+ Protein Translation: |
52
+ SKIBIDI GENOME
53
+ SIGMA Y RIZZ "ATGGAGGAGCC"
54
+ LOOKSMAX Y
55
+ HAWK TUAH "Protein: " + Y
56
+ MOGGER OUT
57
+ Alignment: |
58
+ SKIBIDI GENOME
59
+ SIGMA A RIZZ "ATGCGTAGG"
60
+ SIGMA B RIZZ "ATGCGTACG"
61
+ MEWING CONTEST A VS B
62
+ MOGGER OUT
63
+ Sequence Analysis: |
64
+ SKIBIDI GENOME
65
+ SIGMA X RIZZ "AAATGCCCCCCTAAGG"
66
+ GYATT HOW LONG X
67
+ SIGMA GRIND X
68
+ SUSSY SEARCH X FOR "CCC"
69
+ REVERSE UNO X
70
+ HAWK TUAH "complement: " + X
71
+ MOGGER OUT
@@ -0,0 +1,71 @@
1
+ name: gen_z
2
+ era: "~2018-2023"
3
+ description: "no cap this DNA is bussin fr fr. TikTok-era slang meets molecular biology."
4
+
5
+ commands:
6
+ init:
7
+ pattern: "YO ITS GIVING GENOME"
8
+ greeting: "šŸ’… ok bestie let's sequence this slay 🧬"
9
+ end:
10
+ pattern: "PERIODT"
11
+ declare:
12
+ pattern: 'NO CAP {name} IS {seq}'
13
+ reverse:
14
+ pattern: "UNO REVERSE {name}"
15
+ gc_content:
16
+ pattern: "VIBE CHECK {name}"
17
+ response: "šŸ’… GC content: {value:.2f}% no cap 🧬"
18
+ print:
19
+ pattern: "SPILL"
20
+ transcribe:
21
+ pattern: "MAIN CHARACTER {name}"
22
+ translate:
23
+ pattern: "GLOW UP {name}"
24
+ align:
25
+ pattern: "RIZZ CHECK {a} AND {b}"
26
+ response: "✨ RIZZ SCOREZ: {score:.2f} it's giving {rating}"
27
+ mutate:
28
+ pattern: "CAUGHT IN 4K {name}"
29
+ response: "šŸ“ø caught {name} in 4K at pos {pos}: {old} āžœ {new} sus"
30
+ length:
31
+ pattern: "BESTIE HOW LONG {name}"
32
+ response: "šŸ“ {name} is {value} bases long bestie"
33
+ complement:
34
+ pattern: "MIRROR CHECK {name}"
35
+ find_orf:
36
+ pattern: "UNDERSTOOD THE ASSIGNMENT {name}"
37
+ orf_found: "šŸ’Æ ORF understood: {orf} ({length} bp) slay"
38
+ orf_missing: "šŸ’€ {name} did NOT understand the assignment (no ATG)"
39
+ motif:
40
+ pattern: 'LIVING RENT FREE {name} FOR {pattern}'
41
+ found: "šŸ  '{pattern}' found living rent free in {name} {count} time(s):"
42
+ position: " pos {start}-{end}"
43
+ not_found: "šŸ  '{pattern}' is NOT living rent free in {name}"
44
+
45
+ examples:
46
+ GC Content: |
47
+ YO ITS GIVING GENOME
48
+ NO CAP X IS "ATGCATGC"
49
+ VIBE CHECK X
50
+ PERIODT
51
+ Protein Translation: |
52
+ YO ITS GIVING GENOME
53
+ NO CAP Y IS "ATGGAGGAGCC"
54
+ GLOW UP Y
55
+ SPILL "Protein: " + Y
56
+ PERIODT
57
+ Alignment: |
58
+ YO ITS GIVING GENOME
59
+ NO CAP A IS "ATGCGTAGG"
60
+ NO CAP B IS "ATGCGTACG"
61
+ RIZZ CHECK A AND B
62
+ PERIODT
63
+ Sequence Analysis: |
64
+ YO ITS GIVING GENOME
65
+ NO CAP X IS "AAATGCCCCCCTAAGG"
66
+ BESTIE HOW LONG X
67
+ UNDERSTOOD THE ASSIGNMENT X
68
+ LIVING RENT FREE X FOR "CCC"
69
+ MIRROR CHECK X
70
+ SPILL "complement: " + X
71
+ PERIODT
@@ -0,0 +1,3 @@
1
+ lolcat
2
+ gen_z
3
+ brainrot
@@ -0,0 +1,71 @@
1
+ name: lolcat
2
+ era: "~2005-2012"
3
+ description: "I CAN HAS BIOINFORMATICS? Classic lolspeak from the cheezburger era."
4
+
5
+ commands:
6
+ init:
7
+ pattern: "HAI GENZOME"
8
+ greeting: "🐾 LOADING bioLOLCODE V1... LETZ GOOOO šŸ’„"
9
+ end:
10
+ pattern: "KTHXBYE"
11
+ declare:
12
+ pattern: 'DNA GO {name} ITZ {seq}'
13
+ reverse:
14
+ pattern: "REVERSE THAT {name}"
15
+ gc_content:
16
+ pattern: "GC BOMB {name}"
17
+ response: "šŸ’„ GC content: {value:.2f}% 🧬"
18
+ print:
19
+ pattern: "VISIBLE"
20
+ transcribe:
21
+ pattern: "TRANSCRIBE {name}"
22
+ translate:
23
+ pattern: "TRANSLATE {name}"
24
+ align:
25
+ pattern: "ALIGN {a} WIT {b}"
26
+ response: "🌈 ALINE SCOREZ: {score:.2f} šŸ”„ itz {rating}!!"
27
+ mutate:
28
+ pattern: "I CRAVE VIOLENCE {name}"
29
+ response: "šŸ’£ mutated {name} at pos {pos}: {old} āžœ {new}"
30
+ length:
31
+ pattern: "HOW LONG {name}"
32
+ response: "šŸ“ {name} iz {value} bases long"
33
+ complement:
34
+ pattern: "COMPLEMENT {name}"
35
+ find_orf:
36
+ pattern: "FIND ORF {name}"
37
+ orf_found: "šŸ” ORF found: {orf} ({length} bp)"
38
+ orf_missing: "šŸ” No ORF found in {name} (no ATG start codon)"
39
+ motif:
40
+ pattern: 'MOTIF HUNT {name} FOR {pattern}'
41
+ found: "šŸŽÆ Found {count} match(es) for '{pattern}' in {name}:"
42
+ position: " pos {start}-{end}"
43
+ not_found: "šŸŽÆ No matches for '{pattern}' in {name}"
44
+
45
+ examples:
46
+ GC Content: |
47
+ HAI GENZOME 1.0
48
+ DNA GO X ITZ "ATGCATGC"
49
+ GC BOMB X
50
+ KTHXBYE
51
+ Protein Translation: |
52
+ HAI GENZOME 1.0
53
+ DNA GO Y ITZ "ATGGAGGAGCC"
54
+ TRANSLATE Y
55
+ VISIBLE "Protein: " + Y
56
+ KTHXBYE
57
+ Alignment: |
58
+ HAI GENZOME 1.0
59
+ DNA GO A ITZ "ATGCGTAGG"
60
+ DNA GO B ITZ "ATGCGTACG"
61
+ ALIGN A WIT B
62
+ KTHXBYE
63
+ Sequence Analysis: |
64
+ HAI GENZOME 1.0
65
+ DNA GO X ITZ "AAATGCCCCCCTAAGG"
66
+ HOW LONG X
67
+ FIND ORF X
68
+ MOTIF HUNT X FOR "CCC"
69
+ COMPLEMENT X
70
+ VISIBLE "complement: " + X
71
+ KTHXBYE
@@ -0,0 +1,64 @@
1
+ DIALECT = {
2
+ "name": "gen_z",
3
+ "era": "~2018-2023",
4
+ "description": "no cap this DNA is bussin fr fr. TikTok-era slang meets molecular biology.",
5
+ "commands": {
6
+ "init": {
7
+ "pattern": "YO ITS GIVING GENOME",
8
+ "greeting": "šŸ’… ok bestie let's sequence this slay 🧬",
9
+ },
10
+ "end": {
11
+ "pattern": "PERIODT",
12
+ },
13
+ "declare": {
14
+ "pattern": "NO CAP {name} IS {seq}",
15
+ },
16
+ "reverse": {
17
+ "pattern": "UNO REVERSE {name}",
18
+ },
19
+ "gc_content": {
20
+ "pattern": "VIBE CHECK {name}",
21
+ "response": "šŸ’… GC content: {value:.2f}% no cap 🧬",
22
+ },
23
+ "print": {
24
+ "pattern": "SPILL",
25
+ },
26
+ "transcribe": {
27
+ "pattern": "MAIN CHARACTER {name}",
28
+ },
29
+ "translate": {
30
+ "pattern": "GLOW UP {name}",
31
+ },
32
+ "align": {
33
+ "pattern": "RIZZ CHECK {a} AND {b}",
34
+ "response": "✨ RIZZ SCOREZ: {score:.2f} it's giving {rating}",
35
+ },
36
+ "mutate": {
37
+ "pattern": "CAUGHT IN 4K {name}",
38
+ "response": "šŸ“ø caught {name} in 4K at pos {pos}: {old} āžœ {new} sus",
39
+ },
40
+ "length": {
41
+ "pattern": "BESTIE HOW LONG {name}",
42
+ "response": "šŸ“ {name} is {value} bases long bestie",
43
+ },
44
+ "complement": {
45
+ "pattern": "MIRROR CHECK {name}",
46
+ },
47
+ "find_orf": {
48
+ "pattern": "UNDERSTOOD THE ASSIGNMENT {name}",
49
+ "orf_found": "šŸ’Æ ORF understood: {orf} ({length} bp) slay",
50
+ "orf_missing": "šŸ’€ {name} did NOT understand the assignment (no ATG)",
51
+ },
52
+ "motif": {
53
+ "pattern": "LIVING RENT FREE {name} FOR {pattern}",
54
+ "found": "šŸ  '{pattern}' found living rent free in {name} {count} time(s):",
55
+ "position": " pos {start}-{end}",
56
+ "not_found": "šŸ  '{pattern}' is NOT living rent free in {name}",
57
+ },
58
+ },
59
+ "examples": {
60
+ "GC Content": 'YO ITS GIVING GENOME\nNO CAP X IS "ATGCATGC"\nVIBE CHECK X\nPERIODT',
61
+ "Protein Translation": 'YO ITS GIVING GENOME\nNO CAP Y IS "ATGGAGGAGCC"\nGLOW UP Y\nSPILL "Protein: " + Y\nPERIODT',
62
+ "Alignment": 'YO ITS GIVING GENOME\nNO CAP A IS "ATGCGTAGG"\nNO CAP B IS "ATGCGTACG"\nRIZZ CHECK A AND B\nPERIODT',
63
+ },
64
+ }