Skip to content

Commit 39018eb

Browse files
committed
Merge branch 'main' into api
2 parents ce7228b + 3aab61c commit 39018eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+53697
-2284
lines changed
File renamed without changes.

.github/workflows/test.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
pull_request:
88
name: Test
99
jobs:
10-
test:
10+
test-lib:
1111
strategy:
1212
matrix:
1313
go-version: [1.21.x,]
@@ -22,6 +22,39 @@ jobs:
2222
uses: actions/checkout@v2
2323
- name: Test
2424
run: go test -v ./lib/...
25+
test-external:
26+
strategy:
27+
matrix:
28+
go-version: [1.21.x,]
29+
platform: [ubuntu-latest]
30+
runs-on: ${{ matrix.platform }}
31+
steps:
32+
- name: Install Go
33+
uses: actions/setup-go@v2
34+
with:
35+
go-version: ${{ matrix.go-version }}
36+
- name: Checkout code
37+
uses: actions/checkout@v2
38+
- name: Download minimap2
39+
run: |
40+
curl -L https://github.com/lh3/minimap2/releases/download/v2.26/minimap2-2.26_x64-linux.tar.bz2 | tar -jxvf -
41+
mkdir -p $HOME/bin
42+
cp ./minimap2-2.26_x64-linux/minimap2 $HOME/bin
43+
echo "$HOME/bin" >> $GITHUB_PATH
44+
- name: Install dependencies for samtools
45+
run: |
46+
sudo apt-get update
47+
sudo apt-get install -y libncurses5-dev libbz2-dev liblzma-dev zlib1g-dev
48+
- name: Download and install samtools
49+
run: |
50+
curl -L https://github.com/samtools/samtools/releases/download/1.13/samtools-1.13.tar.bz2 | tar -jxvf -
51+
cd samtools-1.13
52+
./configure --prefix=$HOME/samtools
53+
make
54+
make install
55+
echo "$HOME/samtools/bin" >> $GITHUB_PATH
56+
- name: Test external
57+
run: go test -v ./external/...
2558
openbsd-test:
2659
runs-on: ubuntu-latest
2760
name: 1.21.5 openbsd

CHANGELOG.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

LICENSE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
All copyright for portions of DnaDesign prior to commit f76bf05 are held by
2-
Timothy Stiles, 2023 as part of project Poly. All other copyright for
3-
DnaDesign are held by Keoni Gandall, 2023.
2+
Timothy Stiles, 2023 as part of project Poly.
43

5-
Copyright (c) 2023 Keoni Gandall
4+
Copyright (c) 2023 Keoni Gandall, Timothy Stiles, Vivek Raja, Willow Carretero
5+
Chavez
66

77
Permission is hereby granted, free of charge, to any person obtaining a copy
88
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
DnaDesign is a Go project creating tools for automated genetic design, spanning from the lowest levels of DNA sequence manipulation to higher level functionality.
88

9-
* **Practical:** DnaDesign tooling is meant to be used by practitioners of synthetic biology. Let's make something actually useful!
9+
* **Practical:** DnaDesign tooling is meant to be used by practitioners of synthetic biology.
1010

1111
* **Modern:** DnaDesign is at the bleeding edge of technology. We are happy to adopt the newest advancements in synthetic biology, wasm, LLMs, and more to get our tools in the hands of people who need it.
1212

@@ -16,6 +16,34 @@ DnaDesign is a Go project creating tools for automated genetic design, spanning
1616

1717
* **[Library](https://pkg.go.dev/github.com/koeng101/dnadesign)**
1818

19+
## Repo organization
20+
21+
On the highest level:
22+
* `lib` contains core functionality as a go library.
23+
* `external` contains functions to work with external bioinformatics command-line interfaces.
24+
* `api` contains an OpenAPI exposing all the major functions of lib.
25+
* `deployment` contains full integration tests and yaml for deploying the DnaDesign API to a k3s cluster.
26+
27+
### Detailed repo organization
28+
29+
* [lib](https://pkg.go.dev/github.com/koeng101/dnadesign/lib) contains the core DnaDesign library, with nearly all functionality, all in idiomatic Go with nearly no dependencies.
30+
* [lib/bio](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/bio) contains biological parsers for file formats including [genbank](https://github.com/Koeng101/dnadesign/blob/main/lib/bio/genbank/genbank.go), [fasta](https://github.com/Koeng101/dnadesign/blob/main/lib/bio/fasta/fasta.go), [uniprot](https://github.com/Koeng101/dnadesign/blob/main/lib/bio/uniprot/uniprot.go), [fastq](https://github.com/Koeng101/dnadesign/blob/main/lib/bio/fastq/fastq.go), [slow5](https://github.com/Koeng101/dnadesign/blob/main/lib/bio/slow5/slow5.go), [sam](https://github.com/Koeng101/dnadesign/blob/main/lib/bio/sam/sam.go), and [pileup](https://github.com/Koeng101/dnadesign/blob/main/lib/bio/pileup/pileup.go) files.
31+
* [lib/align](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/align) contains [Needleman-Wunsch](https://en.wikipedia.org/wiki/Needleman%E2%80%93Wunsch_algorithm) and [Smith-Waterman](https://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm) alignment functions, as well as the [mash](https://doi.org/10.1186/s13059-016-0997-x) similarity algorithm.
32+
* [lib/clone](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/clone) contains functions for simulating [DNA cloning](https://en.wikipedia.org/wiki/Molecular_cloning), including [restriction digestion](https://www.neb.com/en-us/applications/cloning-and-synthetic-biology/dna-preparation/restriction-enzyme-digestion), [ligation](https://en.wikipedia.org/wiki/Ligation_(molecular_biology)), and [GoldenGate assembly](https://en.wikipedia.org/wiki/Golden_Gate_Cloning).
33+
* [lib/fold](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/fold) contains DNA and RNA folding simulation software, including the [Zuker](https://doi.org/10.1093/nar/9.1.133) and [LinearFold](https://doi.org/10.1093/bioinformatics/btz375) folding algorithms.
34+
* [lib/primers](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/primers) contains [DNA primer](https://www.nature.com/scitable/definition/primer-305/) design functions.
35+
* [lib/primers/pcr](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/primers/pcr) contains [PCR](https://www.ncbi.nlm.nih.gov/probe/docs/techpcr/) simulation functions.
36+
* [lib/seqhash](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/seqhash) contains the Seqhash algorithm to create universal identifiers for DNA/RNA/protein.
37+
* [lib/synthesis](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/synthesis) contains various functions for designing synthetic DNA.
38+
* [lib/synthesis/codon](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/synthesis/codon) contains functions for working with [codon tables](https://en.wikipedia.org/wiki/DNA_and_RNA_codon_tables), [translating genes](https://en.wikipedia.org/wiki/Translation_(biology)), and [optimizing codons](https://doi.org/10.1073/pnas.0909910107) for expression.
39+
* [lib/synthesis/fragment](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/synthesis/fragment) contains functions for [optimal GoldenGate fragmentation](https://doi.org/10.1371/journal.pone.0238592).
40+
* [lib/synthesis/fix](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/synthesis/fix) contains functions for fixing proteins in preparation for synthesis.
41+
* [lib/transform](https://pkg.go.dev/github.com/koeng101/dnadesign/lib/transform) contains basic utility functions for transforming DNA, like reverse complementation.
42+
* [external](https://pkg.go.dev/github.com/koeng101/dnadesign/external) contains integrations with external bioinformatics software, usually operating on the command line.
43+
* [external/minimap2](https://pkg.go.dev/github.com/koeng101/dnadesign/external/minimap2) contains a function for working with [minimap2](https://github.com/lh3/minimap2) with Go.
44+
* [external/samtools](https://pkg.go.dev/github.com/koeng101/dnadesign/external/samtools) contains a function for generating pileup files using [samtools](https://github.com/samtools/samtools) with Go.
45+
46+
1947
## Contributing
2048

2149
Write good, useful code. Open a pull request, and we'll see if it fits!
@@ -24,16 +52,40 @@ Write good, useful code. Open a pull request, and we'll see if it fits!
2452

2553
* [MIT](LICENSE)
2654

27-
* Copyright (c) 2023 Keoni Gandall
28-
29-
### Sources
55+
## Sources
3056

3157
There are a few pieces of "complete" software that we have directly integrated into the source tree (with their associated licenses). These projects don't receive updates anymore (or just bug fixes with years between). In particular, `lib` has most of these, since we intend to have as few dependencies as possible in `lib`. The integrated projects include the following.
3258
- [svb](https://github.com/rleiwang/svb) in `lib/bio/slow5/svb`
3359
- [intel-cpuid](https://github.com/aregm/cpuid) in `lib/bio/slow5/svb/intel-cpuid`
34-
- [murmur3](https://github.com/spaolacci/murmur3) in `lib/mash/murmur3`
3560
- [wordwrap](https://github.com/mitchellh/go-wordwrap) in `lib/bio/genbank`
3661

37-
### Other
62+
## Other
3863

3964
DnaDesign is a fork of [Poly](https://github.com/TimothyStiles/poly) at commit f76bf05 with a different mission focus.
65+
66+
# Changelog
67+
68+
All notable changes to this project will be documented here.
69+
70+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
71+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
72+
73+
## [Unreleased]
74+
- Added the megamash algorithm [#50](https://github.com/Koeng101/dnadesign/pull/50)
75+
- Changed parsers to return values instead of pointers. Added some sequencing utils [#49](https://github.com/Koeng101/dnadesign/pull/49)
76+
- Added minimap2 and samtools(pileup) integrations in external [#46](https://github.com/Koeng101/dnadesign/pull/46)
77+
- Added sam parser [#5](https://github.com/Koeng101/dnadesign/pull/5)
78+
- Added the LinearFold folding algorithms [#38](https://github.com/Koeng101/dnadesign/pull/38)
79+
- Added Get function to uniprot for getting a single uniprot xml from online [#37](https://github.com/Koeng101/dnadesign/pull/37)
80+
- Removed murmur3 in favor of crc32 for mash [#33](https://github.com/Koeng101/dnadesign/pull/33)
81+
- Patch start codon problems [#32](https://github.com/Koeng101/dnadesign/pull/32)
82+
- Added tests for OpenBSD [#31](https://github.com/Koeng101/dnadesign/pull/31)
83+
- Removed a large number of unneeded dependencies [#28](https://github.com/Koeng101/dnadesign/pull/28)
84+
- Added full rebase text database into tree [27b41fb](https://github.com/Koeng101/dnadesign/commit/27b41fb4fdb849d569278c965849e6f28fb2a7f6)
85+
- Updated uniprot to be a standardized parser [#22](https://github.com/Koeng101/dnadesign/pull/22)
86+
- Purged unsupported gff parser [#23](https://github.com/Koeng101/dnadesign/pull/23)
87+
- Moved library to lib directory [#21](https://github.com/Koeng101/dnadesign/pull/21)
88+
- Fixed issue with JSON codon tables [#4](https://github.com/Koeng101/dnadesign/pull/4)
89+
- Added Seqhash v2 [#3](https://github.com/Koeng101/dnadesign/pull/3)
90+
- Added lowercase methylation options during cloning [#2](https://github.com/Koeng101/dnadesign/pull/2)
91+
- Standardized parsers with generics [#1](https://github.com/Koeng101/dnadesign/pull/1)

external/external.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
Package external contains functions that interact with outside programs.
3+
4+
The primary way that external interacts with common bioinformatics tools is
5+
through the command line, so the bioinformatics programs must be installed on
6+
your local computer.
7+
8+
We would like to port these programs to be in `lib`, using WASM for reliable
9+
builds, but until then, they live here.
10+
*/
11+
package external

external/go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module github.com/koeng101/dnadesign/external
2+
3+
go 1.21.5
4+
5+
require golang.org/x/sync v0.5.0

external/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
2+
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=

0 commit comments

Comments
 (0)