I tried to make a basic scatter plot with R using gene expression data.
#import data:
oldmice <- read.table("oldmice.txt", header = TRUE)
youngmice <- read.table("youngmice.txt", header = TRUE)
Imported data contains: format is the same for both imported data but MGE has different values.
gene MGE
Sox17 -6.74193774617653
Mrpl15 -0.212567471203473
Lypla1 -0.711251006455475
and so on..
Made basic volcano plot using: youngmice$MGE vs oldmice$MGE
plot(oldmice$MGE, youngmice$MGE, main="old vs young mice!!",
xlab="oldmice$MGE ", ylab="youngmice$MGE ", pch=19)
My question is how to color "genes" which is in multiple_gene_lists into oldmice$MGE, youngmice$MGE? (which should label the only multiple_gene_list which are in multiple_gene_lists into oldmice$MGE, youngmice$MGE)
Here is my multiple_gene_list
multiple_gene_list <- read.table("multiple_gene_list.txt", header = TRUE)
multiple_gene_list <- as.vector(multiple_gene_list )
multiple_gene_list contains:
gene
Six6
Arl2
Tmem74B
Rab9B
Rasgef1B
Ccne1
Apln
Spag7
C17Orf59
Krtap4-4
And my goal is to only label multiple_gene_list in oldmice$MGE, youngmice$MGE. I also tried the following code but failed!
with(subset(ASC_oldmice_exprs, ASC_oldmice_exprs$gene %in% multiple_gene_list$gene), points(ASC_youngmice_exprs$MGE, pch=20, col="red"))
Thank you!