Crux Frequently Asked Questions

  1. What is the difference between Tide and Comet?
  2. The differences are as follows:

    • Tide converts your FASTA file to an index (either as part of tide-search or by using tide-index), whereas Comet does searching directly from the FASTA file. The indexing step allows Tide to pre-compute many parts of the search procedure, thereby making the search faster.
    • For each match, Comet reports the total number of candidate peptides, whereas Tide reports the number of distinct candidate peptides.
    • Comet provides an option to report an E-value in addition to the raw XCorr score, whereas Tide provides an option to report a p-value. The methods for computing these two statistical confidence measures are quite different.
    • Some options are available only in Comet (various options related to different types of theoretical fragment ions, max_fragment_charge, nucleotide_reading_frame, etc.) whereas others are only available in Tide (e.g., keep-terminal-aminos).

    Overall, for a given set of spectra, the XCorr scores computed by Comet and by Tide should be quite similar to one another, assuming that the various search parameters are set similarly between the two algorithms. Below is a table summarizing the correspondence between the two sets of parameters. The specified values will yield nearly identical XCorr scores from the two search engines.

    Tide parameter Tide value Comet parameter Comet value
    enzyme trypsin search_enzyme_number 1
    digestion full-digest num_enzyme_termini 2
    missed-cleavages 0 allowed_missed_cleavage 0
    min-peaks 10 minimum_peaks 10
    precursor-window 3 peptide_mass_tolerance 3
    precursor-window-type mass peptide_mass_units 0
    fragment-mass mono mass_type_fragment 1
    decoy-format peptide-reverse N/A  
    keep-terminal-aminos C N/A  
    concat T decoy_search 1
    top-match 5 num_results, num_output_lines 6, 5
    remove-precursor-peak T remove_precursor_peak 1
    remove-precursor-tolerance 15 remove_precursor_tolerance 15
    use-flanking-peaks F theoretical_fragment_ions 1
    use-neutral-loss-peaks F use_NL_ions F
    mz-bin-width 1.0005079 fragment_bin_tol 1.0005079
    mz-bin-offset 0.4 fragment_bin_offset 0.4
    min-mass, max-mass 200, 7200 digest_mass_range 200 7200
    N/A   max_fragment_charge 2

    Here is a scatter plot of XCorr scores from a search run with the parameters listed above:

  3. What operating systems does Crux work with?
  4. Crux is written in C++, so in principle it should work on virtually any modern operating system. We provide pre-compiled binaries for Linux, MacOS and Windows.

  5. When I try to run Crux on my Linux system I get error messages like:
        /tmp/crux: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /tmp/crux)
        /tmp/crux: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /tmp/crux)
        /tmp/crux: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /tmp/crux)p
        

    Crux depends on the C and C++ runtime libraries; however, newer versions of the runtime libraries are not backwards compatible with older versions. We build the Linux binary distributions for Crux using GCC 4.9. If your Linux system dates from before GCC 4.9 was available, then it may have versions of the runtime library that are incompatible with the Crux binary distribution. In this case, you might consider updating your operating system. Alternatively, you can build Crux from the source code distribution. To build Crux from source you'll ned to install the C/C++ development tools, and CMake. This can conveniently be done using yum
        sudo su -
        yum group install "Development Tools"
        yum install cmake
        

    Then follow the instructions in the in the installation tutorial.
  6. How does Crux compute the masses of peptides and peptide fragments?
    • Each amino acid can be characterized either by its monoisotopic mass, which is the mass of the most abundant isotopic form of that amino acid, or the average mass, which is a weighted average of the masses of all the isotopic forms. By default, Crux uses average mass to calculate peptide masses, though this behavior can be controlled by the isotopic-mass option to tide-index and the mass_type_parent option to comet. For fragments, tide-search always uses the monoisotopic mass, whereas comet allows selection via mass_type_fragment.
    • The neutral mass of a peptide is not the sum of the masses of its amino acids. The N-terminus and C-terminus of the peptide together contribute an additional water molecule, whose mass is either 18.010564684 Da (monoisotopic) or 18.0153 Da (average).
    • A charged peptide has an additional approximately 1 Da mass for each charge, corresponding to the mass of a hydrogen atom. The exact mass to be added depends on whether we are using the monoisotopic mass (1.007825035) or average mass (1.00794).
    • When a peptide fragments, each b-ion will have a mass equal to the sum of its amino acids plus one hydrogen for each charge on the fragment, while each y-ion will have a mass equal to the sum of its amino acids plus water plus one hydrogen for each charge on the fragment.
    • By default, both Tide and Comet add a static modification of 57.021464 Da to all cysteines. This is because in most protein preparation protocols the peptides are alkylated with iodoacetamide, resulting in carbamidomethylation of cysteine. The alkylation step prevents the reformation of disulfide bonds. Other alykylation reagents may be used, in which case the appropriate mass shift can be specified with the C=[mass] option to tide-index or the add_C_cysteine option to comet.

  7. How does Crux assign fragment masses to bins prior to computing the XCorr score?
  8. The XCorr score is essentially a dot product between a preprocessed form of the observed spectrum and the theoretical spectrum derived from the candidate peptide. In order to compute this dot product, the masses of the fragments in both spectra are assigned to discrete mass bins. This can be viewed as a form of rounding, but with more control over the discrete masses. Two parameters, mz-bin-width and mz-bin-offset, control the size and location of the bins, and are used to convert fragment masses according to this formula:

    binned mass = floor( ( original mass / bin-width ) + 1.0 - bin-offset )

    The default values bin-width=1.0005079 and bin-offset=0.40 are suitable for most low-resolution datasets.

  9. How does Crux estimate the possible charge states of the peptides when the information is not provided within the spectra file?
  10. Crux calculates the ratio of two values: (1) the sum of the intensities from the peaks in the fragmentation spectrum whose m/z is greater than the precursor m/z versus (2) the sum of the peaks whose m/z is smaller than the precursor. If this ratio is greater than or equal to a calculated threshold based upon the location of the precursor m/z and the max m/z in the spectrum, Crux then assigns both +2 and +3 as possible charge states to the spectrum. Otherwise, Crux assigns +1 as the charge state. The algorithm is based upon the observation that fragmentation spectra collected from +1 peptides should have no peaks above the precursor m/z. In contrast, a peptide of charge state greater than +1 can generate fragment ions of lower charge whose m/z is greater than the precursor m/z, thus indicating a multiply charged precursor.

    Note that, in addition, comet includes a precursor_charge parameter. If the first number in this parameter is set to 0, i.e., precursor_charge = 0 0, then the charge state rule above is applied. However, if a user specifies a precursor charge range, i.e., precursor_charge = 1 5, then Comet will search every spectrum through this range of assumed charge states for every spectrum whose precursor charge is unknown.

  11. How does Crux create peptides from the given set of proteins in the database?
  12. The options enzyme (for tide-index) and search_enzyme_number (for comet) define the enzymatic cleavage rules. When enzyme=no-enzyme or search_enzyme_number=0, then any subsequence of a protein may be considered as a candidate peptide. For other values of these parameters, the residues at the termini of the protein subsequence must follow specific rules. For example, trypsin requires that the preceeding residue must be an R or K and the following residue may not be a P.

    When digestion=full-digest (for tide-index) or num_enzyme_termini=2 (for comet), then these rules must be true at both ends of the peptide. When it is digestion=partial-digest or num_enzyme_termini=1, then the rules must be true at at least one of the ends. The missed-cleavages and allowed_missed_cleavages parameters control the maximum number of cleavage sites that may lie within the peptide sequence.

    Note that if enzyme=no-enzyme or search_enzyme_number=0, then the digestion, num_enzyme_termini, missed-cleavages and allowed_missed_cleaveages parameters are not used.

  13. How does Crux select candidate peptides from the database?
  14. The Crux search tools (tide-index and comet) select candidate peptides for each spectrum based on its precursor singly charged mass (m+h) or the mass-to-charge (m/z) and an assumed charge state (specified in the input file). If the m+h and charge is provided in the input file (e.g., from the Z lines of an MS2 file), then the precursor mass is calculated from the m+h minus the mass of a proton. Otherwise, the precursor mass is calculated from the precursor m/z and an assumed charge. A mass window is defined in one of three ways based on the precursor-window-type and precursor-window options.

    • If the precursor-window-type is set to mz, then the window is calculated as spectrum precursor m/z ± precursor-window and the resulting range is converted to mass using the charge state with the formula:
      Mass=m/z * charge - MASS_PROTON * charge, where MASS_PROTON=1.00727646677
    • If the precursor-window-type is set to mass, then the window is defined as the precursor mass ± precursor-window.
    • If the precursor-window-type is set to ppm (parts per million), then the window spans from the precursor mass / (1.0 + window * 1e-6) to precursor mass / (1.0 - window * 1e-6).

    Candidate peptides are those whose mass falls within the defined window. The peptide mass is computed as the sum of the average amino acid masses plus 18 Da for the terminal OH group. Candidate peptides can also be constrained by minimum and maximum allowed length.

  15. How do Tide and Comet handle combinations of static and variable modifications, as well as n-terminal modifications?
  16. Although the syntax for specifying amino acid modifications differs between Comet and Tide, the logic of how those modifications are applied is similar.

    First, it's important to understand that the search tools support several different types of modifications. A static modification is one that applies to every occurrence of an amino acid, whereas a variable modification means that the amino acid can occur in either form (modified or unmodified). Furthermore, unlike standard modifications that occur on amino acid side-chains, a terminal modification is applied to the molecular group at the N- or C-terminus of a peptide or protein. Typically, protein terminal modifications correspond to biological events, whereas peptide terminal modifications (which by definition must be applied after enzymatic digestion) are produced by the experimental workflow.

    Conceptually, all static modifications (standard ones and terminal ones) are applied first. Thereafter, variable modifications are applied on top of static modifications. Any side-chain or terminus can harbor at most one variable modification and one static modification. Hence, it is an error to (try to) specify two different static modifications for the same type of residue, but perfectly legal to specify multiple variable modifications for the same residue.

    In the search engine output, you will see the unmodified peptide (e.g., K[-16.9981]VLGHIR in Comet's "plain_peptide" column) and the peptide with variable modifications indicated in brackets (e.g., K[-16.9981]VLGHIR in Comet's "peptide" column and Tide's "sequence" column). The full set of modifications (including static modifications) is specified as a comma-separated list in the "modifications" column, like this: 1_S_45.0294,1_S_45.0239_n,1_V_-16.9981. This specification indicates that the first amino acid has a standard static modification of 45.0294 as well as a static n-terminal modification of 45.0239. In addition, the same residue has a variable modification of -16.9981.

    Note that Comet allows slightly more flexibility than Tide in specifying different types of modifications. Terminal modifications in Comet can be specified to occur within a range of amino acids near the terminus. Also, via the "binary set" flag, a modification can be required to appear on all or none of the residues in a given peptide.

  17. What happens if I decrease the size of the precursor window during searching?
  18. Reducing the precursor mass tolerance has two main benefits. One is reduced search time, and the other is improved statistical power to detect matches. With a smaller window, fewer candidates are tested against a spectrum. As a result, the statistical confidence measure calculated after multiple testing correction will be more significant. Of course, the flipside is that if you make the precursor window too small, then you may end up throwing out correct identifications. Control over the size of the window is provided by the using the precursor-window and precursor-window-type options.

  19. How can I run many jobs in parallel?
  20. In combination with GNU parallel, parallelization of Crux can be achieved rather painlessly. For example, to run tide-search on a set of spectrum files, you can just get your spectra files into a filelist:

    find . -name "*.mzXML" > file.list
        

    Then, with a bit of bash magic, run parallel as follows (assuming there are 100 files in file.list):

    parallel --xapply crux tide-search <options> --fileroot {1} {2} database.db ::: $(seq 1 100) ::: $(cat file.list)
        

    Thanks to Ben Temperton for this answer.

  21. How can I search my isotopically labeled data with Tide or Comet?
  22. Isotopically labeled data is accommodated by specifying various static or variable modifications. The specific types of modifications differ according to the labeling scheme, and the syntax for specifying the modifications differs between Tide (which uses options like --mods-spec) and Comet (which uses options like add_Nterm_peptide). In each of the following entries, we provide first the Tide options, followed by the Comet options.

    iTRAQ 4-plex:

    --mods-spec K+144.10253 --nterm-peptide-mods-spec X+144.10253

    add_Nterm_peptide = 144.10253
    add_K_lysine = 144.10253
    clear_mz_range = 113.5 117.5

    The 4-plex reagent has different monoisotopic mass values for 114 (144.105918), 115 (144.09599), and 116/117 (144.102063). The mass value used above is derived from averaging the three monoisotopic masses.

    iTRAQ 8-plex:

    --mods-spec K+304.2022 --nterm-peptide-mods-spec X+304.2022

    add_Nterm_peptide = 304.2022
    add_K_lysine = 304.2022
    clear_mz_range = 112.5 121.5

    The mass modification above is the average of the two different set of masses for 115/118/119/121 (304.199040) and 113/114/116/117 (304.205360).

    TMT 2-plex:

    --mods-spec K+225.155833 --nterm-peptide-mods-spec X+225.155833

    add_Nterm_peptide = 225.155833
    add_K_lysine = 225.155833
    clear_mz_range = 125.5 127.5

    TMT 6-plex:

    --mods-spec K+229.162932 --nterm-peptide-mods-spec X+229.162932

    add_Nterm_peptide = 229.162932
    add_K_lysine = 229.162932
    clear_mz_range = 127.5 131.5

    SILAC 4Da:

    There are a number of different SILAC reagents with a ~4 Da modification (based on combinations of C13 and N15), each with different sites of specificity. The example below is for the 15N(4) reagent applied to R residues. You should adjust the modification mass and residue(s) applied to as necessary.

    To perform a mixed light/heavy search using a variable modification search:

    --mods-spec 3R+3.988140

    variable_mod01 = 3.988140 R 1 3 -1 0 0

    Note that, in the example above, Comet operates in “binary” mode, which means that it only considers peptides in which all or none of the lysine residues are light/heavy. Tide does not support binary mode searching, so it will consider all peptides with up to 3 (in the above specification) heavy lysines.

    To search just the heavy labeled sample, you can apply a static modification:

    --mods-spec R+3.988140

    add_K_lysine = 3.988140

    SILAC 6Da:

    This example uses the 13C(6) SILAC mass, assuming it is applied to both K and R. You should adjust as necessary. There is at least one more SILAC reagent with ~6 Da modification mass and different residue specificity: 13C(5) 15N(1)

    To perform a mixed light/heavy search using a variable modification:

    --mods-spec 3KR+6.020129

    variable_mod01 = 6.020129 KR 1 3 -1 0 0

    To search just the heavy labeled sample, you can apply a static modification:

    --mods-spec KR+6.020129

    add_K_lysine = 6.020129
    add_R_arginine = 6.020129

    SILAC 8Da:

    The example below is for 13C(6) 15N(2) on K residues. Variable modification search:

    --mods-spec 3K+8.014199

    variable_mod01 = 8.014199 K 1 3 -1 0 0

    Static modification for just the heavy labeled search:

    --mods-spec K+8.014199

    add_K_lysine = 8.014199

    100% 15N label:

    The N15 labeling adds 0.997035 mass difference for every nitrogen in each amino acid. So for a 100% N15 analysis, specify a static modification (between 1 and 4) to every amino acid residue, like this:

    --mods-spec A+0.997035,C+0.997035,D+0.997035,E+0.997035,F+0.997035,G+0.997035,H+2.99111,I+0.997035,K+1.99407,L+0.997035,M+0.997035,N+1.99407,P+0.997035,Q+1.99407,R+3.98814,S+0.997035,T+0.997035,V+0.997035,W+1.99407,Y+0.997035

    add_G_glycine = 0.997035               # added to G - avg.  57.0513, mono.  57.02146
    add_A_alanine = 0.997035               # added to A - avg.  71.0779, mono.  71.03711
    add_S_serine = 0.997035                # added to S - avg.  87.0773, mono.  87.03203
    add_P_proline = 0.997035               # added to P - avg.  97.1152, mono.  97.05276
    add_V_valine = 0.997035                # added to V - avg.  99.1311, mono.  99.06841
    add_T_threonine = 0.997035             # added to T - avg. 101.1038, mono. 101.04768
    add_C_cysteine = 0.997035              # added to C - avg. 103.1429, mono. 103.00918
    add_L_leucine = 0.997035               # added to L - avg. 113.1576, mono. 113.08406
    add_I_isoleucine = 0.997035            # added to I - avg. 113.1576, mono. 113.08406
    add_N_asparagine = 1.99407             # added to N - avg. 114.1026, mono. 114.04293
    add_D_aspartic_acid = 0.997035         # added to D - avg. 115.0874, mono. 115.02694
    add_Q_glutamine = 1.99407              # added to Q - avg. 128.1292, mono. 128.05858
    add_K_lysine = 1.99407                 # added to K - avg. 128.1723, mono. 128.09496
    add_E_glutamic_acid = 0.997035         # added to E - avg. 129.1140, mono. 129.04259
    add_M_methionine = 0.997035            # added to M - avg. 131.1961, mono. 131.04048
    add_O_ornithine = 1.99407              # added to O - avg. 132.1610, mono  132.08988
    add_H_histidine = 2.99111              # added to H - avg. 137.1393, mono. 137.05891
    add_F_phenylalanine = 0.997035         # added to F - avg. 147.1739, mono. 147.06841
    add_U_selenocysteine = 0.997035        # added to U - avg. 150.3079, mono. 150.95363
    add_R_arginine = 3.98814               # added to R - avg. 156.1857, mono. 156.10111
    add_Y_tyrosine = 0.997035              # added to Y - avg. 163.0633, mono. 163.06333
    add_W_tryptophan = 1.99407             # added to W - avg. 186.0793, mono. 186.07931
    add_B_user_amino_acid = 0.0000         # added to B - avg.   0.0000, mono.   0.00000
    add_J_user_amino_acid = 0.0000         # added to J - avg.   0.0000, mono.   0.00000
    add_X_user_amino_acid = 0.0000         # added to X - avg.   0.0000, mono.   0.00000
    add_Z_user_amino_acid = 0.0000         # added to Z - avg.   0.0000, mono.   0.00000
    

    If you need to adjust the cysteine mass to account for carboxyamidomethylation, then use 58.018499 instead of 0.997035 for C.

    --mods-spec A+0.997035,C+58.018499,D+0.997035,E+0.997035,F+0.997035,G+0.997035,H+2.99111,I+0.997035,K+1.99407,L+0.997035,M+0.997035,N+1.99407,P+0.997035,Q+1.99407,R+3.98814,S+0.997035,T+0.997035,V+0.997035,W+1.99407,Y+0.997035

    add_C_cysteine = 0.997035
    

  23. How can I contribute to Crux?
  24. Patches implementing new features can be emailed to the development team at crux-support@uw.edu for review and inclusion in subsequent releases of Crux.

  25. Where does the name "Crux" come from?
  26. Thin air. The name is not an acronym or a reference to anything in particular.