Commit 18551f60 authored by Nicolas  MAILLET's avatar Nicolas MAILLET
Browse files

Add IPC2 to RPG and make it the default one

parent dce7a910
Pipeline #57012 passed with stages
in 50 seconds
......@@ -272,9 +272,9 @@ def main():
"error(s) (--quiet enable, overwrite -v). If output "
"filename already exists, output file will be "
"overwritten.")
parser.add_argument("-p", "--pka", metavar="", choices=['ipc', 'stryer'],
default="ipc", help="Define pKa values. Either 'ipc' "
"or 'stryer' (default: ipc)")
parser.add_argument("-p", "--pka", metavar="", choices=['ipc2', 'stryer', 'ipc'],
default="ipc2", help="Define pKa values. Either 'ipc2' "
"'stryer' or 'ipc' (deprecated) (default: ipc2)")
group_output = parser.add_mutually_exclusive_group()
group_output.add_argument("-o", "--outputfile", type=str, metavar="",
default="", help="Optional result file "
......@@ -306,9 +306,11 @@ def main():
args.miscleavage = [] # No miscleavage on concurrent, infinite time
# --pka option
aa_pka = core.AA_PKA_IPC
aa_pka = core.AA_PKA_IPC_2
if args.pka == "stryer":
aa_pka = core.AA_PKA_S
elif args.pka == "ipc":
aa_pka = core.AA_PKA_IPC
# --list option
if args.list:
......
......@@ -86,6 +86,17 @@ AA_PKA_IPC = {"Nterm" : 9.564,
"Y" : 10.071,
"Cterm" : 2.383}
"""pKa of important amino acid to compute pI (from IPC_peptide. See http://isoelectric.org/theory.html for details)."""
# IPC_peptide2
AA_PKA_IPC_2 = {"Nterm" : 7.947,
"C" : 9.454,
"D" : 3.969,
"E" : 4.507,
"H" : 6.439,
"K" : 8.165,
"R" : 11.493,
"Y" : 9.153,
"Cterm" : 2.977}
"""pKa of important amino acid to compute pI (from IPC_peptide2. See http://www.ipc2-isoelectric-point.org/ for details)."""
def handle_errors(message="", err=1, error_type=""):
"""Custom handling of errors and warnings.
......
......@@ -68,9 +68,11 @@ class Peptide:
# self representation for print
def __repr__(self):
pka = "IPC"
pka = "IPC2"
if self.aa_pka == core.AA_PKA_S:
pka = "Stryer"
elif self.aa_pka == core.AA_PKA_IPC:
pka = "IPC"
return "Original header: " + self.header + "\nNo. peptide: " + \
str(self.nb_peptide) + "\nEnzyme: " + self.enzyme_name + \
"\nCleav. pos: " + str(self.position) + "\nPep. size: " + \
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment