ParseProteinNum: Parse protein information strings or reference strings.

Description Usage Arguments Value Examples

View source: R/parse-helper.R

Description

Given a string like "#1,45,72#", parse into a character vector of c("1", "45", "72"). Consecutive commas are collapsed into one, and spaces are treated as commas.

Usage

1

Arguments

x

A string in the format of "#1#" or "#1,2,3#" or "<1,3>".

type

Either "protein" or "reference".

Value

A string, or a vector of strings of protein numbers.

Examples

1
2
3
4
brendaDb:::ParseProteinNum("#1,2,3#", "protein")
# [1] "1,2,3"
brendaDb:::ParseProteinNum("<123>", "reference")
# [1] "123"

brendaDb documentation built on Nov. 8, 2020, 5:16 p.m.