rm(list = ls())
library(tidyverse)
library("DESeq2")
library(ggrepel)
# get count dataset
df<-read.table("CHN_USA_CV_LD_counts_convert",row.names = 1 ,header = T,sep="\t")
df[1:3,1:3]
count_matrix[1:3,1:3]
dim(count_matrix)
#get matrix, get integer
count_matrix <- round(as.matrix(df))
#count_matrix[is.na(count_matrix)] <- 0 #将NA转换成0,which(is.na(count_matrix))查看NA
coldata<-read.table("CHN_USA_CV_LD_coldata",sep="\t",header = T,row.names = 1)
head(coldata)
coldata$condition<-as.factor(coldata$condition)
##check
all(rownames(coldata) %in% colnames(count_matrix))
all(rownames(coldata) == colnames(count_matrix))
#construct DESeqDataSet for DGE analysis
dds <- DESeqDataSetFromMatrix(countData=count_matrix, colData = coldata,
design = ~ condition)
#Pre-filter < 10 reads
dds <- dds[rowSums(counts(dds)) >&#
Deseq2分析差异表达基因
最新推荐文章于 2023-07-03 21:33:58 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)