Skip to content

Commit 10f78c7

Browse files
Merge pull request #373 from theGreatHerrLebert/feature/intensity-variation-timsim-dda
Feature/intensity variation timsim dda
2 parents 70faeb8 + 4ba4b67 commit 10f78c7

3 files changed

Lines changed: 222 additions & 78 deletions

File tree

Lines changed: 118 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,173 @@
11
# TimSim: Proteomics Experiment Simulation on timsTOF
22

3-
Welcome to the `timsim` user manual. This document provides guidance on how to configure and run
4-
proteomics simulations on a virtual timsTOF platform with `timsim`. Each section details a specific group of parameters,
5-
explaining how they influence the simulation and how you can adjust them to model your experiment accurately.
3+
Welcome to the **`timsim` user manual**.
4+
This guide explains how to configure and run proteomics simulations on a virtual timsTOF platform.
5+
Each section details a parameter group, how it influences the simulation, and how to tune it to match your experiment.
66

77
---
88

99
## Table of Contents
1010

11-
1. [Main Settings](#main-settings)
12-
2. [Peptide Digestion Settings](#peptide-digestion-settings)
13-
3. [Peptide Intensity Settings](#peptide-intensity-settings)
14-
4. [Isotopic Pattern Settings](#isotopic-pattern-settings)
15-
5. [Signal Distribution Settings](#signal-distribution-settings)
16-
6. [Noise Settings](#noise-settings)
17-
7. [Charge State Probabilities](#charge-state-probabilities)
18-
8. [Performance Settings](#performance-settings)
19-
9. [Console and Execution](#console-and-execution)
11+
1. [Main Settings](#main-settings)
12+
2. [Peptide Digestion Settings](#peptide-digestion-settings)
13+
3. [Peptide Intensity Settings](#peptide-intensity-settings)
14+
4. [Isotopic Pattern Settings](#isotopic-pattern-settings)
15+
5. [Signal Distribution Settings](#signal-distribution-settings)
16+
6. [Noise Settings](#noise-settings)
17+
7. [Property Variation Settings](#property-variation-settings)
18+
8. [DDA Settings](#dda-settings)
19+
9. [Charge State Probabilities](#charge-state-probabilities)
20+
10. [Performance Settings](#performance-settings)
21+
11. [Console and Execution](#console-and-execution)
2022

2123
---
2224

2325
## Main Settings
2426

2527
### Parameters
26-
- **Save Path**: The directory where all simulation outputs, reports, and logs will be stored.
27-
- **Reference Dataset Path**: The path to a real timsTOF dataset that serves as the template for the simulation’s layout.
28-
- **FASTA File Path**: The location of the FASTA file containing protein sequences to be digested.
29-
- **Experiment Name**: A unique identifier for your simulation. This name is used to label output files and reports.
30-
- **Acquisition Type**: Choose the data acquisition method to simulate. Options include DIA, SYNCHRO, SLICE, and MIDIA.
28+
| Option | Description |
29+
|--------|-------------|
30+
| **Save Path** | Directory where all outputs, reports, and logs are stored. |
31+
| **Reference Dataset Path** | Path to a real timsTOF dataset that provides the template layout. |
32+
| **FASTA File Path** | Location of the FASTA file containing protein sequences. |
33+
| **Experiment Name** | Unique identifier used in output file names. |
34+
| **Acquisition Type** | Choose among **DIA**, **DDA**, **SYNCHRO**, **SLICE**, or **MIDIA**. |
3135

3236
### Options
33-
- **Use Reference Layout**: Use the layout from the reference dataset to mimic realistic instrument parameters.
34-
- **Load Reference into Memory**: Pre-load the reference dataset into RAM to speed up data access during simulation.
35-
- **Sample Peptides**: When enabled, peptides are randomly sampled from the digestion process.
36-
- **Generate Decoys**: Simulate decoy (inverted) peptides as well. Why would you want this? We still search an application!.
37-
- **Silent Mode**: Run the simulation with minimal console output.
38-
- **Apply Fragmentation to Ions**: Perform ion fragmentation during the simulation. This option is enabled by default.
39-
- **Proteome Mixture**: Simulate complex samples by incorporating a mixture of proteomes.
40-
- **Phospho Mode**: Enable phospho mode to generate a phospho-enriched dataset for testing phosphosite localization algorithms.
37+
* **Use Reference Layout** – Mimic realistic instrument parameters from the reference dataset.
38+
* **Load Reference into Memory**Pre-load dataset into RAM for faster access.
39+
* **Sample Peptides** – Random sampling of peptides after digestion.
40+
* **Generate Decoys**Simulate inverted (decoy) peptides.
41+
* **Silent Mode** – Minimal console output.
42+
* **Apply Fragmentation to Ions**Perform ion fragmentation (enabled by default).
43+
* **Proteome Mixture** – Mix multiple proteomes for complex samples.
44+
* **Phospho Mode** – Generate a phospho-enriched dataset.
4145

4246
---
4347

4448
## Peptide Digestion Settings
4549

46-
### Parameters
47-
- **Number of Sampled Peptides**: The total number of peptides generated from the in-silico digestion process.
48-
- **Missed Cleavages**: The maximum number of allowed missed cleavage sites during digestion.
49-
- **Minimum Peptide Length**: The shortest acceptable peptide length (in amino acids).
50-
- **Maximum Peptide Length**: The longest acceptable peptide length (in amino acids).
51-
- **Cleave At**: Specifies the amino acid residues at which the protein is cleaved (e.g., `"KR"` for trypsin).
52-
- **Restrict**: Specifies residues that inhibit cleavage (e.g., `"P"` to prevent cleavage immediately after a cleavage site).
53-
- **Amino Acid Modifications**: The path to a TOML file that defines fixed and variable modifications applied during digestion.
50+
| Parameter | Description |
51+
|-----------|-------------|
52+
| **Number of Sampled Peptides** | Total peptides drawn from the in-silico digest. |
53+
| **Missed Cleavages** | Allowed missed cleavage sites. |
54+
| **Minimum Peptide Length** | Shortest peptide length (aa). |
55+
| **Maximum Peptide Length** | Longest peptide length (aa). |
56+
| **Cleave At** | Cleavage residues (e.g. `KR`). |
57+
| **Restrict** | Residues that block cleavage (e.g. `P`). |
58+
| **Amino Acid Modifications** | Path to TOML file with fixed/variable mods. |
59+
| **Sample Occurrences Randomly** | Toggle random sampling of peptide occurrences. |
5460

5561
---
5662

5763
## Peptide Intensity Settings
5864

59-
### Parameters
60-
Peptide intensity settings are currently simulated with a fixed procedure. If you want to vary the intensity of peptides,
61-
connect to a simulation database and adjust the intensity values there directly. Afterward you can re-run the simulation
62-
using the adapted database as reference.
65+
*Currently simulated with a fixed procedure.*
66+
For custom intensity profiles, edit the simulation database directly and rerun `timsim` with that database as reference.
67+
68+
---
6369

6470
## Isotopic Pattern Settings
6571

66-
### Parameters
67-
- **Maximum Number of Isotopes**: The number of isotopic peaks to simulate for each peptide.
68-
- **Minimum Isotope Intensity**: The threshold intensity below which isotopic peaks are not included.
69-
- **Centroid Isotopes**: When enabled, the simulation averages peak positions to generate a simplified isotopic pattern. This parameter is enabled by default.
72+
| Parameter | Description |
73+
|-----------|-------------|
74+
| **Maximum Number of Isotopes** | How many isotopic peaks to simulate. |
75+
| **Minimum Isotope Intensity** | Threshold below which isotopes are skipped. |
76+
| **Centroid Isotopes** | Average peaks to simplified centroids (enabled by default). |
7077

7178
---
7279

7380
## Signal Distribution Settings
7481

75-
### Parameters
76-
- **Gradient Length**: The total duration of the simulated chromatographic gradient (in seconds).
77-
- **Mean Std RT**: The average standard deviation of the retention time (RT) distribution, which affects peak widths.
78-
- **Variance Std RT**: The variance in the RT standard deviation, influencing the variability of the collection of all peak widths.
79-
- **Mean Skewness**: The average skewness of the RT distribution, which determines the asymmetry of peaks.
80-
- **Variance Skewness**: The variance in the skewness, influencing the variability of the asymmetry of all peaks.
81-
- **Z-Score**: Total amount of signal intensity in the chromatogram that needs to be covered before the numerical integration stops.
82-
- **Target Percentile**: The percentile used to select high-density regions within the RT distribution.
83-
- **Sampling Step Size**: The resolution for sampling the RT distribution; smaller values yield finer detail but require more computational resources.
82+
| Parameter | Description |
83+
|-----------|-------------|
84+
| **Gradient Length** | Total chromatographic gradient length (s). |
85+
| **Mean Std RT / Variance Std RT** | Mean and variance of RT peak widths. |
86+
| **Mean Skewness / Variance Skewness** | Mean and variance of RT peak asymmetry. |
87+
| **Z-Score** | Fraction of total intensity to cover before integration stops. |
88+
| **Target Percentile** | Percentile that defines high-density RT regions. |
89+
| **Sampling Step Size** | RT sampling resolution; smaller = finer detail, slower run. |
90+
8491
---
8592

8693
## Noise Settings
8794

88-
### Parameters
89-
- **Add Noise to Signals**: Enable this option to introduce random noise into signal intensities, mimicking experimental variability.
90-
- **Add Precursor M/Z Noise**: Adds variability to precursor m/z values to simulate instrument measurement precision.
91-
- **Precursor Noise PPM**: Specifies the noise level (in parts per million) for precursor m/z values.
92-
- **Add Fragment M/Z Noise**: Adds noise to fragment m/z values to simulate spectral variation.
93-
- **Fragment Noise PPM**: Specifies the noise level (in parts per million) for fragment m/z values.
94-
- **Use Uniform Distribution for M/Z Noise**: When enabled, m/z noise is sampled from a uniform distribution instead of a Gaussian.
95-
- **Add Real Data Noise**: Incorporate noise profiles derived from real experimental data.
96-
- **Reference Noise Intensity Max**: The maximum intensity threshold for noise derived from reference data.
97-
- **Fragment Downsample Factor**: Sets the relative amount fragment ions are downsampled. Take probability is inversely proportional to their intensity.
95+
| Parameter | Description |
96+
|-----------|-------------|
97+
| **Add Noise to Signals** | Inject random intensity noise. |
98+
| **Add Precursor M/Z Noise** | Variability in precursor m/z values. |
99+
| **Precursor Noise PPM** | Noise level for precursors (ppm). |
100+
| **Add Fragment M/Z Noise** | Variability in fragment m/z values. |
101+
| **Fragment Noise PPM** | Noise level for fragments (ppm). |
102+
| **Use Uniform Distribution for M/Z Noise** | Uniform instead of Gaussian noise. |
103+
| **Add Real Data Noise** | Use noise profiles from real datasets. |
104+
| **Reference Noise Intensity Max** | Max intensity for reference-derived noise. |
105+
| **Fragment Downsample Factor** | Probability to keep fragments inversely ∝ intensity. |
106+
| **Add Noise to Frame / Scan Abundance** | Toggle extra abundance noise. |
107+
108+
---
109+
110+
## Property Variation Settings
111+
112+
Feature-level Gaussian jitter applied *after* deterministic peak shaping and noise modeling. Will only be applied
113+
114+
| Parameter | Default | Description |
115+
|-----------|---------|-------------|
116+
| **RT Variation σ (s)** | `15` | Std-dev of retention-time apex jitter. |
117+
| **Ion-Mobility Variation σ (1/K0)** | `0.008` | Std-dev of ion-mobility jitter. |
118+
| **Intensity Variation σ (relative)** | `0.02` | Relative std-dev applied multiplicatively (≈ ±2 %). |
119+
120+
Set all three to `0` to disable feature jitter completely.
121+
122+
---
123+
124+
## DDA Settings
125+
126+
*Only active when **Acquisition Type** is set to **DDA**.*
127+
128+
| Parameter | Default | Description |
129+
|-----------|---------|---------------------------------------------------------------------------------------------------------------|
130+
| **Precursors Every** | `7` | Distance between MS¹ frames in one cycle (7 = 1 precursor frame followed by 6 fragment frames). |
131+
| **Precursor Intensity Threshold** | `500` | Minimum MS¹ intensity for eligibility. |
132+
| **Max Precursors** | `7` | Hard cap on selected precursors per fragment frame. |
133+
| **Exclusion Width** | `25` | Number of frames the re-acquisition of the same mz range that had been selected should not be selected again. |
134+
| **Selection Mode** | `topN` | `topN` (by intensity) or `random`. |
135+
136+
> *Features in precursor space are currently not detected from raw-data but taken from the simulation tables, and therefore feature detection is de-facto perfect.
137+
> For a more realistic procedure, we are planning to include a feature detection step in the future.*
98138
99139
---
100140

101141
## Charge State Probabilities
102142

103-
### Parameters
104-
- **Binomial Charge Model**: When enabled, the charge state distribution is modeled using a binomial distribution. Only if enabled, the following parameters are considered.
105-
- **Probability of Charge**: The likelihood that a peptide will adopt a particular charge state.
106-
- **Minimum Charge Contribution**: The minimum relative contribution required for peptides with a given charge state to be considered in the simulation.
107-
- **Maximum Charge**: The highest charge state to simulate for peptides.
143+
| Parameter | Description |
144+
|-----------|-------------|
145+
| **Binomial Charge Model** | Uses binomial distribution for charge states. |
146+
| **Probability of Charge** | Success probability in binomial model. |
147+
| **Minimum Charge Contribution** | Min relative contribution for a charge state. |
148+
| **Maximum Charge** | Highest simulated charge state. |
149+
| **Normalize Charge States** | Ensure kept charge states sum to 1. |
108150

109151
---
110152

111153
## Performance Settings
112154

113-
### Parameters
114-
- **Number of Threads**: The number of parallel threads used for the simulation. Use `-1` to auto-detect all available cores.
115-
- **Batch Size**: The number of data points processed in each computational batch.
155+
| Parameter | Description |
156+
|-----------|-----------------------------------------------|
157+
| **Number of Threads** | Parallel threads (`-1` = all cores). |
158+
| **Batch Size** | Number of TimsFrames to be build in parallel. |
116159

117160
---
118161

119162
## Console and Execution (GUI Mode)
120163

121-
### Features
122-
- **Console Output**: Displays real-time logs, warnings, and progress updates during the simulation.
123-
- **Run Button**: Initiates the simulation with the current configuration settings.
124-
- **Cancel Button**: Provides the ability to terminate a running simulation.
125-
- **Save Config**: Allows you to save your current settings to a TOML file for future use.
126-
- **Load Config**: Load a previously saved TOML configuration file to quickly restore your simulation settings.
164+
* **Console Output** – Real-time logs and progress.
165+
* **Run Button** – Starts the simulation with current settings.
166+
* **Cancel Button** – Terminates a running simulation.
167+
* **Save Config** – Store current settings as a TOML file.
168+
* **Load Config** – Restore settings from a saved TOML file.
127169

128170
---
129171

130-
For additional assistance or troubleshooting, please refer to the tooltips within the GUI application or visit our [GitHub repository](https://github.com/theGreatHerrLebert/rustims) for support.
172+
For help or troubleshooting, hover over the in-app tool-tips or visit our
173+
[GitHub repository](https://github.com/theGreatHerrLebert/rustims).

0 commit comments

Comments
 (0)