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"

y1zhou/brendaDb documentation built on July 24, 2021, 7:14 p.m.