-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathclairvoyante.py
executable file
·46 lines (38 loc) · 1.64 KB
/
clairvoyante.py
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
#!/usr/bin/env python
import os
import sys
import importlib
if sys.version_info.major >= 3:
clv_path = os.path.dirname(os.path.abspath(__file__))+os.sep+'clairvoyante'
sys.path.insert(1, clv_path)
def mod(dir, name):
if sys.argv[1] == name:
r = importlib.import_module("%s.%s" % (dir, name))
sys.argv = sys.argv[1:]
sys.argv[0] += (".py")
r.main()
sys.exit(0)
cl = ["callVarBamParallel", "callVarBam", "callVar", "calTrainDevDiff", "demoRun", "evaluateListOfModels", "evaluate", "getEmbedding", "getTensorAndLayerPNG", "tensor2Bin", "trainNonstop", "train", "trainWithoutValidationNonstop"]
dp = ["ChooseItemInBed", "CombineMultipleDatasetsForTraining", "CountNumInBed", "CreateTensor", "ExtractVariantCandidates", "GetTruth", "PairWithNonVariants", "RandomSampling"]
def main():
if len(sys.argv) <= 1:
print ("Clairvoyante submodule invocator:")
print (" Usage: clairvoyante.py SubmoduleName [Options of the submodule]")
print ("")
print ("Available data preparation submodules:")
for n in dp: print (" - %s" % n)
print ("")
print ("Available clairvoyante submodules:")
for n in cl: print (" - %s" % n)
print ("")
print ("Data preparation scripts:")
print ("%s/dataPrepScripts" % os.path.dirname(os.path.abspath(sys.argv[0])))
print ("")
print ("Clairvoyante scripts:")
print ("%s/clairvoyante" % os.path.dirname(os.path.abspath(sys.argv[0])))
print ("")
sys.exit(0)
for n in cl: mod("clairvoyante", n)
for n in dp: mod("dataPrepScripts", n)
if __name__ == "__main__":
main()