I have a dataframe that has one column with multiple rows in it. Each rows has gene name separated with "|", need i to replace this "|" to new line.
df looks like:
gene
1 EIF2S1|PLEK2
2 IGHV1-45|IGHV1-46|IGHV1-58|IGHV3-33|IGHV3-35|IGHV3-38|IGHV3-43|IGHV3-48|IGHV3-49|IGHV3-53|IGHV4-31|IGHV4-34|IGHV4-39|IGHV4-59|IGHV5-51
3 SERPINA1|SERPINA2
Desired output (need a character vector of list of genes in it):
EIF2S1
PLEK2
IGHV1-45
IGHV1-58
...next-gene
...next-gene
...
...
SERPINA2
Tried so far but not working:
gsub("^|", "", trimws(user_filt))