Commit 7635c7b2 authored by Nicolas  MAILLET's avatar Nicolas MAILLET
Browse files

correct funny typo

parent 2b82ea1b
Pipeline #5682 passed with stages
in 15 minutes and 49 seconds
......@@ -164,7 +164,7 @@ Here are all available options in **RPG**:
**-l, -\\-list**: Display the list of available enzymes.
**-m, -\\-misscleavage**: Percentage of miscleavage, between 0 and 100, by enzyme(s). It should be in the same order as the -\\-enzymes options (*i.e.* -m 15 -m 5 -m 10). It works only for sequential digestion (default: 0). See :ref:`misscleavage` for more information.
**-m, -\\-miscleavage**: Percentage of miscleavage, between 0 and 100, by enzyme(s). It should be in the same order as the -\\-enzymes options (*i.e.* -m 15 -m 5 -m 10). It works only for sequential digestion (default: 0). See :ref:`miscleavage` for more information.
**-n, -\\-noninteractive**: Non-interactive mode. No standard output, only error(s) (-\\-quiet enable, overwrite -v). If output filename already exists, output file will be overwritten. See :ref:`nointer` for more information.
......@@ -235,7 +235,7 @@ Here, we have to understand that 'afterP' cleaves at the same positions as in se
Default mode is 'sequential'. Reminder: you can input miscleavage values only for this mode.
.. _misscleavage:
.. _miscleavage:
Miscleavage
===========
......
......@@ -265,7 +265,7 @@ def main():
"single protein sequence without commentary")
group_launch.add_argument("-l", "--list", action="store_true",
help="Display the list of available enzymes")
parser.add_argument("-m", "--misscleavage", metavar="", default=[],
parser.add_argument("-m", "--miscleavage", metavar="", default=[],
action='append', type=restricted_float,
help="Percentage of miscleavage, between 0 and 100,"
" by enzyme(s). It should be in the same order than "
......@@ -303,7 +303,7 @@ def main():
mode = "sequential"
if args.digest == "c" or args.digest == "concurrent":
mode = "concurrent"
args.misscleavage = [] # No miscleavage on concurrent, infinite time
args.miscleavage = [] # No miscleavage on concurrent, infinite time
# --list option
if args.list:
......@@ -351,14 +351,14 @@ def main():
else:
break
# More miss cleavage than enzyme
if len(args.misscleavage) > len(args.enzymes):
# More mis cleavage than enzyme
if len(args.miscleavage) > len(args.enzymes):
core.handle_errors("Too much miscleavage values. Last values will "
"be ignored.")
args.misscleavage = args.misscleavage[:len(args.enzymes)]
args.miscleavage = args.miscleavage[:len(args.enzymes)]
# Get all enzymes inputed
enzymes_to_use = get_enzymes_to_use(mode, args.enzymes, args.misscleavage)
enzymes_to_use = get_enzymes_to_use(mode, args.enzymes, args.miscleavage)
# Output options
if args.verbose:
......
......@@ -186,7 +186,7 @@ class ResultOneDigestion:
def get_more_info(self):
"""Return informations and statistics about this digestion,
*i.e.* number of (miss)-cleavages and positions, miscleavage
*i.e.* number of (mis)-cleavages and positions, miscleavage
ratio, size of the smallest peptide and first and last peptide.
:return: informations and statistics ready to be printed
......
......@@ -59,7 +59,7 @@ class Enzyme:
# self representation for print
def __repr__(self):
return "Id: %s\nName: %s\nRatio Miss Cleaveage: %.2f%%\nRules: %s\n" %\
return "Id: %s\nName: %s\nRatio Miscleavage: %.2f%%\nRules: %s\n" %\
(self.id_, self.name, self.ratio_miscleavage, self.rules)
# Equality between two Enzymes
......
......@@ -66,12 +66,12 @@ def test_create_enzymes_to_use(capsys):
enzymes = [23, 31, 29]
miscleavage = [1.1, 20]
res = RapidPeptidesGenerator.create_enzymes_to_use(enzymes, miscleavage)
assert res.__repr__() == "[Id: 23\nName: Glu-C\nRatio Miss Cleaveage: 1.1"\
assert res.__repr__() == "[Id: 23\nName: Glu-C\nRatio Miscleavage: 1.1"\
"0%\nRules: [index=0\nletter=D\ncut=True\npos=1\n,"\
" index=0\nletter=E\ncut=True\npos=1\n]\n, Id: 31"\
"\nName: NTCB\nRatio Miss Cleaveage: 20.00%\nRules"\
"\nName: NTCB\nRatio Miscleavage: 20.00%\nRules"\
": [index=0\nletter=C\ncut=True\npos=0\n]\n, Id: "\
"29\nName: Lys-N\nRatio Miss Cleaveage: 0.00%\nRul"\
"29\nName: Lys-N\nRatio Miscleavage: 0.00%\nRul"\
"es: [index=0\nletter=K\ncut=True\npos=0\n]\n]"
enzymes = [23, 31]
miscleavage = [1.1, 20, 40]
......@@ -79,8 +79,8 @@ def test_create_enzymes_to_use(capsys):
_, err = capsys.readouterr()
assert err == "Warning: Too much miscleavage values. Last values will "\
"be ignored.\n"
assert res.__repr__() == "[Id: 23\nName: Glu-C\nRatio Miss Cleaveage: 1.1"\
assert res.__repr__() == "[Id: 23\nName: Glu-C\nRatio Miscleavage: 1.1"\
"0%\nRules: [index=0\nletter=D\ncut=True\npos=1\n,"\
" index=0\nletter=E\ncut=True\npos=1\n]\n, Id: 31"\
"\nName: NTCB\nRatio Miss Cleaveage: 20.00%\nRules"\
"\nName: NTCB\nRatio Miscleavage: 20.00%\nRules"\
": [index=0\nletter=C\ncut=True\npos=0\n]\n]"
......@@ -17,7 +17,7 @@ def test_enzyme(tmpdir):
# Test function '__repr__()'
res = enz0.__repr__()
assert res == "Id: -1\nName: fake_enzyme1\nRatio Miss Cleaveage: 0.00%\nR"\
assert res == "Id: -1\nName: fake_enzyme1\nRatio Miscleavage: 0.00%\nR"\
"ules: [index=0\nletter=D\ncut=True\npos=1\n\tindex=-1\n\tl"\
"etter=S\n\tcut=False\n\tpos=-1\n]\n"
......
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