-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
50 lines (45 loc) · 1.23 KB
/
index.js
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
#!/usr/bin/env node
/**
* Module dependencies.
*/
const program = require("commander");
const {
getSequenceFileForType,
defaultCount,
defaultMaxLength,
defaultMinLength,
} = require("./helperFns");
program
.version("1.0.7")
.description(
"Generate sequences of varying formats (gb|csv|fasta). By default it will generate 100 sequences with random lengths between 1k and 10k bps"
)
.option(
"-l, --lengths [lengths]",
"a comma separated list of how long the sequences should be, overrides min/max length"
)
.option(
"-i, --minLength [minLength]",
"min length for the seqs being generated",
defaultMinLength
)
.option(
"-m, --maxLength [maxLength]",
"max length for the seqs being generated",
defaultMaxLength
)
.option(
"-c, --count [count]",
"how many to export of each specified type",
defaultCount
)
.option("-t, --type [type]", "choose one of [gb|csv|fasta]", "gb")
.parse(process.argv);
console.info("file type: ", program.type);
console.info("count: ", program.count);
if (program.lengths) {
console.info("generating seqs w/ lengths: ", program.lengths);
} else {
console.info("generating seqs between: ", program.lengths);
}
getSequenceFileForType(program);