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