Learn R Programming

utr.annotation (version 1.0.4)

splitRowsIfMultiFeature: Split rows if the feature column(s) contains multiple items, separated by sep

Description

Split rows if the feature column(s) contains multiple items, separated by sep

Usage

splitRowsIfMultiFeature(variantsTable, columnNames, sep = ",")

Arguments

variantsTable

variants table (data.table)

columnNames

a string or a vector of strings that specifies columns need to be checked and splited

sep

separator that is used to seperate items in the column(s)

Value

A new data.table that contains one item in the specified column(s) in each row

Details

splitRowsIfMultiFeature(variants, "Alt"): check column "Alt" to see if any rows have multiple Alt sequences like ATG,TC; if so, split these rows so that one row only has one Alt sequences.