Snippets

Biosig Lab Pharmacophores changes upon missense mutation

Created by Carlos Miranda Rodrigues

File get_pharmacophores_difference.py Added

  • Ignore whitespace
  • Hide word diff
+import argparse
+
+def main(aa_from,aa_to):
+    fingerprint = {}
+    fingerprint["A"] = [1,0,0,1,1,0,0,2]
+    fingerprint["V"] = [3,0,0,1,1,0,0,2]
+    fingerprint["L"] = [4,0,0,1,1,0,0,2]
+    fingerprint["G"] = [0,0,0,1,1,0,0,2]
+    fingerprint["S"] = [0,0,0,1,2,0,0,3]
+    fingerprint["W"] = [10,0,0,1,2,9,0,2]
+    fingerprint["T"] = [1,0,0,1,2,0,0,3]
+    fingerprint["Q"] = [2,0,0,2,2,0,0,3]
+    fingerprint["E"] = [2,0,2,3,1,0,0,3]
+    fingerprint["C"] = [1,0,0,1,1,0,1,3]
+    fingerprint["R"] = [3,2,0,1,4,0,0,3]
+    fingerprint["P"] = [3,0,0,1,1,0,0,2]
+    fingerprint["D"] = [1,0,2,3,1,0,0,3]
+    fingerprint["F"] = [7,0,0,1,1,6,0,2]
+    fingerprint["I"] = [4,0,0,1,1,0,0,2]
+    fingerprint["H"] = [4,2,0,1,3,5,0,2]
+    fingerprint["N"] = [1,0,0,2,3,0,0,3]
+    fingerprint["M"] = [3,0,0,1,1,0,1,2]
+    fingerprint["Y"] = [7,0,0,1,2,6,0,2]
+    fingerprint["K"] = [3,1,0,1,2,0,0,3]
+    #Hydrophobics,Positives,Negatives,Acceptors,Donnors,Aromatics,Sulfurs,Neutral
+    vector_difference = [fingerprint[aa_from][i]-fingerprint[aa_to][i] for i in range(0,len(fingerprint[aa_from]))]
+    print(vector_difference)
+    return True
+
+if __name__ == "__main__":
+    parser = argparse.ArgumentParser(description='Pharmacophores changes upon missense mutation')
+    parser.add_argument('-f', '--from', dest='aa_from', required=True, help='One letter code for wild-type residue')
+    parser.add_argument('-t', '--to', dest='aa_to', required=True, help='One letter code for mutant residue')
+    
+    args = parser.parse_args()
+    main(args.aa_from, args.aa_to)
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.