-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrna.r
25 lines (18 loc) · 887 Bytes
/
rna.r
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## I need to push the previous chunk of code
## Just the part of ENSBL Convertion
library(data.table)
library("dplyr")
data<-fread("~/Downloads/SUvsF1.stats.csv")
genes<-data$V1
colnames(data)[1]<-"gene_id"
gene_IDs <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol","description"),
values = genes, mart= mart)
data<-left_join(data, gene_IDs, by = c("gene_id"="ensembl_gene_id"))
write.csv(data,file="~/Desktop/SUvsF1.stats.csv",quote=F,row.names=F)
data<-fread("~/Downloads/PSvsF1.stats.csv")
genes<-data$V1
colnames(data)[1]<-"gene_id"
gene_IDs <- getBM(filters= "ensembl_gene_id", attributes= c("ensembl_gene_id","hgnc_symbol","description"),
values = genes, mart= mart)
data<-left_join(data, gene_IDs, by = c("gene_id"="ensembl_gene_id"))
write.csv(data,file="~/Desktop/PSvsF1.stats.csv",quote=F,row.names=F)