Annotate mmo$feature_info with MS2 presence and MS2 block counts from an MGF
annotate_feature_info_ms2_from_mgf.RdScan an .mgf file and summarize MS/MS availability for each feature in
mmo$feature_info. The function adds two columns:
ms2:TRUEif the MGF contains at least oneMSLEVEL=2block for thatid; otherwiseFALSE.count_ms2: number ofMSLEVEL=2blocks for thatid.
Usage
annotate_feature_info_ms2_from_mgf(
mmo,
mgf_path,
chunk_lines = 100000L,
overwrite = FALSE,
verbose = TRUE
)Arguments
- mmo
An ecomet
mmoobject containing a requiredfeature_infotable with anidcolumn (mmo$feature_info$id).- mgf_path
Character. Path to the input
.mgffile.- chunk_lines
Integer. Number of lines read per iteration. Larger values are typically faster but use more memory. Default is
100000L.- overwrite
Logical. If
FALSE(default) andms2and/orcount_ms2already exist inmmo$feature_info, the function errors. Setoverwrite = TRUEto replace existing columns.- verbose
Logical. If
TRUE(default), prints a brief summary of how many MS2 blocks were found and how many features have MS2.
Value
The updated mmo object with mmo$feature_info$ms2 and
mmo$feature_info$count_ms2 added (or overwritten if overwrite = TRUE).