Skip to content

Commit

Permalink
Move all files to lib directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Koeng101 committed Dec 12, 2023
1 parent 59bae8a commit 8bdbb6d
Show file tree
Hide file tree
Showing 155 changed files with 75 additions and 74 deletions.
3 changes: 2 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ run:
timeout: 1m
skip-dirs:
- data
- api/gen
linters:
enable:
- bodyclose
Expand All @@ -26,4 +27,4 @@ linters-settings:
# https://staticcheck.io/docs/options#checks
checks:
- "all"
- "-ST1005" # Disable "Incorrectly formatted error string" errors. TODO: Enable this and fix the errors.
- "-ST1005" # Disable "Incorrectly formatted error string" errors. TODO: Enable this and fix the errors.
2 changes: 1 addition & 1 deletion align/align.go → lib/align/align.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Tim
package align

import (
"github.com/koeng101/dnadesign/align/matrix"
"github.com/koeng101/dnadesign/lib/align/matrix"
)

// Scoring is a struct that holds the scoring matrix for match, mismatch, and gap penalties.
Expand Down
6 changes: 3 additions & 3 deletions align/align_test.go → lib/align/align_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package align_test
import (
"testing"

"github.com/koeng101/dnadesign/align"
"github.com/koeng101/dnadesign/align/matrix"
"github.com/koeng101/dnadesign/alphabet"
"github.com/koeng101/dnadesign/lib/align"
"github.com/koeng101/dnadesign/lib/align/matrix"
"github.com/koeng101/dnadesign/lib/alphabet"
)

func TestNeedlemanWunsch(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions align/example_test.go → lib/align/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package align_test
import (
"fmt"

"github.com/koeng101/dnadesign/align"
"github.com/koeng101/dnadesign/align/matrix"
"github.com/koeng101/dnadesign/alphabet"
"github.com/koeng101/dnadesign/lib/align"
"github.com/koeng101/dnadesign/lib/align/matrix"
"github.com/koeng101/dnadesign/lib/alphabet"
)

func ExampleNeedlemanWunsch() {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion align/matrix/matrix.go → lib/align/matrix/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package matrix
import (
"fmt"

"github.com/koeng101/dnadesign/alphabet"
"github.com/koeng101/dnadesign/lib/alphabet"
)

// SubstitutionMatrix is a struct that holds a substitution matrix and the two alphabets that the matrix is defined over.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package matrix_test
import (
"testing"

"github.com/koeng101/dnadesign/align/matrix"
"github.com/koeng101/dnadesign/alphabet"
"github.com/koeng101/dnadesign/lib/align/matrix"
"github.com/koeng101/dnadesign/lib/alphabet"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/koeng101/dnadesign/alphabet"
"github.com/koeng101/dnadesign/lib/alphabet"
)

func TestAlphabet(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions bio/bio.go → lib/bio/bio.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
"io"
"math"

"github.com/koeng101/dnadesign/bio/fasta"
"github.com/koeng101/dnadesign/bio/fastq"
"github.com/koeng101/dnadesign/bio/genbank"
"github.com/koeng101/dnadesign/bio/pileup"
"github.com/koeng101/dnadesign/bio/slow5"
"github.com/koeng101/dnadesign/lib/bio/fasta"
"github.com/koeng101/dnadesign/lib/bio/fastq"
"github.com/koeng101/dnadesign/lib/bio/genbank"
"github.com/koeng101/dnadesign/lib/bio/pileup"
"github.com/koeng101/dnadesign/lib/bio/slow5"
"golang.org/x/sync/errgroup"
)

Expand Down
4 changes: 2 additions & 2 deletions bio/example_test.go → lib/bio/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"os"
"strings"

"github.com/koeng101/dnadesign/bio"
"github.com/koeng101/dnadesign/bio/fasta"
"github.com/koeng101/dnadesign/lib/bio"
"github.com/koeng101/dnadesign/lib/bio/fasta"
)

// Example_read shows an example of reading a file from disk.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"strings"

"github.com/koeng101/dnadesign/bio/fasta"
"github.com/koeng101/dnadesign/lib/bio/fasta"
)

// This example shows how to open a file with the fasta parser. The sequences
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/koeng101/dnadesign/bio/fastq"
"github.com/koeng101/dnadesign/lib/bio/fastq"
)

//go:embed data/nanosavseq.fastq
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion bio/genbank/genbank.go → lib/bio/genbank/genbank.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strconv"
"strings"

"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/transform"
"github.com/lunny/log"
"github.com/mitchellh/go-wordwrap"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/transform"
"github.com/stretchr/testify/assert"
)

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions bio/gff/example_test.go → lib/bio/gff/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"path/filepath"
"testing"

"github.com/koeng101/dnadesign/bio/gff"
"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/bio/gff"
"github.com/koeng101/dnadesign/lib/transform"
)

// This example shows how to open a gff file and search for a gene given its
Expand Down
2 changes: 1 addition & 1 deletion bio/gff/gff.go → lib/bio/gff/gff.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"lukechampine.com/blake3"

"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/transform"
)

var (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package rebase_test
import (
"fmt"

"github.com/koeng101/dnadesign/bio/rebase"
"github.com/koeng101/dnadesign/lib/bio/rebase"
)

// This example reads rebase into an enzymeMap and returns the AarI recognition
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/koeng101/dnadesign/bio/slow5"
"github.com/koeng101/dnadesign/lib/bio/slow5"
)

func ExampleNewParser() {
Expand Down
2 changes: 1 addition & 1 deletion bio/slow5/slow5.go → lib/bio/slow5/slow5.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (parser *Parser) Next() (*Read, error) {
// For whatever reason, this is a string.
newRead.ChannelNumber = values[valueIndex]
default:
return nil, fmt.Errorf("Unknown field to parser '%s' found on line %d. Please report to github.com/koeng101/dnadesign", fieldValue, parser.line)
return nil, fmt.Errorf("Unknown field to parser '%s' found on line %d. Please report to github.com/koeng101/dnadesign/lib", fieldValue, parser.line)
}
}
return &newRead, nil
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package uniprot_test
import (
"fmt"

"github.com/koeng101/dnadesign/bio/uniprot"
"github.com/koeng101/dnadesign/lib/bio/uniprot"
)

// This example shows how to open a uniprot data dump file and read the results
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion checks/checks.go → lib/checks/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package checks
import (
"strings"

"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/transform"
)

// IsPalindromic accepts a sequence of even length and returns if it is
Expand Down
2 changes: 1 addition & 1 deletion checks/checks_test.go → lib/checks/checks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package checks_test
import (
"testing"

"github.com/koeng101/dnadesign/checks"
"github.com/koeng101/dnadesign/lib/checks"
)

// This also needs an example test.
Expand Down
6 changes: 3 additions & 3 deletions clone/clone.go → lib/clone/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ import (
"sort"
"strings"

"github.com/koeng101/dnadesign/checks"
"github.com/koeng101/dnadesign/seqhash"
"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/checks"
"github.com/koeng101/dnadesign/lib/seqhash"
"github.com/koeng101/dnadesign/lib/transform"
)

// Part is a simple struct that can carry a circular or linear DNA sequence.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions clone/example_test.go → lib/clone/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"log"

"github.com/koeng101/dnadesign/clone"
"github.com/koeng101/dnadesign/seqhash"
"github.com/koeng101/dnadesign/lib/clone"
"github.com/koeng101/dnadesign/lib/seqhash"
)

func ExampleGoldenGate() {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion doc.go → lib/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
Package DnaDesign is a Go package for engineering organisms.
Browse our subpackages to find the functionality and documentation you need:
https://pkg.go.dev/github.com/koeng101/dnadesign#section-directories
https://pkg.go.dev/github.com/koeng101/dnadesign/lib#section-directories
*/
package dnadesign
2 changes: 1 addition & 1 deletion fold/dna.go → lib/fold/dna.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fold

import "github.com/koeng101/dnadesign/transform"
import "github.com/koeng101/dnadesign/lib/transform"

var dnaComplement = transform.ComplementBase

Expand Down
2 changes: 1 addition & 1 deletion fold/example_test.go → lib/fold/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package fold_test
import (
"fmt"

"github.com/koeng101/dnadesign/fold"
"github.com/koeng101/dnadesign/lib/fold"
)

func ExampleZuker() {
Expand Down
2 changes: 1 addition & 1 deletion fold/fold.go → lib/fold/fold.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"math"
"strings"

"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/transform"
)

// Zuker folds the DNA sequence and return the lowest free energy score.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion fold/rna.go → lib/fold/rna.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fold

import "github.com/koeng101/dnadesign/transform"
import "github.com/koeng101/dnadesign/lib/transform"

var rnaComplement = transform.ComplementBaseRNA

Expand Down
2 changes: 1 addition & 1 deletion fold/seqfold.go → lib/fold/seqfold.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math"
"strings"

"github.com/koeng101/dnadesign/checks"
"github.com/koeng101/dnadesign/lib/checks"
)

const (
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion mash/example_test.go → lib/mash/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mash_test
import (
"fmt"

"github.com/koeng101/dnadesign/mash"
"github.com/koeng101/dnadesign/lib/mash"
)

func ExampleMash() {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion mash/mash_test.go → lib/mash/mash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mash_test
import (
"testing"

"github.com/koeng101/dnadesign/mash"
"github.com/koeng101/dnadesign/lib/mash"
)

func TestMash(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pcr_test
import (
"fmt"

"github.com/koeng101/dnadesign/primers/pcr"
"github.com/koeng101/dnadesign/lib/primers/pcr"
)

// This example shows how to design a sequence.
Expand Down
4 changes: 2 additions & 2 deletions primers/pcr/pcr.go → lib/primers/pcr/pcr.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"sort"
"strings"

"github.com/koeng101/dnadesign/primers"
"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/primers"
"github.com/koeng101/dnadesign/lib/transform"
)

// https://doi.org/10.1089/dna.1994.13.75
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions primers/primers.go → lib/primers/primers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"math"
"strings"

"github.com/koeng101/dnadesign/checks"
"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/checks"
"github.com/koeng101/dnadesign/lib/transform"
)

// For reference: https://www.sigmaaldrich.com/technical-documents/articles/biology/oligos-melting-temp.html
Expand Down
4 changes: 2 additions & 2 deletions primers/primers_test.go → lib/primers/primers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strings"
"testing"

"github.com/koeng101/dnadesign/primers"
"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/primers"
"github.com/koeng101/dnadesign/lib/transform"
)

func ExampleMarmurDoty() {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions seqhash/example_test.go → lib/seqhash/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/koeng101/dnadesign/bio"
"github.com/koeng101/dnadesign/seqhash"
"github.com/koeng101/dnadesign/lib/bio"
"github.com/koeng101/dnadesign/lib/seqhash"
)

// This example shows how to seqhash a sequence.
Expand Down
2 changes: 1 addition & 1 deletion seqhash/seqhash.go → lib/seqhash/seqhash.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import (
"sort"
"strings"

"github.com/koeng101/dnadesign/transform"
"github.com/koeng101/dnadesign/lib/transform"
"lukechampine.com/blake3"
)

Expand Down
2 changes: 1 addition & 1 deletion seqhash/seqhash_test.go → lib/seqhash/seqhash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"testing"

"github.com/koeng101/dnadesign/bio"
"github.com/koeng101/dnadesign/lib/bio"
"github.com/sergi/go-diff/diffmatchpatch"
)

Expand Down
2 changes: 1 addition & 1 deletion synthesis/codon/codon.go → lib/synthesis/codon/codon.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"strings"
"time"

"github.com/koeng101/dnadesign/bio/genbank"
"github.com/koeng101/dnadesign/lib/bio/genbank"
weightedRand "github.com/mroth/weightedrand"
)

Expand Down
Loading

0 comments on commit 8bdbb6d

Please sign in to comment.