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

1
setlabel(M_ID, M)

Arguments

M_ID

metabolite IDs of detected metabolites in data

M

list of metabolite set name and metabolite IDs

Details

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

Value

binary label matrix of metabolite IDs in metabolite sets

Author(s)

Hiroyuki Yamamoto

Examples

1
2
3
	## 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