R/utils.R
hasSpectraOrChromatograms.Rd
Helper functions to check whether raw files contain spectra or chromatograms.
hasSpectra(files)
hasChromatograms(files)
A character()
with raw data filenames.
A logical(n)
where n == length(x)
with TRUE
if that
files contains at least one spectrum, FALSE
otherwise.
f <- msdata::proteomics(full.names = TRUE)[1:2]
hasSpectra(f)
#> /__w/_temp/Library/msdata/proteomics/MRM-standmix-5.mzML.gz
#> FALSE
#> /__w/_temp/Library/msdata/proteomics/MS3TMT10_01022016_32917-33481.mzML.gz
#> TRUE
hasChromatograms(f)
#> /__w/_temp/Library/msdata/proteomics/MRM-standmix-5.mzML.gz
#> TRUE
#> /__w/_temp/Library/msdata/proteomics/MS3TMT10_01022016_32917-33481.mzML.gz
#> TRUE