STRSPLITCOL - winkusch/Easy2 GitHub Wiki

Splits each column entry according to a defined character string and creates a new column containing only the i th result of the string spit.

FUNCTION PARAMETER DEFAULT DESCRIPTION
STRSPLITCOL --colSplit column used for split
STRSPLITCOL --strSplit string on which th einput will be split
STRSPLITCOL --numSplitIdx -1
STRSPLITCOL --colOut NewCol Name of the added column.

Say column colSplit equals array c(β€œchr1_111”, β€œchr2_222”):

  • With β€œ--strSplit _β€œ and β€œ--numSplitIdx 1”, the new column c(β€œchr1”,”chr2”) will be created
  • With β€œ--strSplit _β€œ and β€œ--numSplitIdx 2”, the new column c(β€œ111”,”222”) will be created

Example (to obtain "chr" from "chr:pos"):
STRSPLITCOL --colSplit chrpos --strSplit : --numSplitIdx 1 --colOut chr