-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathfindClade.py
executable file
·43 lines (37 loc) · 1.2 KB
/
findClade.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
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 24 13:51:27 2019
@author: hunte
"""
from Common import CommonMethods
import sys
if len(sys.argv) > 4:
tbCladeSNPFile = sys.argv[1]
tbSNPcladeFile = sys.argv[2]
snps = sys.argv[3].split(",")
snpPanelConfigFile = sys.argv[4]
positives = set([])
negatives = set([])
for snp in snps:
stripped = snp.strip()
if stripped != "":
if stripped[-1] == "+":
positives.add(stripped[0:-1])
else:
if stripped[-1] == "-":
negatives.add(stripped[0:-1])
#tbcladeSNP = tabix.open(cladeSNPFilePath)
#
#print("J-Z1043", cladeSNPFilePath, SNPcladeFilePath)
#print(", ".join(getCladeSNPs("J-Z1043")))
#
#tbSNPclade = tabix.open(SNPcladeFilePath)
#print(SNPcladeFilePath)
#
#print(", ".join(getSNPClades("M12")))
#print(", ".join(getSNPClades("USP9YPLUS3636")))
CommonMethods.findCladeRefactored(positives, negatives, tbCladeSNPFile, tbSNPcladeFile, snpPanelConfigFile)
#hier = createMinimalTree(["PH1080","USP9YPLUS3636","Z1043"])
#print(", ".join(list(hier.keys())))
#
#findClade(set(["PH1080","Z1043","Z1297","M12","M241","L283","Z1825"]),set(["CTS11760","Z8429"]))