diff --git a/clone/clone.go b/clone/clone.go index 886eeff8..c6665d79 100644 --- a/clone/clone.go +++ b/clone/clone.go @@ -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 diff --git a/clone/clone_test.go b/clone/clone_test.go index bac49436..bf42129c 100644 --- a/clone/clone_test.go +++ b/clone/clone_test.go @@ -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 @@ -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") } }