-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathicgc
29 lines (24 loc) · 794 Bytes
/
icgc
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
26
27
28
29
library(readr)
library(limma)
library(tidyverse)
setwd('H:\\迅雷下载\\icgc-dataset-1618818706447\\sam')
rt<-read_tsv('exp_seq.tsv')
rt1<-select(rt,c('icgc_donor_id','gene_id','normalized_read_count'))
rt1%>%
group_by(icgc_donor_id) %>%
mutate(id=1:n()) %>%
spread(icgc_donor_id,normalized_read_count)->rt2
rt2$id<-NULL
rm(rt,rt1)
rt=as.matrix(rt2)
rownames(rt)=rt[,1]
exp=rt[,2:ncol(rt)]
dimnames=list(rownames(exp),colnames(exp))
data=matrix(as.numeric(as.matrix(exp)),nrow=nrow(exp),dimnames=dimnames)
data=avereps(data)
data=data[rowMeans(data)>0.4,]
rm(rt,rt2,exp,dimnames)
data<-as.data.frame(data)
data$id<-rownames(data)
data1<-filter(data,id==c('FGF14-AS2','LINC01082','LINC02041'))
mer<-intersect(data$id,c('FGF14-AS2','LINC01082','LINC02041'))