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 about any of the acids.

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()

#Analysis
analysed_seq = ProteinAnalysis(SEQ)
MW=  analysed_seq.molecular_weight()
Gravity = analysed_seq.gravy()
aa_composition = analysed_seq.count_amino_acids()
aa_percentage=analysed_seq.get_amino_acids_percent()
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
    print("n","Gravity:","nn",Gravity)
    #Hydrophobicty Calculation by using kd scale
    print("n","Hydrophobicity:","nn",HP)
    #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:","nn",aa_composition)


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

The features are:

  1. Computed volume
  2. Hydrophobicity
  3. Polarity
  4. Relative surface accessibility (RSA)
  5. Secondary structure (SS)
  6. Type

I have calculated volume, Hydrophobicity, and SS but I don't know how can I merge them in one matrix?

plz help me



Source link