I want to make a python script that can get as input sequence of N amino acids, and the output is a matrix of Nx6 containing 6 features. The features are:

  • Computed volume
  • Hydrophobicity
  • Surface charge
  • Secondary structure (SS)
  • Go, InterPro and Pfam type

I have developed this script :

#Importing Libraries
import numpy as np
import pandas as pd
from Bio.SeqUtils.ProtParam import ProteinAnalysis
from Bio.SeqUtils.ProtParam import ProtParamData
from quantiprot.metrics.aaindex import get_aa2volume, get_aa2hydropathy
from quantiprot.metrics.basic import average

#Input amino acid
 my_seq = input("Enter Your Sequence : ")
 SEQ = my_seq.upper()

analysed_seq = ProteinAnalysis(SEQ)
MW=  analysed_seq.molecular_weight()
Gravity = analysed_seq.gravy()
aa_composition = analysed_seq.count_amino_acids()
HP = analysed_seq.protein_scale(window=7, param_dict=ProtParamData.kd)
Sec_Str = analysed_seq.secondary_structure_fraction()

 #Amino Acid Compsoition Calculation
  print("\n" ,"AA count:",aa_composition,"\n")

  #Molecular Weight Calculation
   print("Molecular Weight : ",MW)

   #Gravity Calculation
    #Hydrophobicty Calculation by using kd scale
    #kd → Kyte & Doolittle Index of Hydrophobicity
   #Flex → Normalized average flexibility parameters (B-values)
   #hw → Hopp & Wood Index of Hydrophilicity
   #em → Emini Surface fractional probability

  #Amino Acid Percent Calculation

 print("\n","Percentage of Amino Acids in Protein:","\n\n",aa_composition)

 #Volume Calculation by using quantiprot library
 vol =  get_aa2volume(analysed_seq)
print("\n","Volume of amino acids in protein:","\n\n",str(vol))

I have calculated volume, Hydrophobicity, and SS but I don't know how can I find the

  • Go, InterPro and Pfam type
  • polarity, i.e. surface charge
  • $\begingroup$ Type and polarity are static, right? So just import from some db. Surface accessibility changes based on folding doesn't it? So unless U do something really fancy with alphafold that might be hard... $\endgroup$ Jul 19, 2021 at 1:27
  • $\begingroup$ RSA can be computed with NACCESS which I think also has a BioPython interface $\endgroup$ Jul 19, 2021 at 4:09
  • 1
    $\begingroup$ RSA requires a structure. Predicted SS does not, but assigned SS does and is is folds better (bad pun intended). You have also Normalized average flexibility parameters (B-values), which requires both a structure and metadata on that structure as the B-factors depend on the resolution (unless you have a protocol for it, it is not a rabbit hole worth going down, not due to the maths, but due the isotropic and anisotropic business). $\endgroup$ Jul 19, 2021 at 9:03
  • 1
    $\begingroup$ If by "Polarity", you mean global charge, then that's isoelectric point (pI), which is actually useful for the protein engeering folk (pI close to pH is less soluble). If you mean some sort of per-residue value based on charged and polar residues in a window, then that would be something nearly similar to a Kyte & Doolittle Index. The per-voxel surface charge on a protein, requires a structure (and the Advance Poison-Boltzmann Solver). $\endgroup$ Jul 19, 2021 at 13:37
  • 1
    $\begingroup$ Type is vague word. Take GNB1, the G-protein subunit beta-1. It has a GO term GO:0003924 (GTPase activity), an InterPro IPR001632 (G-Protein B), and PFam 7x PF00400 (WD40 repeats). So the word describing what type of protein a protein is depends on the classifier in question. $\endgroup$ Jul 20, 2021 at 6:47


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.