GPL23159平台注释,提取字符串
data<-data.table::fread("GPL23159-69552.txt")
data1<-data[,c(1,10)]
pattern <- ".*\\((?<ID>[A-Za-z0-9]*)\\),.*"
res <- stringr::str_match(string = data1$SPOT_ID, pattern = pattern)
data1$gene <- res[,2]
gene<-data1
write.table(gene,"C:\\Users\\SunNa\\Desktop\\gene.txt")
网友评论