Learn R Programming

mseapca (version 1.0)

setlabel: Generate binary label matrix of metabolite set

Description

This function generates binary label matrix of metabolite IDs and metabolite sets. This is mainly used to be called by other functions, and used to count the number of metabolites in a specific metabolite set.

Usage

setlabel(M_ID, M)

Arguments

M_ID
metabolite IDs of detected metabolites in data
M
list of metabolite set name and metabolite IDs

Value

binary label matrix of metabolite IDs in metabolite sets

Details

If single peak has multiple metabolite IDs in M_ID, split by "," or ";".

Examples

Run this code
	## M_ID : metabolite IDs, M : metabolite set list
	# L <- setlabel(M_ID,M)	# binary label matrix
	# colSums(L)	# the number of metabolites in each metabolite set

Run the code above in your browser using DataLab