parse_kegg_brite: Parse Kegg Brite xml files step-by-step

View source: R/parse_kegg_brite.R

parse_kegg_briteR Documentation

Parse Kegg Brite xml files step-by-step

Description

This script is a small utility to parse Kegg Brite XML files and return a regular data frame instead.

Usage

parse_kegg_brite(data)

Arguments

data

a data frame with 5 columns as input

Details

Changes that need to be made to the Kegg XML file before applying the function, simply using a text editor:

- replace double spaces ' ' by tabs '\t' - remove first lines until regular content begins - possibly add some trailing tabs or commas to end of first line (4 to 5) so that read.table knows how many columns to expect - read raw data frame into R using read.table("/path/to/file", fill = TRUE, sep = "\t", row.names = NULL, stringsAsFactors = FALSE, quote = "")


m-jahn/R-tools documentation built on Feb. 5, 2023, 1:05 p.m.