Hi all,
When I remove the gene version numbers from from the ENSG ID, those genes with the, "_PAR_", suffix e.g.
"ENSG00000002586.20_PAR_Y" "ENSG00000124333.16_PAR_Y" "ENSG00000124334.17_PAR_Y" "ENSG00000167393.18_PAR_Y" "ENSG00000169084.15_PAR_Y"
aren't being removed. I have tried using the following (obtained from stack) with no success
str_replace(rownames(data), pattern = ".[0-9]+$", replacement = "")
gsub("\\..*","", rownames(data))
tools::file_path_sans_ext(rownames(data))
But these troublesome gene versions remain. Any thoughts?
Thanks for the explanations LChart. Regrettably, reassigning is not missing from my script.
It may behoove you to paste the relevant 5-10 lines of code from your script if you want more specific help. All I can say is that the bad behavior you observe is due to something other than the
gsub
command that you posted.