CandidateVectorSearch 1.7.2
Searching for peptide candidates using sparse matrix + matrix/vector multiplication.
|
All findTopCandidates
functions require four integer arrays as input:
candidatesValues
candidatesIdx
spectraValues
spectraIdx
csrRowoffsets
csrColIdx
spectraValues
spectraIdx
Note that spectraValues
and spectraIdx
is the same for both versions. The following should highlight how to get these arrays.
Consider two peptides with the following ion m/z values:
And the following two spectra with m/z values as given:
The candidatesValues
and csrColIdx
array are the same. They contain all ion m/z values from all peptides concatenated. The values should be multiplied by 100 and rounded to the nearest integer. Note that CandidateVectorSearch only supports m/z values up to 5000 so anything beyond that should be discarded!
The candidatesIdx
array indicates the starting position of every peptide in candidatesValues
. It always contains as many elements as there are peptides!
Analogous to candidatesIdx
the array csrRowoffsets
indicates start and end positions of all peptides in the csrColIdx
array. This follows the CSR format as described here. The csrRowoffsets
array always contains number of peptides + 1 elements!
The spectraValues
array contains all m/z values of all peaks of all spectra. Again the values should be multiplied by 100 and rounded to the nearest integer. Peaks with m/z values greater than 5000 should be discarded!
The spectraIdx
array is analogous to the candidatesIdx
array and contains the indices of where each spectrum starts in spectraValues
. It always contains as many elements as there are spectra.
A code example where functions are called from a C# application is given in here (CPU) and here (GPU).