Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
TwFlem committed Nov 5, 2023
1 parent 7a733c7 commit 3941e24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
27 changes: 0 additions & 27 deletions clone/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,33 +294,6 @@ func recurseLigate(seedFragment Fragment, fragmentList []Fragment, usedFragments
return openConstructs, infiniteConstructs
}

func getConstructs(c chan string, constructSequences chan []string, circular bool) {
var constructs []string
var exists bool
var existingSeqhashes []string
for {
construct, more := <-c
if more {
exists = false
seqhashConstruct, _ := seqhash.Hash(construct, "DNA", circular, true)
// Check if this construct is unique
for _, existingSeqhash := range existingSeqhashes {
if existingSeqhash == seqhashConstruct {
exists = true
}
}
if !exists {
constructs = append(constructs, construct)
existingSeqhashes = append(existingSeqhashes, seqhashConstruct)
}
} else {
constructSequences <- constructs
close(constructSequences)
return
}
}
}

// CircularLigate simulates ligation of all possible fragment combinations into circular plasmids.
func CircularLigate(fragments []Fragment) ([]string, []string) {
var outputConstructs []string
Expand Down
4 changes: 2 additions & 2 deletions clone/clone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func TestGoldenGate(t *testing.T) {
}
}

func ExampleGoldenGate() {
func ExampleEnzymeManager_GoldenGate() {
em := NewEnzymeManager(GetBaseRestrictionEnzymes())
// Fragment 1 has a palindrome at its start. This isn't very common but
// can occur. These two fragments are real DNA fragments used in the
Expand Down Expand Up @@ -204,7 +204,7 @@ func TestCircularCutRegression(t *testing.T) {

func benchmarkGoldenGate(b *testing.B, em EnzymeManager, parts []Part) {
for n := 0; n < b.N; n++ {
em.GoldenGate(parts, "BbsI")
_, _, _ = em.GoldenGate(parts, "BbsI")
}
}

Expand Down

0 comments on commit 3941e24

Please sign in to comment.