By doing c(size.ok, idx_custom_gmt), we are merging the id's of genesets whose size is OK with the custom ones. Therefore, if a custom gmt has OK size, it will be duplicated.
Solution
Instead of merging vectors, we can use union which will put together all the distinct ids with no duplicates.
Problem
By doing
c(size.ok, idx_custom_gmt)
, we are merging the id's of genesets whose size is OK with the custom ones. Therefore, if a custom gmt has OK size, it will be duplicated.Solution
Instead of merging vectors, we can use
union
which will put together all the distinct ids with no duplicates.