7 Influenza DGE DESeq2
7.1 Transcriptome - DESeq2 - Females
7.1.2 Data
Unknown = female
SampleInfo <-
read.csv("Input Files/metadata.csv",
stringsAsFactors = FALSE) %>%
mutate(year=as.factor(year)) %>%
filter(!sex=="male") %>%
mutate(RNA = ifelse(disease_stage == "acute", "viruspos",
ifelse(disease_stage == "peak", "viruspos", "virusneg")))
Raw <- read.csv(file = "Output Files/txome_genecounts_locid_nohemo.csv",
stringsAsFactors = FALSE,
header = TRUE,
row.names = 1) %>%
select(SampleInfo$sample)
SampleInfo <-
SampleInfo %>%
column_to_rownames(var="sample")
7.1.4 Influenza Stage
7.1.4.4 Test for differentially expressed genes
cooksCutoff = results function automatically flags genes that contain a Cook’s distance above a cutoff for samples which have 3 or more replicates
dds <- DESeq(dds)
results_acute <-
results(dds, contrast=c("disease_stage", "acute", "control"),
cooksCutoff=FALSE) %>%
as.data.frame() %>%
rownames_to_column(var="gene")
results_peak <-
results(dds, contrast=c("disease_stage", "peak", "control"),
cooksCutoff=FALSE) %>%
as.data.frame() %>%
rownames_to_column(var="gene")
results_late <-
results(dds, contrast=c("disease_stage", "late", "control"),
cooksCutoff=FALSE) %>%
as.data.frame() %>%
rownames_to_column(var="gene")
7.2 Genome - DESeq2 - Females
7.2.2 Data
Unknown = female
SampleInfo <-
read.csv("Input Files/metadata.csv",
stringsAsFactors = FALSE) %>%
mutate(year=as.factor(year)) %>%
filter(!sex=="male") %>%
mutate(RNA = ifelse(disease_stage == "acute", "viruspos",
ifelse(disease_stage == "peak", "viruspos", "virusneg")))
Raw <- read.csv(file = "Output Files/gnome_genecounts_locid_nohemo.csv",
stringsAsFactors = FALSE,
header = TRUE,
row.names = 1) %>%
select(SampleInfo$sample)
SampleInfo <-
SampleInfo %>%
column_to_rownames(var="sample")
7.2.4 Influenza Stage
7.2.4.4 Test for differentially expressed genes
cooksCutoff = results function automatically flags genes that contain a Cook’s distance above a cutoff for samples which have 3 or more replicates
dds <- DESeq(dds)
results_acute <-
results(dds, contrast=c("disease_stage", "acute", "control"),
cooksCutoff=FALSE) %>%
as.data.frame() %>%
rownames_to_column(var="gene")
results_peak <-
results(dds, contrast=c("disease_stage", "peak", "control"),
cooksCutoff=FALSE) %>%
as.data.frame() %>%
rownames_to_column(var="gene")
results_late <-
results(dds, contrast=c("disease_stage", "late", "control"),
cooksCutoff=FALSE) %>%
as.data.frame() %>%
rownames_to_column(var="gene")