Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4e22e19
Reorganize modules into namespace
VoxelMC Nov 16, 2024
87e845b
Fix test imports
VoxelMC Nov 16, 2024
b1bd5c0
Add FASTA support and begin GenBank
VoxelMC Nov 21, 2024
f06592e
Small bug fix
VoxelMC Nov 21, 2024
f219592
Rename functions and add `count` subcommand
VoxelMC Nov 21, 2024
2a28242
Better error messages for `clean`
VoxelMC Nov 21, 2024
f932df3
Bump packages to 0.2.0
VoxelMC Nov 21, 2024
f1d0a51
Add CHANGELOG.md
VoxelMC Nov 21, 2024
5fe8e9c
Fix CHANGELOG.md
VoxelMC Nov 21, 2024
6ac9738
Document all current functions
VoxelMC Nov 21, 2024
34ad5d5
Update CHANGELOG.md
VoxelMC Nov 21, 2024
a18e9ff
Restriction presets, placeholder commands, and renamings
VoxelMC Nov 26, 2024
581801d
Update changelog, roadmap, and add reference
VoxelMC Dec 10, 2024
2e9d38d
Modify .gitignore
VoxelMC Dec 10, 2024
2201293
Add export module
VoxelMC Dec 12, 2024
f897c63
Rename/deprecate and add new functions
VoxelMC Dec 12, 2024
19a6d58
Start work on restriction direction
VoxelMC Dec 12, 2024
3b55977
Fix missing internal attribute
VoxelMC Dec 18, 2024
d6c8bb2
Update Roadmap
VoxelMC Dec 18, 2024
f9747cd
Add restriction site directionality
VoxelMC Dec 18, 2024
b41ae6f
Add a preset sample DnaSequence constant
VoxelMC Dec 21, 2024
8808f94
Add flipping functions for restriction module
VoxelMC Dec 21, 2024
a25a565
Add `parse reverse` command
VoxelMC Dec 23, 2024
00da79c
Start work on Simulations and display
VoxelMC Jan 2, 2025
f892143
Plan simulation
VoxelMC Jan 13, 2025
372fe17
Not even sure what work is done here...
VoxelMC Sep 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
/build
erl_crash.dump

# ensure that only minimum for JS NPM package is present in the dist dir.
/dist/*
!/dist/index.mjs
!/dist/package.json
!/dist/README.md

.DS_Store
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

## 0.2.0

### CLI

- Renamed `silent-mutate` to `clean`
- Added the `count` command.[^1] This command counts the number of restriction sites within a provided sequence.
_note: this does not consider CDS like `clean` does. It assesses the whole sequence._
- Added the `calts` command.[^1] This command prints alternate codons for a provided codon.
- Added new second-level subcommands for commands which do not return sequences:
- `list` - Any actions which return information about the object being queried. E.g. alternates for a codon.
- `parse` - Any actions to check the result of parsing an expression or formatted string. E.g. restriction strings/presets.
- `count` - Any actions which return a number, or some form of count.

### API Additions

- Added the `core/restriction` module for parsing and producing restriction sites.
- Added the `actions/presets` module for parsing presets.

### Signature changes

- `sequence.raw` >>> `sequence.unwrap`
- Module `commands/restriction` >>> `commands/restriction_mutate`

[^1]: Usage can be found in the package `README.md` or in the `--help` menu of the CLI.
33 changes: 29 additions & 4 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,34 @@
This file can be used to track my progress.
When I complete something, I will timestamp it so you can see if I am still working hard on this project.

- [ ] Create the api for restriction site analysis
- [ ] Be able to take in custom restriction sites with a specific parseable format
- [ ] Be able to take in a DNA sequence and return the number of restriction sites
## Checklists

### Digestion Analysis - Restriction Enzymes - Construct Assembly

- [ ] API for restriction site analysis
- [x] Be able to parse restriction sites from a specific format (link to docs later)
- [x] Count # of restriction sites in sequence
- [ ] Perform digestion simulation
- [ ] Analyse sticky ends
- [ ] Perform Golden Gate Assembly simulation
- [ ] Graphical simulation
- [ ] Actual processing to output
- [ ] Have a standard library of common restriction enzymes for synthetic biology standards (MoClo, BioBrick, etc.)
- [ ] User-customizable list of restriction enzymes (e.g. `~/.config/dnalg/presets.toml`)
- [x] Create the sequence silent mutator to get rid of enzyme cut sites.
- [ ] Make it get rid of every site, not just the first
- [x] Make it get rid of every site, not just the first

### Logs

- [ ] Use a sqlite db to record past jobs (`dnalg jobs`)
- [ ] `clear` subcommand with the ability to choose number to remove from the head (`dnalg jobs --clear [INT]`)

### Parsing Files

- [x] Parse FASTA and GenBank files
- [ ] Parse .dna files (SnapGene)

### Outputs

- [ ] Utility function to convert DnaSequence information to a FASTA output format.
- Still debating if .gb should be an output format.
2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dnalg",
"version": "0.1.4",
"version": "0.2.0",
"description": "A DNA manipulation library written in Gleam.",
"main": "index.mjs",
"bin": {
Expand Down
5 changes: 4 additions & 1 deletion gleam.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = "dnalg"
version = "0.1.4"
version = "0.2.0"

# Fill out these fields if you intend to generate HTML documentation or publish
# your project to the Hex package manager.
Expand All @@ -14,6 +14,7 @@ target = "javascript"
[documentation]
pages = [
{ title = "Primitives", path = "ref/primitives.html", source = "./pages/primitives.md" },
{ title = "Reference", path = "ref/reference.html", source = "./pages/reference.md" },
{ title = "Roadmap", path = "roadmap.html", source = "./ROADMAP.md" },
]

Expand All @@ -26,9 +27,11 @@ gleam_javascript = ">= 0.13.0 and < 1.0.0"
gleam_erlang = ">= 0.28.0 and < 1.0.0"
stdin = ">= 1.1.4 and < 2.0.0"
gleam_community_ansi = ">= 1.4.1 and < 2.0.0"
term_size = ">= 1.0.1 and < 2.0.0"

[dev-dependencies]
gleeunit = ">= 1.0.0 and < 2.0.0"
pprint = ">= 1.0.4 and < 2.0.0"

[javascript]
typescript_declarations = true
Expand Down
5 changes: 5 additions & 0 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
packages = [
{ name = "argv", version = "1.0.2", build_tools = ["gleam"], requirements = [], otp_app = "argv", source = "hex", outer_checksum = "BA1FF0929525DEBA1CE67256E5ADF77A7CDDFE729E3E3F57A5BDCAA031DED09D" },
{ name = "filepath", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "EFB6FF65C98B2A16378ABC3EE2B14124168C0CE5201553DE652E2644DCFDB594" },
{ name = "glam", version = "2.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glam", source = "hex", outer_checksum = "66EC3BCD632E51EED029678F8DF419659C1E57B1A93D874C5131FE220DFAD2B2" },
{ name = "gleam_community_ansi", version = "1.4.1", build_tools = ["gleam"], requirements = ["gleam_community_colour", "gleam_stdlib"], otp_app = "gleam_community_ansi", source = "hex", outer_checksum = "4CD513FC62523053E62ED7BAC2F36136EC17D6A8942728250A9A00A15E340E4B" },
{ name = "gleam_community_colour", version = "1.4.0", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib"], otp_app = "gleam_community_colour", source = "hex", outer_checksum = "795964217EBEDB3DA656F5EB8F67D7AD22872EB95182042D3E7AFEF32D3FD2FE" },
{ name = "gleam_erlang", version = "0.28.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "BE551521F708DCE5CB954AFBBDF08519C1C44986521FD40753608825F48FFA9E" },
Expand All @@ -12,9 +13,11 @@ packages = [
{ name = "gleam_stdlib", version = "0.41.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "1B2F80CB1B66B027E3198A2FF71EF3F2F31DF89ED97AD606F25FD387A4C3C1EF" },
{ name = "gleeunit", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "F7A7228925D3EE7D0813C922E062BFD6D7E9310F0BEE585D3A42F3307E3CFD13" },
{ name = "glint", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_community_colour", "gleam_stdlib", "snag"], otp_app = "glint", source = "hex", outer_checksum = "A3F1B7C665FD216BE6A886D56537F0E095FB07DF62146074109270B798F8CEC4" },
{ name = "pprint", version = "1.0.4", build_tools = ["gleam"], requirements = ["glam", "gleam_stdlib"], otp_app = "pprint", source = "hex", outer_checksum = "C310A98BDC0995644847C3C8702DE19656D6BCD638B2A8A358B97824379ECAA1" },
{ name = "simplifile", version = "2.2.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0DFABEF7DC7A9E2FF4BB27B108034E60C81BEBFCB7AB816B9E7E18ED4503ACD8" },
{ name = "snag", version = "0.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "snag", source = "hex", outer_checksum = "54D32E16E33655346AA3E66CBA7E191DE0A8793D2C05284E3EFB90AD2CE92BCC" },
{ name = "stdin", version = "1.1.4", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "stdin", source = "hex", outer_checksum = "04C04035F2A4CEEFB023837249649CD25F9A9CF5A45F9947C4D0462428A4677D" },
{ name = "term_size", version = "1.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "term_size", source = "hex", outer_checksum = "D00BD2BC8FB3EBB7E6AE076F3F1FF2AC9D5ED1805F004D0896C784D06C6645F1" },
{ name = "thoas", version = "1.2.1", build_tools = ["rebar3"], requirements = [], otp_app = "thoas", source = "hex", outer_checksum = "E38697EDFFD6E91BD12CEA41B155115282630075C2A727E7A6B2947F5408B86A" },
]

Expand All @@ -26,5 +29,7 @@ gleam_javascript = { version = ">= 0.13.0 and < 1.0.0" }
gleam_stdlib = { version = ">= 0.34.0 and < 2.0.0" }
gleeunit = { version = ">= 1.0.0 and < 2.0.0" }
glint = { version = ">= 1.1.0 and < 2.0.0" }
pprint = { version = ">= 1.0.4 and < 2.0.0" }
simplifile = { version = ">= 2.2.0 and < 3.0.0" }
stdin = { version = ">= 1.1.4 and < 2.0.0" }
term_size = { version = ">= 1.0.1 and < 2.0.0" }
26 changes: 26 additions & 0 deletions pages/reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# General Reference

- [Restriction Site Formatting](#restriction-site-formatting)

## Restriction Site Formatting

Restriction sites are parsed using the following rules:

- `AGCT` characters are read into the consensus sequence and validated;
- `N` characters are ignored;
- `^` characters signify the cute site;
- All other characters are ignored.

So, parsing a restriction string such as these: `ACGT^CG` and `ACGTCGN^NN` will yield:

```
ACGT^CG recognition: ACGTCG
length: 6
cut_index: 4 (cuts 4 bases after the first base of the recognition site)

ACGTCGN^NN recognition: ACGTCG
length: 6
cut_index: 7
```

Quite simple!
76 changes: 0 additions & 76 deletions src/actions/dna.gleam

This file was deleted.

8 changes: 0 additions & 8 deletions src/actions/translation.gleam

This file was deleted.

74 changes: 0 additions & 74 deletions src/cli.gleam

This file was deleted.

23 changes: 0 additions & 23 deletions src/cli/flags.gleam

This file was deleted.

Loading
Loading