5

I am trying to analyse the hydrophobicity of a sequence using BioPython's "SeqUtil".

analysed_seq = ProteinAnalysis("AKVLGSLEALEPVHYEEKNWCE")
analysed_seq.protein_scale(Scale, WindowSize, Edge)

Known parameters

  • WindowSize refers to the total number of amino acids to be considered either side of the residue (an int variable).
  • Edge refers to the weighting of the scale further from the centre of the window (0-1). `

Unknown parameter

  • Scalerefers to which scale being used. I am interested in how to give theScale` variable a valid variable.

The Biopython docs simply point out that there are many scales to choose from and the source code doesn't seem to give any clues about scale options.

Where can I find a list of the scale are available and how to call them?

M__
  • 12,263
  • 5
  • 28
  • 47
James
  • 409
  • 2
  • 13
  • 3
    what do you mean? There is no scale argument to feed protein_scale() only def protein_scale(self, param_dict, window, edge=1.0): https://github.com/biopython/biopython/blob/master/Bio/SeqUtils/ProtParam.py#L211. I think param_dict is kd https://github.com/biopython/biopython/blob/master/Bio/SeqUtils/ProtParamData.py#L6 – Chris_Rands Feb 09 '18 at 17:10
  • @Chris_Rands You've answered the question, thanks. I was looking for any predefined param_dict arguments and the GitHub source code spells them out clearly. It also looks like you can feed a scale straight in without having to edit ProtParamsData which satisfies me more. – James Feb 10 '18 at 16:19

1 Answers1

1

Use this line of code:

print(analysed_seq.protein_scale(analysed_seq.get_amino_acids_percent(), window=9, edge=0.4))
  • 1
    Welcome to the forum. Can you add some context as to what this line is doing and why it answers the question? – Bioathlete Jan 06 '20 at 14:49