-
Notifications
You must be signed in to change notification settings - Fork 0
/
golden_gate_test.go
50 lines (38 loc) · 1.13 KB
/
golden_gate_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package golden_gate
import (
"fmt"
"io/ioutil"
"github.com/Open-Science-Global/poly"
"github.com/Open-Science-Global/poly/io/genbank"
)
func ExampleSimulateGoldenGateLinearFragments() {
root := "./data/linearSequences/"
dir, _ := ioutil.ReadDir(root)
var files []string
for _, f := range dir {
files = append(files, f.Name())
}
var sequences []poly.Sequence
for _, file := range files {
sequences = append(sequences, genbank.Read(root+file))
}
finalPlasmid := SimulateGoldenGate(sequences, "BsaI")
fmt.Println(len(finalPlasmid[0].Sequence), finalPlasmid[0].Circular)
// Output: 10363 true
}
func ExampleSimulateGoldenGateCircularFragments() {
root := "./data/circularSequences/"
dir, _ := ioutil.ReadDir(root)
var files []string
for _, f := range dir {
files = append(files, f.Name())
}
var sequences []poly.Sequence
for _, file := range files {
sequences = append(sequences, genbank.Read(root+file))
}
finalPlasmid := SimulateGoldenGate(sequences, "BbsI")
fmt.Println(finalPlasmid)
// Output: More than 1 cloned sequence simulated in basic genes
// []
}