saving work for today
This commit is contained in:
parent
569b7c6c7f
commit
49a38dd1ae
1 changed files with 10 additions and 8 deletions
|
@ -43,6 +43,7 @@ arg_parser = argparse.ArgumentParser()
|
||||||
#arg_parser.add_argument('-g', '--gene', help='gene name', default = 'pncA') # case sensitive
|
#arg_parser.add_argument('-g', '--gene', help='gene name', default = 'pncA') # case sensitive
|
||||||
arg_parser.add_argument('-d', '--drug', help='drug name', default = 'DRUGNAME')
|
arg_parser.add_argument('-d', '--drug', help='drug name', default = 'DRUGNAME')
|
||||||
arg_parser.add_argument('-g', '--gene', help='gene name', default = 'geneName')
|
arg_parser.add_argument('-g', '--gene', help='gene name', default = 'geneName')
|
||||||
|
#arg_parser.add_argument('-p', '--plot', help='show plot', action='store_true')
|
||||||
args = arg_parser.parse_args()
|
args = arg_parser.parse_args()
|
||||||
#=======================================================================
|
#=======================================================================
|
||||||
#%% variable assignment: input and output
|
#%% variable assignment: input and output
|
||||||
|
@ -50,6 +51,7 @@ args = arg_parser.parse_args()
|
||||||
#gene = 'pncA'
|
#gene = 'pncA'
|
||||||
drug = args.drug
|
drug = args.drug
|
||||||
gene = args.gene
|
gene = args.gene
|
||||||
|
#plot = args.plot
|
||||||
gene_match = gene + '_p.'
|
gene_match = gene + '_p.'
|
||||||
|
|
||||||
#==========
|
#==========
|
||||||
|
@ -79,7 +81,7 @@ print('Output filename:', out_filename
|
||||||
#%% end of variable assignment for input and output files
|
#%% end of variable assignment for input and output files
|
||||||
#=======================================================================
|
#=======================================================================
|
||||||
#%% kd values from fasta file and output csv
|
#%% kd values from fasta file and output csv
|
||||||
def kd_to_csv(inputfasta, outputkdcsv, windowsize, plot=False):
|
def kd_to_csv(inputfasta, outputkdcsv, windowsize):
|
||||||
"""
|
"""
|
||||||
Calculate kd (hydropathy values) from input fasta file
|
Calculate kd (hydropathy values) from input fasta file
|
||||||
|
|
||||||
|
@ -199,13 +201,13 @@ def kd_to_csv(inputfasta, outputkdcsv, windowsize, plot=False):
|
||||||
# FIXME: save fig
|
# FIXME: save fig
|
||||||
# extract just pdb if from 'id' to pass to title of plot
|
# extract just pdb if from 'id' to pass to title of plot
|
||||||
# foo = re.match(r'(^[0-9]{1}\w{3})', id).groups(1)
|
# foo = re.match(r'(^[0-9]{1}\w{3})', id).groups(1)
|
||||||
if plot:
|
# if doplot:
|
||||||
plot(kd_values, linewidth = 1.0)
|
plot(kd_values, linewidth = 1.0)
|
||||||
#axis(xmin = 1, xmax = num_residues)
|
#axis(xmin = 1, xmax = num_residues)
|
||||||
xlabel('Residue Number')
|
xlabel('Residue Number')
|
||||||
ylabel('Hydrophobicity')
|
ylabel('Hydrophobicity')
|
||||||
title('K&D Hydrophobicity for ' + id)
|
title('K&D Hydrophobicity for ' + id)
|
||||||
show()
|
show()
|
||||||
|
|
||||||
#%% end of function
|
#%% end of function
|
||||||
#=======================================================================
|
#=======================================================================
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue