v4.00.1
Fixes of defects that OpenMS reported (issue #406). Results change only with -F 0 together with -N or --reset-algorithm.
Fixes:
* -F 0 means --testFDR, as the help says, but only the cross-validation resolved it: the second pass of -N calculated the q values and normalised the scores of all PSMs at an FDR of 0, and RESET chose its initial direction and selected its peptides at 0. Affects only -F 0 with -N or --reset-algorithm. With -N the scores were shifted, but the q values were right, and so were the PEPs except those of --irls-pep, which differed by up to 0.15 on percolatorTab; RESET could end with "cannot find an initial direction". -F 0 -t X now writes the same files as -F X -t X, which tests/ci/option_matrix.sh checks.
* Scores.cpp called omp_in_parallel() in the clause of an OpenMP directive. Clang with -fopenmp-simd parses such clauses but does not define _OPENMP, so omp.h was not included and the build failed. Affects builds with Clang and -fopenmp-simd only, which CMake does not set but packagers and programs that embed Percolator may. The clause calls the new inParallel(), and the CI job warnings compiles the sources with clang++ -fopenmp-simd.
* An exception in one of five OpenMP loops (the training of the Cpos/Cneg pairs, the three loops of the grid evaluation and the choice of the initial direction), in practice std::bad_alloc, ended the process (std::terminate). Affects programs that use Percolator as a library, such as Crux and OpenMS, which could not catch it; the percolator executable aborted instead of printing the error. The loops now pass the first exception on to the calling thread after the loop. Without an exception nothing changes.
* Caller::run set the number of OpenMP threads of the calling thread from --num-threads and left it so. Affects programs that use Percolator as a library, such as Crux and OpenMS: a later run with a larger --num-threads, and the program's own parallel regions, had the smaller number. run now sets it back on return, also after an error or an exception. The percolator executable is not affected.
* Headers: NoNormalizer.h, StdvNormalizer.h and UniNormalizer.h include Normalizer.h and <vector>; PAVARegressor.h and CompositionSorter.h have include guards; DataSet.h includes TabReader.h, PSMDescription.h <algorithm> and ScoreHolder.h <utility>, and the last two no longer rely on a "using namespace std" of another header. Nothing is removed, and code that compiled before is not affected. tests/ci/check_headers.sh, run by the CI job warnings, compiles every header of src/ on its own and twice in one unit.
Interface changes (Crux and other library users):
* New header OpenMPHelpers.h (no source file): inParallel(), which is omp_in_parallel() under OpenMP and false otherwise, and the class ParallelErrors, which passes an exception of an iteration of a parallel loop on to the calling thread.

v4.00
Changes of results:
* Each Cpos/Cneg solve starts from its weights of the previous iteration, and the least squares steps of L2_SVM_MFN are solved exactly (Cholesky on the normal equations) instead of by CGLS.
* The Cpos/Cneg pair of each fold is fixed after three iterations, and training stops when the estimated positives grow by less than 0.1% over two iterations. --maxiter remains the upper limit.
* The I-spline PEP fit is solved exactly by an active-set method. The trust-region solver stopped at its iteration limit. PEPs change by up to about 0.06; calibration on synthetic data is unchanged.
* Results no longer depend on the number of threads: all sort comparators are total orders, with the input line as the last tie-break. Only ties are affected.
* New option --classic-training restores the previous training: fixed number of iterations, full grid in every iteration, CGLS solves from zero weights.
* New option --num-folds N sets the number of cross-validation folds (default 3). With N = 1 the SVM is trained and evaluated on the same PSMs, for inputs too small to split; its q values and PEPs are optimistic. It is never switched on automatically; when no test fold reaches the test FDR, a hint suggests it or a larger --testFDR.
* New experimental option --merge-normalization test|train|train-decoys|none chooses how the scores of the cross-validation bins are put on a common scale before the merge: by the score at q = --trainFDR and the median decoy of each test bin (test, the previous behaviour and the default with up to three folds), by the same two scores of the fold's training set (train), by the mean and standard deviation of the training-set decoys (train-decoys), or not at all (none). The training-set anchors exist for small test bins, and only test checks each bin's separation, so runs with many folds no longer stop at tiny test bins. With more than three folds (--num-folds) the default is train-decoys, since the anchors of test are noisy in the smaller test bins: on synthetic sets of 10,000 and 20,000 PSMs, test at 10 folds accepted 312 and 186 fewer correct targets at q < 0.01 than 3 folds, with a mean false discovery proportion at q < 0.01 of 1.35% on the 10,000-PSM sets, and train-decoys at 10 folds 33 and 36 more, at 0.95% and 1.03%. With -N only test rescales the scores of all PSMs once more. --static, which rescales nothing, ignores the scheme, also with -N and where the second chance keeps the given weights: the bins are merged, and -N scores all PSMs, as with test. With one fold or RESET the order of the PSMs is the same with every scheme. With one fold the training set holds the test bin's PSMs, so train takes the anchors of test and, except with -N, gives its results; train-decoys and none change the scale of the scores and, for separate searches, can change the pi0 estimate, and with it the q values and PEPs, too, as only test and train estimate the pi0 of the bin's PSMs before the merge, which draws random numbers. RESET estimates no pi0, so there only the scale changes.
* The direction check gets a second chance, and a new experimental option --direction-check bins|second-chance|pooled chooses the check. bins, the previous check, counts the targets with q < --testFDR within each test bin, which needs about 1/testFDR targets above the bin's best decoy, so small inputs (about 1,000 to 5,000 PSMs) and many folds fall back to the default direction even where the trained SVMs separate well. bins stays the default. second-chance, an option, keeps that check and its merge wherever it passes; only where it would fall back, each test bin is scored with its own fold's SVM, the bins are rescaled by their training-set decoys and merged, and the trained SVMs are kept if this out-of-fold list holds targets with q < --testFDR and no fewer than the fallback would report (the vectors a fallback gives: each fold's default vector, or under --init-weights the given vector or the fold's default direction, whichever gives more targets on the fold's training set, merged with the run's scheme, test up to three folds, and counted at --testFDR), and the sign check of --default-direction passes. Such a run is merged with train-decoys, or with the scheme given by --merge-normalization, whose list then has to be usable as well; otherwise the run falls back as before, also where a list cannot be used: a bin that cannot be rescaled, or targets and decoys that separate so well in the merged list, in its best PSM per spectrum (-Y), in its best PSM per peptide (the peptide level) or in a test bin whose pi0 the merge estimates (test, --static) that the run would end with "too good separation" (under --no-terminate, which would not end the run, such a list is treated as unusable as well). One line on stderr gives the two counts and the decision; under --override it changes nothing. pooled decides on the merged list alone, with the pi0 of the final list, falls back where that list cannot be used, and merges with train-decoys unless a scheme is given (test is an error). The merged counts leave the random number generator untouched, so they do not move the pi0 estimates of separate searches. Under --init-weights a reset gives each fold the given weights or its default direction (see the fix of --init-weights below), and the second chance compares the trained SVMs with these vectors, merged with the run's scheme. On synthetic sets of 1,000 to 10,000 PSMs (10 to 50 features, exact target-decoy calibration, 3 and 10 folds; 400 sets with the -w of an earlier run on the same PSMs, 300 with the -w of an independent 20,000-PSM set of the same kind, 200 with wrong signs and 174 with partly wrong weights, made from either), bins failed in 96-100% of the runs with weights from the same PSMs, 83-90% with independent weights and 43-79% with wrong or partly wrong ones. The second chance kept the trained SVMs in 9-13% of the failed runs where the earlier run's -w held trained weights (57-64% where it held a default vector), in 23-24% with independent weights and in 59-80% with wrong or partly wrong weights. The kept runs had a mean false discovery proportion at q < 0.01, by search and folds, of 1.0-1.4% with weights from the same PSMs, 0.9-1.5% with independent weights and 0.8-1.0% with wrong or partly wrong ones, against 0.9-1.1% for runs without --init-weights whose check passes; by size the worst was 2.3% (independent weights, 1,000 to 2,000 PSMs, concatenated searches, 10 folds; 9 runs). They gained 4, 5-8 and 32-152 correct targets per set at q < 0.01 over bins with trained weights from the same PSMs, independent weights and wrong or partly wrong ones, and 79-97 where the earlier run's -w held a default vector. For the fallback itself see the fix of --init-weights below. With one fold, as with RESET, all three checks are the same; with -N the check uses the PSMs trained on, and with --static the merged raw scores.
* qvality estimates PEPs by I-spline regression of the target q values, as Percolator does; --pava-pep, --tdc-pep and --rank-pep select the other monotone regressions, and --irls-pep the previous P-IRLS method.
* New option --tdc-pep (Percolator and qvality): PEPs from a monotone fit of the decoy rate p on the score, PEP = p/(1-p), scaled by pi0 and the target/decoy ratio for separate searches. The default remains the regression of the target q values.
* Nested cross-validation (--nested-xval-bins > 1, and RESET) retrains each fold from its weights of the previous iteration instead of from zero, as the grid solves do. The solves converge to the same solution up to the solver's tolerance: byte-identical outputs on 500k-PSM sets and on 1M PSMs with RESET, PEPs within 1e-8 on 1M_marked with --nested-xval-bins 3.
* -z elastase and -z glu-c check the PSM peptides with the rules that digest the FASTA database, which are also Crux's: elastase cuts after A, L, I or V, Glu-C after D or E, neither before P (before: elastase after L, V, A or G, Glu-C after E only). With -f on 60,000 human PSMs, 3 (elastase) and 11 (Glu-C) protein identifiers change.
* Picked protein: a decoy protein wins an exact score tie with its target, as at PSM level; before, the target always won. Only exact ties change.
* RESET (--reset-algorithm, with and without --composition-match) lists the best PSM of each peptide in the order in which the peptides first appear in the PSM list, which is sorted by the score of the initial direction, and processes the compositions in the order in which they first appear in that list, instead of in the iteration order of a hash map, which depends on the standard library: the same input and seed gave other pseudo-targets, weights and q values with libc++ or MSVC than with libstdc++ (percolatorTab at q < 0.01: 921, 913 and 865 target peptides with three hash layouts, now 934 with each). Every RESET run changes once, within the spread between seeds (percolatorTab, seeds 1 to 10: 804 to 924 peptides before, 835 to 959 now; false discovery proportion at q < 0.01 on three marked 100k-PSM sets 0.0030 before and 0.0038 now).
* --tdc-pep --pava-pep (Percolator and qvality): PSMs with the same score get the same PEP. Tied observations are pooled before the PAVA pass; before, a run of equal scores was split according to the order of the input lines (on 100k-PSM sets with features rounded to 0.5, about 50 tie groups with PEPs up to 0.12 apart). The sum of the PEPs is unchanged, and so are results without tied scores.
Fixes:
* --override: when the direction check failed, all test bins were scored with the first fold's SVM, which was trained on the other bins. Each bin is now scored with its own fold's SVM. Not with -N, which after a failed check scores all PSMs with the averaged weights, also with --override: with --merge-normalization test, the default up to three folds, the bins are still scored with the first fold's SVM there, as after a reset (see the next entry), and these runs are unchanged.
* After a direction reset, all test bins were scored with the default vector chosen on the first fold's training set, which holds the other bins, and the default vectors kept their folds' trained bias. Each bin is now scored with the default vector chosen on its own fold's training set, with bias 0, and the weights written with -w describe the scores of every fold, except with -N under --merge-normalization test, the default up to three folds (see below). With --init-weights a reset gives each fold the given weights or its default vector instead, whichever separates more targets of its training set (see below). Only runs that reset change, and only where the folds choose different features or signs; otherwise only the bias of the second and later folds in the -w file changes. With -N, which after a reset scores all PSMs with the averaged weights of the folds, rescaled by the merge with the anchors of each bin, the bins are still scored with the first fold's vector under test, as after a failed check with --override; the -w file then gives each fold's vector rescaled by the anchors of its bin. A bin with no target at q < --trainFDR is anchored at its best score, so with its own fold's vector the real score, with its long tail, got a smaller factor than a noise feature that another fold chose, and the noise feature dominated the average (300k-PSM Gumbel-null set, -N 60000 -S 2: 13,243 instead of 26,839 PSMs at q < 0.05, 12,594 instead of 25,475 of them correct). These -N runs change only in the bias in the -w file.
* The cross-validation split filled the folds with whole spectra but counted their capacity in PSMs, so with uneven spectra or many folds (--num-folds) a fold could stay empty and the run stopped, although there were more spectra than folds. Every fold now gets a spectrum; splits that left no fold empty are unchanged. Known limitation: the split counts a new spectrum where the scan number changes between neighbouring PSMs, so neighbouring spectra of different files with the same scan number count as one, and an input with hardly more spectra than folds can still leave a fold empty.
* --train-best-positive corrupted the training folds with nested cross-validation, which RESET also uses.
* RESET: the pseudo-target labels differed between runs, and a single fold led to a division by zero in the stopping rule.
* --quick-validation with --nested-xval-bins > 1 retrained with a Cpos/Cneg pair that had not been evaluated.
* -N read PSMs with labels other than 1 and -1 as decoys. They are ignored, as without -N.
* -Q/--pepxml-output has written nothing since the XML output was removed; it now prints a warning.
* A non-finite experimental mass (nan, inf) is rejected with an error that names the PSM; it broke the ordering of PSMs.
* A failed load of several input files (unreadable input, a header with fewer columns than the PSMs) left the temporary concatenated file behind.
* With a single cross-validation bin (--num-folds 1, RESET), scores that cannot be rescaled are kept as they are instead of ending the run, so inputs of one to three spectra complete.
* Multiple input files: infinite loop when a column was missing from the widest header; the temporary directory is now removed.
* Out-of-bounds read in ProteinProbEstimator::lastProteinInGroup; uninitialised Peptide reference count (leak in protein digestion); leaked PSMs in the second pass of -N; 32-bit overflow of SVM buffer sizes above about 70 million active rows.
* A plain cmake configure built without optimisation. Release is now the default.
* -N scored the PSMs of the training subset with the averaged weights of folds that had trained on them, so at the top of the list the decoys no longer modelled the incorrect targets. These PSMs now keep the score of the fold in which they were test PSMs, mapped to the mean and standard deviation of the other PSMs' scores. Where the direction check fails, after a reset and with --override, all PSMs are scored with the averaged weights, as before. Weak 500k-PSM set (--shift-scale 0.45), pooled observed FDR at q < 0.01: -N 300k and 400k 0.0123 -> 0.0109 (full cross-validation 0.0107), -N 100k 0.0125 -> 0.0111.
* With --init-weights, a failed direction check fell back to the default direction (the best single feature) instead of the given weights. Each fold now falls back to the given weights or to the default direction chosen on its training set, whichever gives more targets with q < --trainFDR (or --train-fdr-initial) on that training set, counted as the default direction is chosen, the given weights on ties; one line on stderr names the choice and both counts of each fold. --static keeps the given weights. The choice draws no random numbers, so where the given weights win in every fold the output is that of restoring them. On a 500k-PSM set with LDA weights, which win in every fold, 0 -> 768 PSMs at q < 0.01 (observed FDR 0.0117). On the synthetic sets of the second chance above, the given weights won in every fold of every fallback with the trained -w of an earlier run on the same PSMs (2,831 folds) and in 99% of the folds with independent weights. Weights with wrong signs (the sign of the largest or of a third of the weights flipped) gave way to the default direction in 69% and 65% of the folds (3 and 10 folds), partly wrong weights (the larger half set to 0, or noise of the same norm added) in 64% and 61%. Their runs that fell back reported nothing at q < 0.05 in 33% and 20% of the cases, against 59% and 52% when every fold restored the given weights and 49% (3 folds) when every fold took its default direction, with 1.2 to 1.8 times as many correct targets at q < 0.01 as with the restored weights, at a mean false discovery proportion of 0.2-0.5%. Weights trained on the same PSMs have seen every test bin, so a fallback to them is optimistic with every check, the more so the smaller the input. On 2,140 further sets of the same kind, of 1,000 to 10,000 PSMs and half of them concatenated, with the -w of an earlier run on the same set, which kept trained weights in 1,152 sets of 2,000 PSMs or more and in none of 1,000, the given weights won in 14,561 of the 14,562 folds of the runs that fell back, the check failed in 97-98% of the runs with these trained weights by search and folds, and those that fell back had a mean false discovery proportion at q < 0.01 of 6.3%, 5.8%, 3.8% and 1.8% at 2,000, 3,000, 5,000 and 10,000 PSMs for concatenated searches at 3 folds (154 to 158 runs each; 51% and 47% of the runs of 2,000 and 3,000 PSMs were above 5%, the largest at 24%), 4.5%, 4.0%, 3.2% and 1.7% for separate searches at 3 folds (80 to 152 runs), and 2.5%, 2.6%, 2.5% and 1.7% (concatenated) and 2.9%, 2.5%, 2.2% and 1.6% (separate) at 10 folds, against 0.9-1.3% for the earlier run on the same sets. At 3 folds they reported 5-38% more correct targets at q < 0.01 than the earlier run (38% at 2,000 PSMs, concatenated), with 1.9 to 8.0 times as many incorrect ones, and as many correct targets at q < 0.10 (within 1.5%). With independent weights the fallback gave 0.8-1.2% by search and folds and by size, the worst at 1,000 to 2,000 PSMs, concatenated searches, 3 folds, against 0.9-1.1% for runs without --init-weights whose check passes.
* RESET: the --tdc-pep and --irls-pep PEPs ignored that each remaining decoy stands for two incorrect targets and were half as large as they should be; their odds are now scaled by the decoy factor. Mean PEP of the targets at q < 0.01, 500k-PSM set with an observed FDR of 0.0097: --tdc-pep 0.0046 -> 0.0093, --irls-pep 0.0050 -> 0.0099. The default PEPs and the q values are unchanged.
* --version printed the usage and an error; it now prints the version for percolator and qvality. A lone "-" set --tdc-pep (--irls-pep in qvality); it is now an argument.
* A cross-validation split without training PSMs ran the SVM solver on empty arrays (undefined behaviour); the solver returns zero weights, and a warning names the split.
* -v 3 reported the training set sizes of the previous iteration.
* Library use: about 20 process-wide settings (the seed, PEP and protein flags, file and feature names) carried over from one run to the next in the same process, which changed results and could crash; constructing a Caller resets them.
* Library use: the verbosity (-v) and --no-terminate of one run stayed set for every later run in the same process; constructing a Caller resets them too.
* A feature column with the same value in every row changed the results when that value is not a binary fraction (0.1): the rounded mean differed from the value in the last bits, and the standard deviation scaled the rounding error to a constant 1 or -1, a second bias column (100k-PSM set with a column of 0.1: 14,069 instead of 14,103 targets at q < 0.01, raw weight 2.1e12 in the -w file). The mean of a constant column (minimum equal to maximum) is now its value, so the column is normalised to zeros and the results are those of the input without it; its weight is 0. Inputs without such a column are unchanged.
* -h, --help and --html ended the process inside the option parser (exit(0)), also for a program that uses Percolator as a library. The help is printed as before, and percolator and qvality end with status 0 through their normal return path.
* -P auto: the decoy prefix is detected from every tenth decoy PSM instead of a sample drawn with std::shuffle and std::default_random_engine, which differ between standard libraries. A prefix shared by all decoys is detected as before.
* P-IRLS PEPs (protein PEPs with -f, --irls-pep): the Newton steps of the logistic spline fit are solved in double-double arithmetic instead of double precision. Two bins with nearly equal scores made the system ill-conditioned: the fit ran to its limit of 20 iterations, and the PEPs depended on the platform and on the FMA variants of glibc's exp and log. On 150 synthetic sets 38 final protein fits reached the limit and 87 sets gave other protein files without FMA; in a set of 20,000 PSMs the best protein's PEP was off by a factor of 375 (2 with FMA) from the fit in quadruple precision. On these sets no fit reaches the limit now, and no output depends on FMA. Protein PEPs change by at most 9.7e-6 relative where no fit reached the limit and by up to 0.51 where one did, --irls-pep PEPs in 24 sets by up to 2.5e-2; protein q values and default PEPs do not change. Equal knots (equal transformed scores) are merged, steps that cannot be taken are refused, and a warning is printed if the fit does not converge or if neighbouring knots are closer than 1e-9 times the median gap around them. Near ties within rounding remain: two of 300 protein scores near 2 that are 1e-14 apart leave the fit at its limit (PEPs differ by 1e-3 relative with and without FMA), and 24 qvality scores 1 ulp apart and 400 others give the best PEP 6.3e-16, against 3.8e-4 with the 24 merged. --no-terminate pads fewer than 4 bins at distinct scores (3 decoy and 9 target proteins, all tied: PEP 0.333333, was 0.337017).
Input and output checks (most of these inputs gave wrong or missing results with exit status 0 before):
* Feature normalisation factors and trained SVM weights that are not finite stop the run with the feature's name (two Xcorr values of 1e308 made every score NaN).
* The header is checked against the first PSM line: the features must end at the Peptide column. Errors in a multi-file input name the file and its line; a file with only a header is skipped with a warning; label warnings stop after 1,000 lines.
* A peptide without the flanks X.PEPTIDE.Y is used as it is, with one warning per run (it lost two characters at each end, which merged distinct peptides; one shorter than 2 characters aborted the run). A number in the peptide column (an extra feature column) is an error, as is an unflanked peptide with protein inference.
* A weights file (-W) must match the features of the input by name and order when it has a line of names, and hold one finite raw weight per feature plus m0, with at least one feature weight that is not 0: weights that are all 0 cannot order the PSMs, and a run that fell back to them ended because the bins could not be rescaled ("Cannot rescale scores", "no spread").
* Output files and standard output are checked after writing, so a full disk is an error. An output file that is an input or another output is refused (-m x.pin x.pin emptied the input).
* qvality: the input files must open and hold finite numbers (a missing null file reported every target as correct).
* qvality -d on a p value file walked the list of q values, which holds one value per p value, over all lines of the output, which also has the generated decoys: line i got the q value of the i-th p value whatever it was, so nearly every line had another line's q value, and the second half read past the end of the list (values such as 6.9e-310 that changed from run to run), with every PEP method. Each line now has a q value: the p values keep theirs, and a decoy with the value d gets the same estimate at d, pi0 * m * d / #{p <= d}, limited by the q value of the next p value. The PEPs of the decoy lines are interpolated with these q values, as for score input. The p-value lines of -d now have the q values of the run without -d, which changes the q value on nearly all of them; their PEPs and the output without -d are unchanged.
* --no-terminate with protein inference (-f) on an input without target PSMs ended in a segmentation fault: there is one protein p value per target protein, and the first of an empty list was read. The decoy proteins now get the p value 1, and the run ends with status 0 and the decoy proteins at q value 1 and PEP 1. Without --no-terminate such an input is the error "no target PSMs were provided", as before.
* Warnings for a concatenated search with several candidates per spectrum, which is detected as separate searches (suggests -Y), and for -Y with -I concatenated, which ignores -Y.
* A feature whose values are so small (below about 1e-162 in magnitude) that their variance underflows to 0 is left unscaled and drops out of the scores; a warning now names the feature.
* I-spline PEPs: scores whose span is not finite (1e308 and -1e308) are an error; qvality printed "-nan" PEPs with exit status 0. A warning is printed if the solver of the fit stops without converging (not observed).
* The error for a scan number outside -2147483648 to 2147483647 names this range, and an input of more than 2147483647 lines is an error instead of wrapping the line and PSM counters.
* The error for a PSM line that ends in its calculated mass or retention time column ended "Check if experimental mass is a floating point number.", copied from the experimental mass; it now ends "The line ends in this column.".
* The warning for mix-max on numbers of target and decoy PSMs that differ by more than 10% gives both numbers and says which way the q values can be wrong; it stays a warning, and --reset-algorithm, which does not use mix-max, no longer prints it. On input that is detected as separate searches, --reset-algorithm still prints "Separate target and decoy search inputs detected, using mix-max method." and, for several candidates per spectrum, the warning about them, although it does not use mix-max: these lines are unchanged. Mix-max does not scale by the two numbers. On separate searches that follow its model, the false discovery proportion at q < 0.01 was 0.0215 (10% of spectra with a correct match) and 0.0137 (50%) with half of the decoy PSMs removed at random, against 0.0106 and 0.0100 with all, and 0.0065 and 0.0077 with half of the target PSMs. PSMs that both searches dropped below a score threshold leave more targets than decoys as well, but q values at or below nominal (0.0082 to 0.0107), so the numbers alone are no reason to stop. For a concatenated search that is forced to mix-max (-y, -I separate) or detected as separate searches (several candidates per spectrum) the warning names -Y and -I concatenated.
Speed and memory (output unchanged unless listed above):
* Input parsing with std::from_chars and buffered output.
* SVM: solver buffers reused, training rows stored contiguously and shared by the grid, row-grouped kernels, count-only grid evaluation in parallel over all pairs, parallel search for the initial direction.
* PSMs in a block store with a string arena and interned protein names; ScoreHolder 56 to 40 bytes; PSMDescription without vtable; feature rows and cross-validation data freed after training; PSM-level PEPs only computed when written; I-spline normal equations accumulated without an N x 200 design matrix.
* 1M synthetic PSMs, 3 threads: 155 s and 1.75 GB before, about 24 s and 1.0 GB now.
* Stage timing at -v 3; benchmark and calibration scripts in tests/benchmark (Python standard library only).
* The changes of round two, measured on their integration (329d347) against pull request #404 (b986955), 3 threads, two interleaved runs each on a shared 4-core machine; the PSM and peptide files are identical. 1M_marked (1M synthetic PSMs): 26.9 and 25.4 s -> 15.7 and 14.9 s wall, 62 and 60 s -> 36 and 34 s CPU, peak RSS 1.05 -> 0.88 GB. A 4M-PSM synthetic set: 149 and 130 s -> 65 and 67 s wall, 285 and 295 s -> 146 and 152 s CPU, 3.87 -> 3.31 GB. With --reset-algorithm, 1M: 8.6 and 8.4 s -> 4.3 and 4.6 s, 0.59 -> 0.48 GB; 4M: 39.4 and 39.7 s -> 20.4 and 19.9 s, 2.37 -> 1.81 GB.
* SVM training: the Cpos/Cneg pairs train without the ordered clause; the grid evaluation counts nothing for a fold that trains a single pair and otherwise counts the targets by partial selection; the initial direction reads the features in memory order and counts by partial selection; the line search sorts its breakpoints chunk by chunk; a thread reuses its solver buffers; the kernels prefetch the training rows; nested cross-validation retrains from the previous weights.
* Sorting: parallelSort, a portable in-place OpenMP sort, replaces GCC's parallel mode, so builds with libc++ and MSVC sort in parallel too; test sets already in score order are not sorted again; q values and p values are computed on the sorted PSMs without copies.
* Input and output: separate searches are detected by sorting scan ids, and -N samples spectra with a flat hash table; the protein decoy prefix is found without a string per column; result lines are written with std::to_chars, and numbers parsed with std::from_chars or a fast path where it is missing; the fields before the features are read once; PSMDescription takes 56 instead of 88 bytes; qvality no longer flushes after every line.
* Memory: the fold data are released before the test sets are merged (1M peak 1,050,840 -> 1,001,564 KB). New option --in-place-training trains the SVMs on the feature rows instead of copies: peak RSS -27% to -30% at 1M to 10M PSMs for 15-22% more CPU time.
* Peak memory with many folds: the SVMs are trained on copies of the feature rows of each fold's training set, and the copies of all folds were held at once. They are now built for a group of folds, whose SVMs are trained in parallel, and the buffers are reused for the next group. New option --folds-in-memory sets the number of folds per group; the default is all folds with up to 3 folds, as before, and 1 with more. Where fewer folds than all are held, the solves in which a fold trains a single SVM (after the Cpos/Cneg pair is fixed, with one candidate pair, and the solve on a whole fold of nested cross-validation) train all folds in parallel on the rows in place, as --in-place-training does. Any number gives the same output. Peak RSS, 3 threads, synthetic sets with 30 features, before -> now: 10 folds, 1M PSMs 2,318,532 -> 1,020,388 KB, 4M PSMs 8,611,872 -> 3,966,064 KB (-54%) in 210.6 -> 222.9 s on a shared machine at loads of 1.3 and 4.4 (the new binary with all folds at once: 8,489,492 KB, 265.5 s at a load of 2.9). 1M PSMs with 10 folds, two interleaved pairs: 53.4 and 53.2 -> 56.7 and 55.0 s (130 -> 136 CPU s). 3 folds with --folds-in-memory 1: 1M 883,736 -> 651,732 KB, 4M 3,306,116 -> 2,522,808 KB, 10M 8,647,764 -> 6,485,540 KB (-25%); the new binary took 64.7 and 67.6 s with all folds at once and 71.6 and 60.2 s with one at 4M (loads of 2.7 to 4.7). Nested cross-validation (3 bins) with --folds-in-memory 1, 1M: 1,449,272 -> 884,576 KB.
* percolator (the executable, not the library) fixes glibc's mmap threshold at 1 MiB, so that freed blocks of that size go back to the system instead of staying in the heap. Default peak RSS: 1M 883,736 -> 849,168 KB, 4M 3,306,116 -> 3,231,584 KB, 10M 8,647,764 -> 8,458,068 KB; resident memory during the statistics stages 1,565 -> 638 MiB at 4M and 3,896 -> 1,575 MiB at 10M. System time +1.1 s at 4M; no change of the run time in three interleaved pairs (54.2 and 54.3 s on average).
* The SVM input reserves room for the training set (decoys and accepted targets) plus an eighth instead of for all PSMs: 22% less committed memory during the training at 4M (heap 3,812 -> 2,964 MiB); resident memory unchanged on Linux.
* A breakpoint of the SVM line search takes 12 instead of 16 bytes, so a training thread holds 32 instead of 36 bytes per example of its training set. Each further thread adds about 12 MiB to the peak RSS per million PSMs (1M: 829,728 KB with 1 thread, 864,216 KB with 4). Resident memory at the end of the SVM training stage at 4M PSMs, 3 threads: 3,141-3,156 -> 3,124-3,138 MiB; the peak RSS, which the grid evaluation sets, and the run time are unchanged.
* The help of --in-place-training gives its measured saving and cost: peak RSS -31 to -34% at 3 folds for 1M to 10M PSMs; SVM training +19% CPU time at 1M and about +40% at 4M and 10M; whole run +1%, +10% and +14% CPU time.
* RESET selects the best PSM per peptide with one lookup per PSM (4M PSMs: peptide selection 6.2 -> 2.5 s), and --composition-match groups the PSMs without nested maps (4M PSMs: whole run 111.6 -> 75.8 s).
* Protein inference with -f: the FASTA database is read and digested once into a flat peptide index (human Swiss-Prot: 8.6-9.1 -> 1.6-1.9 s, peak RSS 329 -> 121 MB); proteins of 39,999 residues or more no longer end the run.
* The -v 3 stage lines also report the resident set size, its peak and the heap in use (Linux).
* The -v 3 stage lines are printed with six significant digits: printing the normalization factors had left stderr at two for the rest of the run ("Stage training: 8.3 s wall, 21 s cpu"). The weed-out ("peptide weed-out", and "PSM weed-out (target-decoy competition)" with -Y), the writing of the result files ("write PSM results", "write peptide results") and the check of the headers and first rows of several input files ("validate input files") have stage lines of their own; "PSM-level statistics" and "peptide-level statistics" now cover the q values and PEPs alone, and the stages do not overlap. Output files are unchanged.
* Round three, the serial stages of a large run and the solver kernel; the result files are identical. A 4M-PSM synthetic set against the round-two branch (e6c6ea0), interleaved runs on a shared 4-core machine: 58-62 -> 47-49 s wall with 3 threads (CPU 125-130 -> 108-111 s, peak RSS unchanged), 132-134 -> 107 s with 1 thread; 10M PSMs, 3 threads: 151 -> 118 s. The SVM input is counted and copied on all threads into a matrix that is not zero-filled first (build SVM input 5.9-6.6 -> 2.2-2.5 s); scoring prefetches the PSMs and their feature rows (grid evaluation 13.4-14.3 -> 11.6-12.8 s, CPU 36-38 -> 31-33 s); the result lines are formatted in blocks of 16,384 PSMs on all threads and written in order (PSM-level statistics 3.2-3.3 -> 1.4-1.6 s); the best PSM per peptide is found by sorting 24-byte keys of a 64-bit peptide hash, label and score instead of the PSMs by their peptide strings, with peptides that share a hash value told apart by the strings (peptide-level statistics 3.2-3.6 -> 0.7-0.9 s).
* The normal equations of the direct solve add four rows per pass over the Gram matrix, with every element summed in the same order, so the solution is bit for bit the same: SVM training 54 -> 47 s on 4M PSMs with 1 thread, CPU 53-54 -> 47-48 s with 3 threads. The speed of the previous loop depended on the address at which the linker placed it, modulo 64 bytes (0.20 to 0.27 s for the same call in a micro-benchmark, 24 to 31 s of CPU time for the first training iteration on 4M PSMs across binaries with the same solver code); the new loop does not (0.125-0.131 s at the four offsets).
* Several input files are read in turn, as one input, instead of being copied into a temporary file first: no temporary space of the size of the input (1,126 MB for 4M PSMs in four files, which is memory where the temporary directory is a tmpfs) and no pass that writes the copy (1.2 to 1.4 s there, 3 threads). The -v 3 stage of several input files is "validate input files", which reads the header and first rows of each file; the copy was never part of a release, so no stage line of a release is renamed. Reading, which now also fills the columns that a file lacks, took 7.1 to 8.5 s against 6.1 to 7.3 s in three interleaved runs on a shared machine, the two stages together 7.1 to 8.5 s against 7.3 to 8.7 s. Errors name the file and line as before. At -v 2, "Reading tab-delimited input from datafile <temporary file>" is now "Reading tab-delimited input from the N input files".
Dependencies and removed code:
* Boost and Eigen are no longer needed.
* Removed: libsvm, the Mayu protein FDR estimator, ResultHolder, SqtSanityCheck, Logger, Analytics (--no-analytics is still accepted), unused dblas routines, src/converters/CMakeLists.txt.
* The dblas library is replaced by inline level-1 BLAS helpers with the same results; the FASTA classes adapted from Crux (Database, Protein, Peptide, ProteinPeptideIterator and others, about 5,000 lines) by ProteinDigest; the standalone picked-protein program, which no longer compiled, is removed. Stale CMake Find modules and link libraries, unused macros, getters and protein scoring branches are removed.
* Builds no longer define _GLIBCXX_PARALLEL.
* Removed: Normalizer::updateSet (three implementations, no caller in Percolator or Crux), the declaration of Scores::printRetentionTime, a commented-out loop in Scores::keepBestPsmPerSpectrum, the constant useSingleFold in Caller::run and the loop of TabFileValidator::getDecoyPrefix that ended after the first file. MassHandler stays: Crux calls MassHandler::massDiff.
* The 13 enzyme classes are one table of names and cleavage rules in Enzyme.cpp (Enzyme.h: 376 -> 66 lines); the rules are the same for every pair of residues. Globals::failUnlessNoTerminate replaces 17 hand-written --no-terminate blocks, with the same messages.
* The isfinite and _finite macros for MSVC are gone, and the code calls std::isfinite. Not yet built with MSVC.
Build, packaging and CI:
* The unit tests use an installed GoogleTest before downloading one (USE_SYSTEM_GTEST), and only they link the threads library. The system tests run with ctest on the build tree; Python 3 is optional.
* Packages: the .deb declares its dependencies, package names carry the architecture, gtest_unit is no longer installed. macOS builds target macOS 12 and link libomp statically where possible, with a warning when OpenMP is missing; the release is universal. Windows links the C++ runtime statically and ships vcomp140.dll. The portable Linux binary is built for glibc 2.28 (RHEL 8). The Docker image ships qvality. CPack.txt no longer sets CMAKE_OSX_ARCHITECTURES, also not when TARGET_ARCH is given as in 3.09.1: the architectures come from CMAKE_OSX_ARCHITECTURES or the toolchain, and TARGET_ARCH only names the package.
* CI: an ASan and UBSan job (unit and system tests, 30 option combinations), a thread-determinism job (1 against 4 threads, 192 files) and a warning budget.
* CI: unchanged results are a tested property. tests/ci/option_matrix.sha256 holds the SHA-256 hashes of the 286 output files of 51 option combinations on inputs of 8,000 PSMs (16 new runs cover --num-folds, --in-place-training, --merge-normalization, --direction-check, -I, --train-fdr-initial, -f <fasta> -z, --stdinput-tab and -j), and tests/ci/check_golden.sh compares a build with it in 15 s: strictly on x86-64 Linux, as a report with uploaded hashes on the other platforms. A change that alters results on purpose rewrites the manifest with check_golden.sh --update (tests/ci/README.md). tests/ci/exit_status.sh runs 49 cases (39 where /dev/full is missing): bad input, invalid options and write errors must end with exit status 1 and a message, and the controls, the warnings, --no-terminate on inputs without targets or decoys and qvality -d on p values with status 0 and usable output. The sanitizer job keeps the assertions (RelWithDebInfo defined NDEBUG).
* Tests: ctest and the CI workflow run with OMP_WAIT_POLICY=passive, since spinning OpenMP threads slow the tests down several times on a busy machine (two unit test runs at once: 73 s each, 14 s with passive waiting); the unit tests write their files to temporary directories of their own, so that test runs at the same time no longer fail.
* CI runs for pull requests and pushes to master, and a new push cancels the previous run of a pull request. New jobs: a native arm64 Linux build with all tests, and a GCC 9 build that does not block yet. Windows runs the system tests and the option matrix too. Linux x86-64, Linux arm64, macOS and Windows upload the hashes of the option matrix outputs (tests/ci/matrix_hashes.py), and a job prints the files and lines that differ between the platforms; compilers round differently (fused multiply-add on arm64), and no flag is added against it.
* The oldest supported GCC is 9 (std::filesystem), which CMake now checks; GCC 11 and later use the faster number conversions.
* The Windows builders are three cmake commands that use the CMake, Visual Studio and NSIS of the machine. They downloaded and ran vswhere, 7-Zip, CMake and NSIS without checksums.
* A Python wheel with the percolator and qvality executables and nothing else (pyproject.toml, scikit-build-core; python -m build --wheel): the commands percolator and qvality start the bundled binaries. Its version is read from CommonCMake.txt. The distribution name is percolator-cpp, set in one line of pyproject.toml, since "percolator" on PyPI is another project. A run of the Wheels workflow started by hand on a release tag (rel-X-YY or rel-X-YY-ZZ), with publish ticked, uploads the wheels and the source distribution to PyPI by trusted publishing (no stored token), if their version is that of the tag. The Wheels workflow builds it with cibuildwheel for Linux (x86-64 and arm64, manylinux_2_28), macOS (x86-64 and arm64; libomp compiled for macOS 12 by admin/wheels/build_libomp_macos.sh and linked statically) and Windows (vcomp140.dll beside the executables), and runs each installed wheel on percolatorTab (admin/wheels/check_wheel.py). A Linux wheel built locally gave the outputs of the CMake build on the 188 output files that the option matrix had at that time; the wheels are not run on the full option matrix.
* Builders: unused scripts removed, option strings fixed, packages of removed code no longer installed.
* The conda build script, recipe and workflow of 3.09.1 need no Boost; admin/conda/README.md lists the changes to the bioconda recipe. conda_build.sh starts from an empty build directory and sets policy CMP0125 to NEW, so that the conda binutils, which CMAKE_ARGS names without a path on Linux, are found. The Conda build workflow runs for pull requests and for pushes to master, release branches (branch-*) and release tags (rel-*).
* tests/benchmark: make_synthetic_pin.py follows the target-decoy assumptions (its concatenated mode had 35% incorrect targets against 50% decoys) and writes the true PEPs of PSMs and peptides; true_pep.py, oracle.py, Brier and Hosmer-Lemeshow statistics; compare_results.py joins peptide rows on the peptide. Its Gaussians have equal variances, so it cannot detect a misspecified PEP tail.
* A build with -Wall -Wextra gives no warning (25 before, 2 of them in the unit tests), and the CI job for it blocks: budget 0, unit tests included, and a log without compiled files fails. -Wno-deprecated-declarations is no longer set.
* CMake: the options GOOGLE_TEST and GOOGLE_TEST_PATH (read by nothing), PROFILING (did not compile) and COVERAGE (instrumented no library source) are removed, with GTestExtProject.cmake.in; pass -DCMAKE_CXX_FLAGS=-pg or --coverage instead. project() enables C++ only, so no C compiler is needed.
* PickedProteinCaller.cpp and ProteinDigest.cpp are compiled into perclibrary, which removes the link-order rule between two libraries; the CMake target picked_protein remains as an INTERFACE target.
Interface changes (Crux and other library users):
* PSMDescription: proteinIds replaced by proteins(); getId, getFullPeptide and getFullPeptideSequence return std::string_view; the strings live in SetHandler's PsmStore; deletePtr and the virtual functions removed; new setLineNr/getLineNr.
* DataSet::readPsm takes a PsmStore, and a DataSet no longer deletes its PSMs. SetHandler owns its DataSets through std::unique_ptr (push_back_dataset).
* SetHandler::readTab, readAndScoreTab, writeTab and normalizeFeatures and CrossValidation::preIterationSetup and postIterationProcessing take references.
* SanityCheck's static setters are member functions; SqtSanityCheck removed.
* Normalizer::getNormalizer, resetNormalizer and setType replaced by Normalizer::create; Enzyme::createEnzyme returns std::unique_ptr.
* CGLS and L2_SVM_MFN take std::vector arguments; vector_double and vector_int removed; AlgIn is a value type.
* Scores::calcPep takes a fourth argument (tdc); InferPEP::tdc_to_pep takes an optional odds factor; PosteriorEstimator has an estimateMonotonePEP member.
* Scores::getInitDirection sets every element of the direction vector to 0 before it sets the chosen feature, the bias included.
* Scores::merge takes a MergeNormalization scheme and per-bin ScoreScale anchors (both defaulted to the previous behaviour); Scores::normalizeScores is built on the new getScoreScale, calcScoreScale and applyScoreScale; postMergeStep takes an optional flag that turns a too good separation into pi0 = 1 and returns whether the separation is too good; new Scores::countMergedTargets (-1 for a merged list that cannot be used, also by the lists of -Y and the peptide level that its ReportedLists argument names, and by a test bin that separates too well where merge checks each bin: with test and without rescaling) and mergeNormalizationName; Scores::getInitDirection is const. CrossValidation has usedMergeNormalization and the static defaultMergeNormalization (test up to three folds, train-decoys with more); the scheme is set with the MergePlan below.
* SanityCheck: setDirectionCheck (DirectionCheck BINS, SECOND_CHANCE, POOLED). Its default is BINS, the previous check; setDirectionCheck(SECOND_CHANCE) lets validateDirection keep trained weights whose per-bin count fails. PseudoRandom::getSeed returns the generator state that setSeed restores.
* Globals: logger and stream redirection functions removed. Timer::getStartTimeStr returns std::string. ScoreHolder has no virtual destructor and no p field.
* Normalizer::setSet throws MyException for factors that are not finite; new FeatureNames::describeFeature. PSMDescription::getPeptideSequence(View) return an unflanked peptide unchanged; new PSMDescription::hasFlanks and appendProteins, DataSet::resetWarnings, readPsmHeader, readPsmBody and PsmHeader.
* PSMDescription stores its id, peptide and protein list as one record written by PsmStore::storeStrings(psm, id, peptide, proteins); the constructor from a peptide, setId, setPeptide and setProteins, and PsmStore::storeString and storeProteins, are removed.
* New closeOutputFile and flushStandardOutput (MyException.h); ProteinProbEstimator::printOut and PosteriorEstimator::finishStandalone throw MyException on a write error. Caller::parseOptions throws for an output that is an input or another output (checkOutputFiles). Constructing a Caller resets the process-wide settings, so a library user sets them after the constructor; new PosteriorEstimator::getReversed and resetToDefaults.
* CommandLineParser::defineOption treats an empty short name as NO_SHORT_OPT and detects duplicate names; parseArgs keeps a lone "-" as an argument; error no longer prepends the usage text. ValidateTabFile::concatenateMultiplePINs takes an optional std::vector<InputSegment>*; new SetHandler::setInputSegments, describeLine, getSampledLines, getSampledSpectra and getSampledSpectraWithRepeatedLabel. SetHandler::readAndScoreTab takes the fold weights and the (line, fold) list of -N (default empty); CrossValidation has setRecordTestFolds, getTestFolds and getRawFoldWeights.
* Scores::FeatureRows is a vector of FeatureRow words; countTargetsBelowFdr(rows, w, ...) takes a CountBuffers; new countTargetsBySelection and isSortedByScore; the protected calcQvals overload with a vector of pairs is replaced by getTargetPValues. Scores::merge empties the bins it merges, and postIterationProcessing releases the training sets and SVM inputs, so train() cannot follow it; preIterationSetup empties the full set at the split.
* L2_SVM_MFN has an overload with a SolverWorkspace (prepare(m, n, cgls)); AlgIn(n, rowsInPlace), AlgIn::reserve and row(i) replace the public rows; FeatureMemoryPool has setSvmRowsInPlace, rowStride, hasInterceptColumn and canTrainInPlace; CrossValidation::setSvmRowsInPlace. New header ParallelSort.h. CompositionSorter::generateCompositionSignature takes a std::string_view. PosteriorEstimator::estimatePEP takes an odds factor (default 1). TabReader has readSimpleDouble, a constructor from a character range, position and lineEnd. SanityCheck::resetDirection gives each fold the --init-weights vector or its default direction, whichever separates more targets of its training set, and restores the --init-weights vector with --static; new Scores::findInitDirection, the direction of getInitDirection without its message and its error.
* CrossValidation::setFoldsAtOnce (the number of folds whose row copies are held at once, 0 for the default), setSingleSolvesInPlace (single solves on rows in place, which need rows as for setSvmRowsInPlace) and foldsHeldAtOnce are new; a library caller that sets neither keeps all folds at once with up to 3 folds and gets one fold at a time, with all solves on copies, with more. Scores::reserveTrainingSet and AlgIn::capacity are new, and Scores::generateNegativeTrainingSet no longer reserves room for all PSMs. The mmap threshold is set in percolator's main() only. Delta (ssl.h) is a packed struct of 12 bytes without the member s.
* Libraries: libdblas.a no longer exists; libpicked_protein.a no longer contains Option, Globals and MyException, so libperclibrary.a is linked after it; perclibrary no longer links Threads::Threads; Percolator's libraries are not compiled with -D_GLIBCXX_PARALLEL, which Crux need not and should not define. PickedProteinCaller::initConstraints takes Enzyme::EnzymeType and PickedProtein::DigestType, and greeter and parseOptions are removed with the PercolatorCrux namespace; the PickedProteinInterface constructor has no pvalueCutoff; ProteinInferenceMethod, Scores::getQvaluesBelowLevel, ProteinProbEstimator::countTargets, countDecoys and isTarget, several FeatureNames getters and Globals.h macros are removed.
* On macOS perclibrary is compiled for macOS 12.0 unless Crux passes CMAKE_OSX_DEPLOYMENT_TARGET; on Windows it uses the static runtime (/MT) unless -DUSE_MSVC_STATIC_RUNTIME=OFF or CMAKE_MSVC_RUNTIME_LIBRARY is given.
* Constructing a Caller calls Globals::clean(): a verbosity or no-terminate flag set through Globals before the constructor no longer reaches the run; pass -v and --no-terminate to parseOptions or set them after the constructor.
* CommandLineParser::help and htmlHelp no longer end the process; new CommandLineParser::helpRequested. After -h, --help or --html, Caller::parseOptions returns true and Caller::run returns 1 without doing anything, as for --version; a wrapper that relied on --help ending the process gets these return values. New MonotoneParams::max_solver_iters and a fifth argument of solveBoxQP (0: the default limit); ispline_detail::normalize_to_unit_interval throws MyException for a span that is not finite; new SetHandler::incrementLineNr.
* AlgIn: new resizeExamples(numExamples) and set(i, row, label), which fill a training set in any order and from several threads; the copied rows are an uninitialised buffer, with user-defined copy and move operations; add, reserve, clear and row are unchanged. ssl.h: new prefetchAddress and accumulateNormalEquations. New PSMDescription::stringsAddress. Scores::print formats on the OpenMP threads; Scores::keepBestPsmPerPeptide (protected) leaves the kept PSMs in list order and has an overload with a hash function.
* Removed: Normalizer::updateSet and its overrides in StdvNormalizer, UniNormalizer and NoNormalizer; the classes NoEnzyme, Trypsin, TrypsinP, Chymotrypsin, Thermolysin, Proteinasek, Pepsin, Elastase, LysN, LysC, ArgC, AspN and GluC with their getString() (Enzyme::createEnzyme, getEnzymeType, getStringEnzyme, isEnzymatic and countEnzymatic are unchanged; Enzyme has no virtual function and no public constructor; new Enzyme::getString(EnzymeType)); the macros isfinite and _finite of Globals.h (write std::isfinite); the declaration of Scores::printRetentionTime.
* libpicked_protein.a is no longer built: its objects are in libperclibrary.a, and the CMake target picked_protein is an INTERFACE target that links perclibrary. Crux, which replaces src/CMakeLists.txt and src/picked_protein/CMakeLists.txt by its own copies, drops picked_protein from its link line or keeps building it in its copy.
* New Globals::failUnlessNoTerminate(error, recovery, thrownSuffix). SetHandler::getLabel returns LabelType instead of LabelType const; Set::add takes const int& and overrides Array<int>::add.
* New FdrWalk.h: walkFdrEstimates is the one FDR walk of Scores::calcQvals, PosteriorEstimator::getQValues and the count-only grid evaluation. PosteriorEstimator::getQValues takes includeNegatives (default false) and estimatePEP takes reversed (default false) as arguments; the process-wide setNegative, setReversed and getReversed are removed.
* Scores::merge and countMergedTargets share one private merge of the bins (mergeBins, MergeStatus). New static Scores::calcBinScales (the anchors of train and train-decoys from the training sets); calcScores, calcScoresAndQvals and calcScoreScale take the weights by const reference. merge with skipNormalizeScores checks the separation of each bin whatever the scheme, as with test.
* New MergePlan (Scores.h: scheme, secondChanceScheme, fdr, skipNormalizeScores, lists, usedScheme): how the test bins are merged and which lists the direction check counts. secondChanceScheme is the scheme of a run whose trained SVMs the second chance keeps, whose list it then also checks. SanityCheck::setMergePlan and mergePlan, and CrossValidation::setMergePlan and mergePlan, are the only way to set these; the setters that this branch had before them (SanityCheck::setMergeScheme, setSecondChanceMergeScheme, setReportedLists, secondChanceKept; CrossValidation::setMergeNormalization) were never released and are gone. SanityCheck::validateDirection returns DirectionOutcome (KEPT, KEPT_BY_SECOND_CHANCE, FAILED) instead of bool, CrossValidation::directionOutcome() gives the outcome of the check, and the constructor of CrossValidation no longer takes skipNormalizeScores.
* SetHandler::readTab fills an InputSummary (concatenatedSearch, defaultWeights) instead of a SanityCheck, readAndScoreTab takes no SanityCheck, and writeTab takes the default weights; SetHandler.h no longer includes SanityCheck.h. DataSet::readPsm and readPsmBody lose the overloads that added the PSM to the set.
* New ConcatenatedPins and ConcatenatedPinStream (ValidateTabFile.h), which give the lines of several input files as one input; ValidateTabFile::concatenateMultiplePINs writes these lines and is no longer used by Caller, which has no TmpDir. SetHandler::setInputSegments has an overload for a list that grows while the files are read.
* DJB2Hash is removed from CompositionSorter.h; CompositionSorter::psmsOnly and psmAndPeptide return the winners in the order of first appearance. PAVARegressor::fit_xy pools observations with equal x.
* New static PosteriorEstimator::getAllQValuesFromP: the q values of the p values and of the generated decoys, used by qvality -d.
* New static Caller::resetProcessSettings, the reset of the process-wide settings that the constructor of Caller does. The unit tests call it before each test (a listener in their main file): a run with -f left protein inference on, and DataSetTest and SetHandlerTest then failed when --gtest_shuffle put them after it.
* BaseSpline: iterativeReweightedLeastSquares returns whether the fit converged; reinschStep, which returns false for a step it cannot take, replaces initiateQR, the public static solveInPlace and the members Q, Qt, R and dx, and BaseSpline.h no longer includes PackedMatrix.h. LogisticRegression::setData, now defined in LogisticRegression.cpp, merges equal knots (new protected static mergeEqualKnots), so x, y and m can be shorter than the vectors given, and warns of nearly equal knots (new protected static countNearTies).
* Removed: PackedMatrix (PackedMatrix.cpp and PackedMatrix.h), which nothing uses since the P-IRLS step changed, and limitgamma of BaseSpline and LogisticRegression, which nothing called. Crux drops PackedMatrix.cpp from its copy of src/CMakeLists.txt, and compiles BaseSpline.cpp with -ffp-contract=off (GCC and Clang) as that file does.

v3.09.1
Build fixes only; results are identical to v3.09.
* macOS: the install honours CMAKE_INSTALL_PREFIX (it was always /usr/local) and CMAKE_OSX_ARCHITECTURES is only forced when TARGET_ARCH is given.
* Static libraries are preferred on Windows only, or with -DSTATIC=ON, which the macOS installer build uses. New option HOMEBREW_LIBOMP to switch off the fallback to Homebrew's libomp.
* Eigen is no longer installed with Percolator.
* Linux: Boost.System is linked only where it exists; Boost 1.89 and later have no such library.
* New script admin/builders/conda_build.sh for dynamically linked conda builds, a test recipe in admin/conda and a CI workflow that builds it on Linux and macOS.

v3.09
* Replaced I-spline rank-based PEP calibration with score-based I-spline calibration as the new default; use --rank-pep to opt back to the previous rank-based behaviour. (#403)
* Added I-spline PEP calibration using a trust-region reflective constrained ridge regressor (ISplineTRRRegressor), replacing PAVA post-processing as the default smoother; use --pava-pep to revert to PAVA. (#399)
* Removed XML/XSD I/O support, which was incompatible with modern C++ toolchains. (#399)
* Fixed a bug where PEP values could exceed 1.0. (#394)
* Fixed a variable scope error in Set::reindexTo. (#402)
* Raise an error when tab characters are found in a non-tab-separated protein field. (#380)
* Check that input files exist before attempting decoy prefix detection. (#397)
* Replaced CentOS with AlmaLinux 9 in CI via container build; updated GitHub Actions to Node.js 24 compatible versions and Boost 1.87.0. (#399)

v3.08
* Including builder for ghcr.io containers
* Defaulting to Isplines as PEP regressor #391
* Functionality for PAVA regression #391
* Added some more Unit Tests #391
* added libtirpc-dev to ubuntu builder
* Changing build directory structure for Actions
* Actions building with macos-15 runners, including arm64 support #388
* updating Boost.Asio interface #388
* removing GoogleAnalytics for now,
* Changed paths for triggered builds.
* Adding dependecy to the Eigen library #391
* Removing unit test dependency on pthreads under windows
* Tidied up code #384

v3.07
* Implementation of percolator-reset #378
* Added RT to percolator output #374


v3.06.5
* Allow empty pin-file with --no-terminate flag. (#371)
* Skip protein decoy pattern detection if --protein-decoy-pattern is specified. (#356)
* Delay tab file validation and decoy pattern detection to Caller::run().
* Cleaned up and refactored TabFileValidator.
* Deal with DefaultDirection row when merging multiple pin files.
* Better names for portable artifacts.

v3.06.4
* Fix assertion problem with ties in calculating PEPs. (#365)
* Upgrade to macos-12 on GH action builds. (#364, #366)

v3.06.3
* Add check and fallback for <4 bins in BaseSpline PEP estimation. (#362)

v3.06.2
* Take filename into account in TDC (#358)

v3.06.1
* Added checks for number of decoy PSMs<=1 (#337)
* Removing multiple warnings of decoyPrefix not being set (despite being set). (#338)
* #ifdef CRUX macros removed (#340)
* Fixed problem with missing protein IDs. (#342, #343, #329)
* Fix inconsistent behavior of --train-fdr-initial when --trainFDR is zero (#349)
* Extended fix for XercesC ICU dependency to Ubuntu 18.04 (#188)
* Clean up char pointers in tmpFile creation (#346)
* Removed binary reading mode and replace popen by subprocess (#330)
* Better triggered workflow for github actions
* Update GitHub MacOS runner to macos-11 because macos-10.15 is deprecated.

v3.06
* Added extended unit tests.
* Added code for quicker FDR calculation.
* Updated urls to xerces and google test
* Switched compiler to c++11
* Added basic pepXML support.
* Improved testing in Github actions:
  - Made separate stages for unit and system tests for Ubuntu
  - Introduced a test build for centos
  - Moved unit and system tests to release code.
  - Changed the dependency structure to gtest
* Added command line argument to switch off reporting to analytics
* Added possibility to include spectrum file name in tab-delimited input, that is carried over to tab-delimeted output.
* Added possibility to include retention time in tab-delimited input.
* Discontinued support of the Elude model
* Removed all retention time modelling and all other DOC features

v3.05
* Fixed problem with Elude model reading on windows (#249)
* Better error messages for converters (#251)
* Fixed several build errors (#188, #250)
* Parallel nested CV SVM training using a single OMP threadpool, Percolator can now handle up to 27 parallel threads to significantly speed up processing and uses parallel STL algorithms on linux (#254)
* Fix TabReader error handling (#255)
* Continuous integration with GitHub Actions with nightly releases for Windows, OSX and Ubuntu (https://github.com/percolator/percolator/actions)

v3.04
* Added full support for static models (#247)

v3.03
* Added check for inf or nan valued features (#177)
* Added option to add expMass to PSMid in converters (#232)
* Added check for protein length < decoy prefix length in picked protein (#242)
* Added support for N- and C-term modifications formatted as M.n[37]A[16]AERc[16].G
* Fixes for DOC feature option
* Fixed tandem2pin incorrect decoy label bug (#238)
* Fixed tandem2pin duplicate entries for shared peptides
* Fixed CMake XSD package detection (#234)
* Fixed quickvalidation issue with resetting of score vector (#235)
* Fixed rounding error for experimental mass in msgf2pin (#223)
* Added missing #include for <ctime> (#225)
* Fixed duplicate peptide identifications in protein output (#222)
* Added OSX vagrant build
* Updated XercesC version

v3.02.1
* Fixed protein digestion issues due to trypsin/p (#191)
* Skip XSD schema loading when -s flag is set

v3.02
* Changed FDR calculation for initial direction selection to the more liberal decoys/targets (#208)
* Added parameter file option instead of only command line specification (#149)
* Allow training only on best PSM per peak group or spectrum (#207)
* Include spectral counts for lists of protein inferences (#202)
* Allow separate control of FDR threshold for initial iteration (#190)
* Added check of deltaMass and retentionTime columns with DOC features (#167)
* Added check if output files are writable before training SVM (#185)
* Fixed tandem BioML input check for tandem2pin (#180)
* Fixed discrepancy between windows and linux results (#203)
* Fixed fido protein grouping (#201)
* Fixed zlib DLL issue on windows (#197)
* Fixed/clarified several log and help messages (#199, #205, #179)

v3.01.2
* Fixed empty output on xxx2pin converters on MacOS (#178).

v3.01.1
* Fixed macOS installer problems with macOS 10.11+ (#193)

v3.01
* Changed all FDR calculations to the more conservative: (decoys+1)/targets
* Added `-o`/`-no-terminate` flag to allow overriding of fatal errors:
  * No default direction can be found: set to the first feature (#135)
  * Separation between target and decoy PSMs/proteins is too great: continue with this direction anyway
  * No target PSMs present: return empty result list
  * No decoy PSMs present: give all target PSMs a q-value of 1/numPSMs
  * No features present: create a single pseudo feature which is always zero
  * Too many values in default direction vector: trim default direction vector to number of features
* Added mix-max method for FDR and PEP calculation, which replaces target-decoy competition as the default method. The advantage is that this will report all input PSMs in the PSM output and also corrects for incorrect native spectra in qvality (#152)
* Automatic detection of search input as coming from a concatenated search or from separate target and decoy searches. For a concatenated search, the mix-max method will be skipped. For separate target and decoy searches the user can choose to use the mix-max method (default) or target-decoy competition (-Y flag)
* Updated and improved stderr output to be more informative
* Fixed fasta in-silico digestion for protein grouping which mistook N-methionine cleavage for a non-enzymatic cleavage site (#148)
* Fixed retention time NaN predictions by setting them to 0 instead (#150)
* Fixed protein group representation for picked-protein in the case that protein names contain a comma, by replacing these by semicolons (#153)
* Fixed tandem2pin issue that labeled all PSMs as decoy when providing separate target and decoy input files (#154)
* Added OpenMP runtime library to be included in windows installer (#158)
* Fixed msgf2pin converter issue with C-terminal modifications (#161)
* Fixed tandem2pin to parse PTMs (#132)
* Fixed install location on windows 64-bit from "Program Files (x86)" to "Program Files" (#144)
* Several fixes for OSX build script (#159, #162, #165)
* Fixed mass difference calculation in certain converters (#166)
* Fixed several build issues on several platforms (#79, #113, #133)

v3.0
* Added protein-level FDRs using best-scoring peptide approach
* Added support for training on subsets of PSMs to speed up analysis for large data sets
* Fixed msgf2pin issue with huge ScoreRatio feature (#142)
* Fixed tandem2pin issue with incorrect decoy label assigment for shared peptides (#143)
* Added error message when no decoys are provided (#145)
* Fixed reporting of XML parsing errors for converters (#146)

v2.10
* Made Target-Decoy competition the default search mode (can be switched off with the new '-y' flag)
* Fixed unbalanced fold sizes in cross validation
* Fixed build script for Elude on Windows (#106)
* Fixed enzC feature in the presence of a modification on the C terminal (#118)
* Resolved duplicate `-W` flag (#124)
* Fixed issue with Target-Decoy competition (#128)
* Added support for modifications of the form `P[mod_string]EPT` of sqt input file for sqt2pin (#131)
* Simplified the Fido interface for protein inference
  * Removed options to turn off optimizations that did not alter the posteriors
  * Proteins are always grouped if they have identical evidence and get a protein group number in the protein tab delimited output
  
v2.09
* Added CentOS building script, tested on a clean install of CentOS5.9 (#98, #99)
* Added support for reading from stdin using an empty hyphen argument (#107)
* Added error message when running converters without arguments (#108)
* Fixed invalid pin output from converters with `--aa-freq` parameter (#110)
* Added exp_mass and calc_mass to the tab delimited pin format, so that it appears in the xml output (#112)
* Fixed backwards compatibility with old MSGF+ output (#115)
* Fixed sqt2pin issue of skipping second modification if there are two consecutive PTMs (#116)
* Added OpenMP support for a maximum of 3 cores (1 for each of the cross validation bins). 
  * runs about 2 times as fast, instead of the theoretical 3 (#119).
  * memory usage is slightly higher (<5%) than the single core implementation, since some structures had to be triplicated
  * the number of cores can be set to 1 dynamically by setting the environment variables
  ```
  export OMP_DYNAMIC=FALSE
  export OMP_NUM_THREADS=1
  ```
  
v2.08.01
* Changed behaviour of `-r` and `-B` (=peptide result file names for target and decoy) flags in combination with `-U` (=only PSM statistics) flag. The provided file names will now contain the PSM results, provided that the new `-m` and `-M` (=PSM result file names for target and decoy) flags are not given. This will allow backwards compatibility with percolator 2.04.

v2.08
* Added flags for writing results to explicit filenames instead of using suffixes (#104):
```
-r : target peptide results (is ignored with -U flag)
-m : target PSM results
-l : target protein result (only works with -A flag)

-B : decoy peptide result (is ignored with -U flag)
-M : decoy PSM result
-L : decoy protein result (only works with -A flag)
```
* Restored redundant `-j` flag for tab delimited input for backwards compatibility (i.e. running percolator as `percolator -j tab_output` does not result in errors, but functionally does exactly the same as `percolator tab_output`) (#103)
* Added backwards compatibility with tab delimited input format of percolator before v2.06 by allowing the scan number column to be missing (scan numbers will be assigned automatically). (#102)
* Added more specific error reporting for problems with tab delimited input format. (#95, #96, #97)
* Added default vector for tandem2pin converter (#94)
* Added a fix for the RPM `/usr/bin` permission error in the fedora build script (#90)
* Added a fix for Ubuntu 14.04 problem with XSD package (#100)

v2.07.02
* Fixed wrong xml directory reference in msgf2pin and tandem2pin on windows
* Added warning message to converters if files are not present

v2.07.01
* Removed lnESpecValue column (rel 2.07 only removed the header and default value).
* Fixed numFeatures assertion error.

v2.07
* Fixed missing PTMs bug in MSGF+ converter 
* Removed `InSpecEValue` from MSGF+ converter, since it was causing problems when used together with `lnEValue`
* Added functionality to score directly with provided default vector by setting number of iterations to zero (use flag `-i=0`)
* Fixed percolator output with `-r` flag
* Switched to static linking of external libraries

v2.06
* Modified the xxx2pin converters to output tab delimited files 
  by default rather than pin xml-files  
* Improved support for tab-delimited files, including fixed
  columns for scan numbers, and fixed rows for default directions
* Changed command line option for selecting default direction (-V)
  to take feature name rather than feature number as input
* Introduced a cmake flag XML_SUPPORT, governing the inclusion or 
  exclusion of percolators pin-file XML dependencies. 
* Native Windows compilation via Visual C++
	
v2.05
* Added support for MSGF+ files, using the parser msgf2pin
* Enabled windows 64-bit executables through MinGW64
	
v2.04
* Incorporated new version of Fido to estimate Protein Probabilities
* Added new parameters to use when estimating Protein Probabilities :
	-a (--alpha) 
	-b (--beta)
	-G (--gamma)
  	-N (--group-proteins)
        -D (--no-prune-proteins)
        -P (--deepness)
* Added information to the pout file:
	Number of PSMs, peptides and Proteins below at FDR 1%.
	Pi0s calculated at PSM, peptide and protein level.
	alpha,beta and gamma values for fido.
* Corrected an error in the selection process of the highest
  scoring PSM for each peptide.

v2.03

v2.02
* Added new xml binary serialization schemes in Sqt2pin. It now supports LevelDB + XDR and Boost Serialization + Hash tables.
* Added three new parameters in percolator, "exp-mass",  "empirical-protein-q" and "protein-level-pi0".
* Added output of PEP by default in percolator.
* Bugfix: fixed sqt2pin to accept extra characters in the peptides of the input files.
* Remove some external dependencies and/or libraries.
* Added support to APPLE systems.
* Added support to WINDOWS system through cross-compilation under MINGW.
* Bugfix: Compilation error of sqt2pin in some platforms.
* Removed warnings in the building process.
* Added cross compilation compatibility with Ubuntu-Debian systems (MinGW).
* Improved the building and compilation process.
* Added parameter -M to activate the exp_mass in the ouput of percolator.
* Bugfix: Execution error while creating temporal directories in sqt2pin fixed.
* Created a patch for XSD binaries libraries in MAC.
* Created a patch for XDR serialization in Windows.
* Added an adapted version for percolator of LevelDB and TokyoCabinet libraries.
* Generated packages for MAC,Ubuntu and Fedora systems.
* Generated installer of percolator,elude and sqt2pin for windows systems.
* Added GUI for installers in Windows. Included icons, language options as well as many add-ons.
* Improved the compatibility and robustness of the code.

v2.01
* Bugfix: corrected PSM level statistics for cases when percolator executed w/o -U flag

v2.00
* Added Fido code to infer proteins and calculate protein level assignments (experimental feature)
* Changed the naming scheme for PTMs from *#@ notation to UNIMOD notation. 
* Added a option for Lys-N Processing capability
* Removed bug in sqt2pin that hindered combination of multiple sqt-files using meta-files
* Separation of the code so that we have separate source packages for percolator, its converters, and elude.
* Removed bug in the sqt2pin processing that hindered large file data processing
* Added option in qvality for handling generalized decoys (experimental feature) 

v1.17
* Bugfix for cases where the same peptide occurres both among the target and decoy PSMs

v1.16
* Elude handles both non-modified and posttranslationally modified peptides
* Validation of Percolator's input against local copy of xml schema
* Bugfix for Sqt2pin when invoked with -2 option

v1.15
* New XML input format ("pin") and revised output format ("pout") for percolator.
  Schemas are available in src/xml.
* Unique peptide level q-values are reported alongside PSM level q-values.
* All PSMs from the same fragmentation spectrum end up in the the same cross 
  validation bin
* Output of observed mass for PSMs rather than fragmentation spectrum, to aid
  the processing of FT-ICR data.

v1.14
* Added a weed out redundant PSMs and just keep unique peptides option (-U)
* Trimming the logistic regression conversion chriteria. Also itroduced correct 
weighting during rougness penalty estimation. Both edits will have influence on
  the PEP calculations.
* New sqt format reade for S lines, checking for 9 or 10 fields and if computername set or not
* Added code dealing with in-source CID fragmentation in RT prediction.

v1.13
* Filtering out redundant peptides before retention time regression training
* Bugfix for retention time feature calculation
* Introduced a percolator -r and qvality -o option to redirect stdout to file
  (important in the windows environment).
* Updated percolator xml scheme to include decoy PSMs id -Z switch set

v1.12
* Changed licensing scheme for percolator
* PNGase F feature (option -N) introduced

v1.11
* Bugfix for qvality binning procedure
* Introduced a sqrt(abs(dM)*abs(dRT)) feature for the Description of correct

v1.10
* Changed merging procedure of cross validation sets sio that the
  scores so that the decoy score between the first
  and 10th percentile becomes uniform (rather than first and third
  quantile as previously)
* Added independent train and test set for determining the gamma and C
  parameters in the retention time calculation.
* Corrected a binning procedure bug, who's symptom has been a
  "bad_alloc()" error statement.

v1.09
* Removed bug in the normalization of retention times when using tab
  delimited input.
* Introduced a range limit in the iterative least square procedure used
  in the Posterior Error Probability calculations.
v 1.08
* Retention time and callibration calculations are now available from
  tab delimited files as well.
* Output xml-files according to the definitions in
  http://noble.gs.washington.edu/proj/percolator/model/percolator_out.xsd

v 1.07
* Command line switch to output decoy scores (-B)
* Switch for replacing retention time features with the Klammer et al. features.

v 1.06
* Retention time calculation
* Added features for differenceto mean - retention time, pI and calibration
* Changed cross validation strategy so that only one target and one decoy set should be given as input.
