This vignette describes the main processing function. It assumes you already checked the previous basic steps.
Compare peaks to features
To do so, you will need:
- A previously generated mzmine features’ table
Then, you should be able to run
process_compare_peaks(show_example = TRUE)
#> loading MS data
#> Loading example MS file in memory, doing it on disk will be more efficient
#> loading chromatograms
#> loading name
#> loading feature table
#> preparing features
#> selecting 10 random features for the example
#> ... preparing features
#> ... keeping features above desired intensity only
#> setting joining keys
#> preprocessing chromatograms
#> preprocessing cad chromatograms
#> harmonizing names
#> improving chromatograms
#> baselining chromatograms
#> preprocessing peaks
#> preprocessing cad peaks
#> joining peaks
#> joining within given rt tolerance
#> selecting features outside peaks
#> splitting by file
#> splitting by peak
#> normalizing chromato
#> preparing peaks chromato
#> preparing rt
#> preparing mz
#> processing cad peaks
#> extracting ms chromatograms (longest step)
#> count approx 1 minute per worker per 1000 features (increasing with features number)
#> varies a lot depending on features distribution
#> CAD Peak: 1
#> ■■■■ 9% | ETA: 1m
#> CAD Peak: 2
#> ■■■■■■ 18% | ETA: 1m
#> CAD Peak: 3
#> ■■■■■■■■■ 27% | ETA: 1m
#> CAD Peak: 4
#> ■■■■■■■■■■■■ 36% | ETA: 50s
#> CAD Peak: 5
#> ■■■■■■■■■■■■■■■ 45% | ETA: 43s
#> CAD Peak: 6
#> ■■■■■■■■■■■■■■■■■ 55% | ETA: 36s
#> CAD Peak: 7
#> ■■■■■■■■■■■■■■■■■■■■ 64% | ETA: 28s
#> CAD Peak: 8
#> ■■■■■■■■■■■■■■■■■■■■■■■ 73% | ETA: 22s
#> CAD Peak: 9
#> ■■■■■■■■■■■■■■■■■■■■■■■■■■ 82% | ETA: 14s
#> CAD Peak: 10
#> ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 91% | ETA: 7s
#> CAD Peak: 11
#> extracting ms peaks
#> comparing peaks
#> selecting features with peaks
#> there are 13 features - peaks pairs
#> summarizing comparison scores
#> there are 13 scores calculated
#> joining
#> final aesthetics
#> checking export directory
#> exporting
And this basically it! 🚀
Pseudo chromatograms
If you know want to add some cosmetics, and you already have a TIMA annotation table, you can then run:
plots_list <- generate_pseudochromatograms(show_example = TRUE)
The different plots offer the following views:
Tabular reports
If you prefer tables rather than figures, you can also:
tables_list <- generate_tables(show_example = TRUE)
This will export the table as CSV and/or HTML. A small preview of the HTML table is presented below:
tables_list$pretty_table
For some other available helper functions, we now recommend you to read the next vignette.