Last data update: 2014.03.03

R: Convert metabolite set / list to XML format
list2xmlR Documentation

Convert metabolite set / list to XML format

Description

This function converts metabolite set (list to XML format).

Usage

list2xml(filepath, M)

Arguments

filepath

file path of metabolite set (original file)

M

list of metabolite set and metabolite IDs

Details

The "filepath" is only used for writing a original path in XML.

Value

XML format of metabolite set

Author(s)

Hiroyuki Yamamoto

Examples

	# ---------------------------------
	#  Convert KEGG's tar.gz to list
	# ---------------------------------
	# filepath <- "C:/hsa.tar.gz"		# location of original files of metabolite set
	# Z <- pathway_class(filepath)		# making metabolite set list
	# L <- list2xml(filepath, Z)		# xml format

	# ----------------------
	#  Convert csv to list
	# ----------------------
	# filepath <- "C:/pathway.csv"		# csv file
	# Z <- csv2list(filepath)		# csv file to list
	# L <- list2xml(filepath, Z)		# xml format

	# ----------------------
	#  Convert list to xml
	# ----------------------
	# savefile <- "kegg_test.xml"		# set filename (XML)
	# fullpath <- paste(dirname(filepath),savefile,sep="/")	# fullpath of saved XML file
	# saveXML(L,fullpath)			# save XML

Results