Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
frolov-pchem committed Mar 23, 2022
1 parent 5a23b11 commit f6c6891
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 16 deletions.
9 changes: 7 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

extn_coeff_fasta_v2.2/
extn_coeff_fasta

* 2022-03-23 bug fixed: fixed std ouput results display. "molid" changed to "mol_name" in the code and some code polishing.

2.2
---
Expand All @@ -19,11 +21,14 @@ pI_fasta_v1.4/



rdkit_pI_v3.2/
rdkit_pI/

Changes
=======

2022-03-23 bug fix: the output was incomplete if the extra keys (print_fragmet_pkas, etc.) were switched on.


3.2
-----

Expand Down
6 changes: 4 additions & 2 deletions extn_coeff_fasta/extn_coeff_fasta.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,11 @@ def calc_extn_coeff_single_sequence(sequence):


def print_stdout(dict_in):
for molid_ind in dict_in['molid_ind_list']:
#for molid_ind in dict_in['molid_ind_list']:
for molid_ind in dict_in.keys():
dict_extn_coeff = dict_in[molid_ind]
molid = dict_extn_coeff['molid']
print(dict_extn_coeff.keys())
molid = dict_extn_coeff['mol_name']
print("======================================================================================================================================================")
print("--- Molar absorption coefficient at different wavelength")
print("mol ID: "+molid)
Expand Down
4 changes: 3 additions & 1 deletion rdkit_pI/TEST/run_pI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if [ -z "$i" ]; then echo "no input. $usage" ; fi
if [ -z "$o" ]; then echo "no output. $usage" ; fi

#python ../rdkit_pI.py -i ${i} --plot_titration_curve --print_fragment_pkas --use_acdlabs &> $o
python ../rdkit_pI.py -i ${i} --plot_titration_curve --print_fragment_pkas --use_dimorphite --json &> $o
#python ../rdkit_pI.py -i ${i} --plot_titration_curve --print_fragment_pkas --use_dimorphite --json &> $o
#python ../rdkit_pI.py -i ${i} --plot_titration_curve --print_fragment_pkas --use_dimorphite &> $o
python ../rdkit_pI.py -i ${i} --plot_titration_curve --print_fragment_pkas --use_dimorphite


23 changes: 12 additions & 11 deletions rdkit_pI/rdkit_pI.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,16 +626,17 @@ def calc_rdkit_pI(options={'smiles':'','inputDict':{},'inputJSON':'','inputFile'
'plot_filename':figFileName,
'pI_interval_threshold':int_tr
}
if args.l_print_pka_set:
dict_output_rdkit_pI[molid_ind]={'pKa_set':pKaset }
#if args.l_print_pka_set:
dict_output_rdkit_pI[molid_ind].update({'pKa_set':pKaset })

if args.l_print_fragments:
dict_output_rdkit_pI[molid_ind]={
dict_output_rdkit_pI[molid_ind].update({
'base_pkas_fasta':base_pkas_fasta,
'acid_pkas_fasta':acid_pkas_fasta,
'base_pkas_calc':base_pkas_calc,
'acid_pkas_calc':acid_pkas_calc,
'constant_Qs_calc':net_Qs
}
})


#'diacid_pkas_calc':diacid_pkas_calc,
Expand All @@ -661,20 +662,20 @@ def print_output(dict_output_rdkit_pI,args):
elif args.use_dimorphite: predition_tool = 'modified Dimorphite-DL'

int_tr = dict_output_rdkit_pI[molid_ind]['pI_interval_threshold']
base_pkas_fasta = dict_output_rdkit_pI[molid_ind]['base_pkas_fasta']
acid_pkas_fasta = dict_output_rdkit_pI[molid_ind]['acid_pkas_fasta']
#diacid_pkas_fasta = dict_output_rdkit_pI[molid_ind]['diacid_pkas_fasta']
base_pkas_calc = dict_output_rdkit_pI[molid_ind]['base_pkas_calc']
acid_pkas_calc = dict_output_rdkit_pI[molid_ind]['acid_pkas_calc']
#diacid_pkas_calc = dict_output_rdkit_pI[molid_ind]['diacid_pkas_calc']
constant_Qs_calc = dict_output_rdkit_pI[molid_ind]['constant_Qs_calc']
pKaset = dict_output_rdkit_pI[molid_ind]['pKa_set']

print(" ")
print("pH interval with charge between %4.1f and %4.1f for pKa set: %s and prediction tool: %s" % (-int_tr,int_tr,pKaset,predition_tool) )
print("%4.1f - %4.1f" % (dict_output_rdkit_pI[molid_ind]['pI_interval'][0],dict_output_rdkit_pI[molid_ind]['pI_interval'][1]))

if args.l_print_fragments:
base_pkas_fasta = dict_output_rdkit_pI[molid_ind]['base_pkas_fasta']
acid_pkas_fasta = dict_output_rdkit_pI[molid_ind]['acid_pkas_fasta']
#diacid_pkas_fasta = dict_output_rdkit_pI[molid_ind]['diacid_pkas_fasta']
base_pkas_calc = dict_output_rdkit_pI[molid_ind]['base_pkas_calc']
acid_pkas_calc = dict_output_rdkit_pI[molid_ind]['acid_pkas_calc']
#diacid_pkas_calc = dict_output_rdkit_pI[molid_ind]['diacid_pkas_calc']
constant_Qs_calc = dict_output_rdkit_pI[molid_ind]['constant_Qs_calc']

# merge fasta and calcualted pkas
base_pkas = base_pkas_fasta[pKaset] + base_pkas_calc
Expand Down
Binary file removed rdkit_pI/rdkit_pI.py.swp
Binary file not shown.

0 comments on commit f6c6891

Please sign in to comment.