5
$\begingroup$

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?

$\endgroup$
2
  • 3
    $\begingroup$ what do you mean? There is no scale argument to feed protein_scale() only def protein_scale(self, param_dict, window, edge=1.0): github.com/biopython/biopython/blob/master/Bio/SeqUtils/…. I think param_dict is kd github.com/biopython/biopython/blob/master/Bio/SeqUtils/… $\endgroup$ Feb 9, 2018 at 17:10
  • $\begingroup$ @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. $\endgroup$
    – James
    Feb 10, 2018 at 16:19

1 Answer 1

1
$\begingroup$

Use this line of code:

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

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.