Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

calculate charge and calculate_iep will be deplicated in the future t…

…o support clarity
  • Loading branch information...
commit 26779add04bd25c0da1225d00d92d45dd78ec7c2 1 parent 97c5a43
@georgeG authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/isoelectric_point/aa.rb
View
6 lib/isoelectric_point/aa.rb
@@ -12,6 +12,7 @@ def initialize(sequence)
# pka_name_or_set: the name of a PKA set or a custom PKA set
# places: specify the number of decimal places the value should be rounded to.
# loop_limit: how many iterations should be made to find the point. You should not need to tweak this.
+ #TODO to be renamed to isoelectric_point to preserve clarity
def calculate_iep(pka_name_or_set = 'dtaselect', places = 2, loop_limit = 100)
loops = 0
ph = 7.5
@@ -32,6 +33,7 @@ def calculate_iep(pka_name_or_set = 'dtaselect', places = 2, loop_limit = 100)
# Calculate the charge of the sequence at a given ph
# As a second argument you can pass the name of the PKA set or a custom PKA set
+ #To be renamed to charge at to preserve clarity
def calculate_charge_at(ph, pka_name_or_set = 'dtaselect')
['K', 'R', 'H'].inject(partial_charge(select_pka(pka_name_or_set)['N_TERMINUS'], ph)) do |memo, item|
memo += partial_charge(select_pka(pka_name_or_set)[item], ph) * charged_residue_frequencies[item]
@@ -81,4 +83,6 @@ def select_pka(pka_name_or_set = 'dtaselect')
end #select_pka
end #class AA
end #class Sequence
-end #module Bio
+end #module Bio
+#include a new class Bio::AA::Index for Pkas? suggestes by tokiashiki katayama
+
Please sign in to comment.
Something went wrong with that request. Please try again.