I have two RNAseq read-outs for two groups and would like to compare them. These data appear as a gene and a value. I would like to determine which genes are shared between the two datasets but they are very large and doing this manually will take a long time. Thanks!
Asked
Active
Viewed 213 times
-1
-
2Just use `intersect(colnames(df1), colnames(df2))` – akrun Apr 27 '17 at 10:51
-
What this seems to do is highlight that both columns are called "gene_name". The shared genes will not be aligned – user159107 Apr 27 '17 at 15:20
-
Could be. Your question was also not having any reproducible example or expected output so we don't know exactly what you needed – akrun Apr 27 '17 at 15:24
-
I'm not really sure of the expected output but I was hoping it would be the common gene name, value for dataset1, value for dataset2 – user159107 Apr 27 '17 at 15:58
-
Right so I've used this code and the common genes have been highlighted. What I was hoping for was a table of common genes with their respective values – user159107 Apr 27 '17 at 16:09
1 Answers
1
Use
intersect(genes1, genes2)
and look up the help page for other related and useful functions.

shians
- 955
- 1
- 6
- 21