Example #1
0
'''
Plots histogram from a desc_merged.txt file.

INPUT: file_path
OUTPUT: *descriptorname.pdf
ARGUMENTS: file_path
USAGE: python pdb2descriptors.py file_path

'''

#import stuff
from enri import Enri
import sys


e = Enri()
filepath = sys.argv[1]
path, name, name_ext = e.path2names(filepath)
data, headers = e.parse_desc_merged_txt(filepath)
p1, p1headers = e.get_pocket2(data,headers)
e.plot_hist_nolabel(p1, p1headers,path)
'''
Predicts and writes an output file for top n predicted conformations. The
output file is writen to the input directory

INPUT: desc_merged.txt
OUTPUT: *predicted*.txt
ARGUMENTS: input_path, number of desired output (n), beta, ranker (wp or p)
USAGE: python descriptors2predictions desc_merged.txt, n, beta,ranker

'''

#import stuff
from enri import Enri
import sys

e = Enri()
input_path = sys.argv[1]
n = int(sys.argv[2])
beta = float(sys.argv[3])
ranker = sys.argv[4]
path, name, name_ext = e.path2names(input_path)
outdir = path
e.file2top_predicted2(input_path, n, beta, ranker, outdir)