21 This is meant to be a set of functions for running and parsing calibur
22 Uses system path, or specified path in calculations.
23 Calibur path should be in PATH, or specified upon construction.
31 def run_calibur(self, PDBLIST_Path, chain=False, Nter=False, Cter=False, threshold=0):
33 Nter, Cter are not residue numbering - pretty much it is rosetta numbering as far as I can tell...
34 Need to do this better with option type thing..
38 run = run+
" -c "+chain
40 run = run+
" -r "+repr(Nter)+
','+repr(Cter)
41 run = run+
' '+PDBLIST_Path
43 run = run+
' -t '+repr(threshold)
44 self.
output = os.popen(run).readlines()
45 print "Calibur Completed..."
50 return array of top 2 clusters, and a corresponding array of sizes.
55 if re.search(
"Largest 2 clusters", line):
56 clusline = line.strip()
62 print "Clustering failed..."
65 sp1 = clusline.split(
":")
67 sp2 = sp1[1].
split(
",")
68 paths = []; neighbors = []
72 neighbors.append(
int(sp3[1].
split(
")")[0]))
74 return paths, neighbors
78 Returns threshold used in analysis.
82 if re.search(
"Threshold = ", line):
83 sp = line.split(
" = ")
utility::vector1< std::string > split(const std::string &s)
split given std::string using ' ' symbol.
std::string & strip(std::string &s, std::string const &chars)
Strip Specified Characters from a string's Tails.