def test_generate():
    input = 'LEQN'
    expected = [0, 113, 114, 128, 129, 227, 242, 242, 257, 355, 356, 370, 371, 484]

    actual = generate(input)

    assert (expected == actual)
Ejemplo n.º 2
0
import sys
from theoretical_spectrum.spectrum import generate

filename = sys.argv[1]

with open(filename, 'r') as f:
    peptide = f.readline().strip()
    print(' '.join([str(x) for x in generate(peptide)]))