Commit d8488b53 authored by Nicolas  MAILLET's avatar Nicolas MAILLET
Browse files

change miss-cleavage to miscleavage

parent b73ad5cb
...@@ -9,14 +9,14 @@ def test_restricted_float(capsys): ...@@ -9,14 +9,14 @@ def test_restricted_float(capsys):
with pytest.raises(SystemExit) as pytest_wrapped_e: with pytest.raises(SystemExit) as pytest_wrapped_e:
RapidPeptidesGenerator.restricted_float(-10) RapidPeptidesGenerator.restricted_float(-10)
_, err = capsys.readouterr() _, err = capsys.readouterr()
assert err == "Value Error: miss-cleavage value should be between 0 and "\ assert err == "Value Error: miscleavage value should be between 0 and "\
"100.\n" "100.\n"
assert pytest_wrapped_e.type == SystemExit assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 1 assert pytest_wrapped_e.value.code == 1
with pytest.raises(SystemExit) as pytest_wrapped_e: with pytest.raises(SystemExit) as pytest_wrapped_e:
RapidPeptidesGenerator.restricted_float("z") RapidPeptidesGenerator.restricted_float("z")
_, err = capsys.readouterr() _, err = capsys.readouterr()
assert err == "Type Error: miss-cleavage value should be a float between"\ assert err == "Type Error: miscleavage value should be a float between"\
" 0 and 100.\n" " 0 and 100.\n"
assert pytest_wrapped_e.type == SystemExit assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 1 assert pytest_wrapped_e.value.code == 1
...@@ -73,7 +73,7 @@ def test_create_enzymes_to_use(capsys): ...@@ -73,7 +73,7 @@ def test_create_enzymes_to_use(capsys):
miss_cleavage = [1.1, 20, 40] miss_cleavage = [1.1, 20, 40]
res = RapidPeptidesGenerator.create_enzymes_to_use(enzymes, miss_cleavage) res = RapidPeptidesGenerator.create_enzymes_to_use(enzymes, miss_cleavage)
_, err = capsys.readouterr() _, err = capsys.readouterr()
assert err == "Warning: Too much miss-cleavage values. Last values will "\ assert err == "Warning: Too much miscleavage values. Last values will "\
"be ignored.\n" "be ignored.\n"
assert res.__repr__() == "[Id: 19\nName: Glu-C\nRatio Miss Cleaveage: 1.1"\ assert res.__repr__() == "[Id: 19\nName: Glu-C\nRatio Miss Cleaveage: 1.1"\
"0%\nRules: [index=0\nletter=D\ncut=True\npos=1\n,"\ "0%\nRules: [index=0\nletter=D\ncut=True\npos=1\n,"\
......
...@@ -166,7 +166,7 @@ def test_output_results(capsys, tmpdir): ...@@ -166,7 +166,7 @@ def test_output_results(capsys, tmpdir):
"8,5.54,F\n" "8,5.54,F\n"
# Verbose > 2 # Verbose > 2
assert out == "\nNumber of cleavage: 4\nCleavage position: 4, 7, 12, 15\n"\ assert out == "\nNumber of cleavage: 4\nCleavage position: 4, 7, 12, 15\n"\
"Number of miss-cleavage: 0\nMiss-cleavage position: \nMiss"\ "Number of miscleavage: 0\nmiscleavage position: \nMiss"\
"-cleavage ratio: 0.00%\nSmallest peptide size: 1\nN termin"\ "-cleavage ratio: 0.00%\nSmallest peptide size: 1\nN termin"\
"al peptide: WQSD\nC terminal peptide: F\n" + \ "al peptide: WQSD\nC terminal peptide: F\n" + \
output_file.read() output_file.read()
......
...@@ -21,8 +21,8 @@ def test_resultonedigestion(): ...@@ -21,8 +21,8 @@ def test_resultonedigestion():
# Test function '__repr__()' # Test function '__repr__()'
res_dig0 = digest.ResultOneDigestion(enz_name, peptides, nb_cleav, pos_mc) res_dig0 = digest.ResultOneDigestion(enz_name, peptides, nb_cleav, pos_mc)
assert res_dig0.__repr__() == "Number of cleavage: 1\nNumber of miss-clea"\ assert res_dig0.__repr__() == "Number of cleavage: 1\nNumber of miss-clea"\
"vage: 2\nPositions of miss-cleavage: [2, 3"\ "vage: 2\nPositions of miscleavage: [2, 3"\
"]\nRatio of miss-cleavage: 66.666666666666"\ "]\nRatio of miscleavage: 66.666666666666"\
"66\nPeptides: [Original header: Test\nNo. "\ "66\nPeptides: [Original header: Test\nNo. "\
"peptide: 0\nEnzyme: fake_enzyme\nCleav. po"\ "peptide: 0\nEnzyme: fake_enzyme\nCleav. po"\
"s: 3\nPep. size: 8\nPep. mass: 1012.98488"\ "s: 3\nPep. size: 8\nPep. mass: 1012.98488"\
...@@ -114,8 +114,8 @@ def test_resultonedigestion(): ...@@ -114,8 +114,8 @@ def test_resultonedigestion():
# Test function 'get_more_info()' # Test function 'get_more_info()'
assert res_dig5.get_more_info() == "\nNumber of cleavage: 5\nCleavage pos"\ assert res_dig5.get_more_info() == "\nNumber of cleavage: 5\nCleavage pos"\
"ition: 3, 4, 3\nNumber of miss-cleava"\ "ition: 3, 4, 3\nNumber of miss-cleava"\
"ge: 6\nMiss-cleavage position: 2, 3, "\ "ge: 6\nmiscleavage position: 2, 3, "\
"4, 6, 2, 3\nMiss-cleavage ratio: "\ "4, 6, 2, 3\nmiscleavage ratio: "\
"54.55%\nSmallest peptide size: 8\nN t"\ "54.55%\nSmallest peptide size: 8\nN t"\
"erminal peptide: QWSDESDF\nC terminal"\ "erminal peptide: QWSDESDF\nC terminal"\
" peptide: QWSDESDF" " peptide: QWSDESDF"
...@@ -345,8 +345,8 @@ def test_digest_from_input(capsys, tmpdir): ...@@ -345,8 +345,8 @@ def test_digest_from_input(capsys, tmpdir):
seq = "WQSDESDFZQSDESDF" seq = "WQSDESDFZQSDESDF"
res = digest.digest_from_input(seq, enzymes, mode) res = digest.digest_from_input(seq, enzymes, mode)
assert res[0][0].__repr__() == "Number of cleavage: 4\nNumber of miss-cle"\ assert res[0][0].__repr__() == "Number of cleavage: 4\nNumber of miss-cle"\
"avage: 0\nPositions of miss-cleavage: []"\ "avage: 0\nPositions of miscleavage: []"\
"\nRatio of miss-cleavage: 0.0\nPeptides: "\ "\nRatio of miscleavage: 0.0\nPeptides: "\
"[Original header: Input\nNo. peptide: 0"\ "[Original header: Input\nNo. peptide: 0"\
"\nEnzyme: fake_enzyme1\nCleav. pos: 4\nPe"\ "\nEnzyme: fake_enzyme1\nCleav. pos: 4\nPe"\
"p. size: 4\nPep. mass: 534.52598\nPep. pI"\ "p. size: 4\nPep. mass: 534.52598\nPep. pI"\
...@@ -371,8 +371,8 @@ def test_digest_from_input(capsys, tmpdir): ...@@ -371,8 +371,8 @@ def test_digest_from_input(capsys, tmpdir):
fasta_file.write(">Fake1\nWQSDESDFZQS\nDESDF\n>Fake2\nNPHARDORCOMPLET") fasta_file.write(">Fake1\nWQSDESDFZQS\nDESDF\n>Fake2\nNPHARDORCOMPLET")
res = digest.digest_from_input(str(fasta_file), enzymes, mode) res = digest.digest_from_input(str(fasta_file), enzymes, mode)
assert res[0][0].__repr__() == "Number of cleavage: 4\nNumber of miss-cle"\ assert res[0][0].__repr__() == "Number of cleavage: 4\nNumber of miss-cle"\
"avage: 0\nPositions of miss-cleavage: []"\ "avage: 0\nPositions of miscleavage: []"\
"\nRatio of miss-cleavage: 0.0\nPeptides: "\ "\nRatio of miscleavage: 0.0\nPeptides: "\
"[Original header: Fake1\nNo. peptide: 0\n"\ "[Original header: Fake1\nNo. peptide: 0\n"\
"Enzyme: fake_enzyme1\nCleav. pos: 4\nPep."\ "Enzyme: fake_enzyme1\nCleav. pos: 4\nPep."\
" size: 4\nPep. mass: 534.52598\nPep. pI: "\ " size: 4\nPep. mass: 534.52598\nPep. pI: "\
...@@ -392,8 +392,8 @@ def test_digest_from_input(capsys, tmpdir): ...@@ -392,8 +392,8 @@ def test_digest_from_input(capsys, tmpdir):
" 16\nPep. size: 1\nPep. mass: 165.19188\n"\ " 16\nPep. size: 1\nPep. mass: 165.19188\n"\
"Pep. pI: 5.54\nSequence: F\n]\n" "Pep. pI: 5.54\nSequence: F\n]\n"
assert res[1][0].__repr__() == "Number of cleavage: 0\nNumber of miss-cle"\ assert res[1][0].__repr__() == "Number of cleavage: 0\nNumber of miss-cle"\
"avage: 0\nPositions of miss-cleavage: []"\ "avage: 0\nPositions of miscleavage: []"\
"\nRatio of miss-cleavage: 0\nPeptides: [O"\ "\nRatio of miscleavage: 0\nPeptides: [O"\
"riginal header: Fake2\nNo. peptide: 0\nEn"\ "riginal header: Fake2\nNo. peptide: 0\nEn"\
"zyme: fake_enzyme1\nCleav. pos: 0\nPep. s"\ "zyme: fake_enzyme1\nCleav. pos: 0\nPep. s"\
"ize: 15\nPep. mass: 2014.35098\nPep. pI: "\ "ize: 15\nPep. mass: 2014.35098\nPep. pI: "\
...@@ -405,8 +405,8 @@ def test_digest_from_input(capsys, tmpdir): ...@@ -405,8 +405,8 @@ def test_digest_from_input(capsys, tmpdir):
"ke2\nNPHARDORCOMPLET\n+Fake2\nnNPHARDORCOMPLET\n") "ke2\nNPHARDORCOMPLET\n+Fake2\nnNPHARDORCOMPLET\n")
res = digest.digest_from_input(str(fastq_file), enzymes, mode) res = digest.digest_from_input(str(fastq_file), enzymes, mode)
assert res[0][0].__repr__() == "Number of cleavage: 4\nNumber of miss-cle"\ assert res[0][0].__repr__() == "Number of cleavage: 4\nNumber of miss-cle"\
"avage: 0\nPositions of miss-cleavage: []"\ "avage: 0\nPositions of miscleavage: []"\
"\nRatio of miss-cleavage: 0.0\nPeptides: "\ "\nRatio of miscleavage: 0.0\nPeptides: "\
"[Original header: Fake1\nNo. peptide: 0\n"\ "[Original header: Fake1\nNo. peptide: 0\n"\
"Enzyme: fake_enzyme1\nCleav. pos: 4\nPep."\ "Enzyme: fake_enzyme1\nCleav. pos: 4\nPep."\
" size: 4\nPep. mass: 534.52598\nPep. pI: "\ " size: 4\nPep. mass: 534.52598\nPep. pI: "\
...@@ -426,8 +426,8 @@ def test_digest_from_input(capsys, tmpdir): ...@@ -426,8 +426,8 @@ def test_digest_from_input(capsys, tmpdir):
" 16\nPep. size: 1\nPep. mass: 165.19188\n"\ " 16\nPep. size: 1\nPep. mass: 165.19188\n"\
"Pep. pI: 5.54\nSequence: F\n]\n" "Pep. pI: 5.54\nSequence: F\n]\n"
assert res[1][0].__repr__() == "Number of cleavage: 0\nNumber of miss-cle"\ assert res[1][0].__repr__() == "Number of cleavage: 0\nNumber of miss-cle"\
"avage: 0\nPositions of miss-cleavage: []"\ "avage: 0\nPositions of miscleavage: []"\
"\nRatio of miss-cleavage: 0\nPeptides: [O"\ "\nRatio of miscleavage: 0\nPeptides: [O"\
"riginal header: Fake2\nNo. peptide: 0\nEn"\ "riginal header: Fake2\nNo. peptide: 0\nEn"\
"zyme: fake_enzyme1\nCleav. pos: 0\nPep. s"\ "zyme: fake_enzyme1\nCleav. pos: 0\nPep. s"\
"ize: 15\nPep. mass: 2014.35098\nPep. pI: "\ "ize: 15\nPep. mass: 2014.35098\nPep. pI: "\
......
Supports Markdown
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