I just start learning bioinformatics from RNA-seq/DEGs. I am trying to replicate an article. I very much appreciate any help. I used salmon in combination with tximport and DESeq2. PCA plot showed 77%PC1 8%PC2. Apparently, different conditions are mixed and not well separated. Is it healthy to continue this analysis?
library(tidyverse)
library(tximport)
library(DESeq2)
sample_table <- read.csv("SraTable.txt") %>% arrange(sample_table$Run) %>% select(Run)
sample_table$Run <- c("pre_ischemia1","ischemia1","pre_ischemia2","ischemia2","pre_ischemia3", "ischemia3","pre_ischemia4","ischemia4","pre_ischemia5","ischemia5")
SRR10700832_quant/quant.sf sample_files <- paste0(c("SRR10700832_quant","SRR10700833_quant","SRR10700835_quant","SRR10700836_quant","SRR10700838_quant", "SRR10700839_quant","SRR10700841_quant","SRR10700842_quant","SRR10700844_quant","SRR10700846_quant"), "/quant.sf")
names(sample_files) <- pull(sample_table, Run)
gene_map <- read.csv("gene_map.csv", col.names = c("enstid", "ensgid"))
count_data <- tximport(files = sample_files, type="salmon", tx2gene= gene_map, ignoreTxVersion = TRUE)
sample_table <- as.data.frame(sample_table)
sample_table$condition <- factor(rep(c("pre_ischemia", "ischemia"), times=5), levels = c("pre_ischemia", "ischemia"))
deseq_dataset <- DESeqDataSetFromTximport(txi= count_data, colData = sample_table, design = ~condition)
deseq_dataset <- DESeq(deseq_dataset)
vst <- varianceStabilizingTransformation(deseq_dataset)
plotPCA(vst, intgroup='condition')
results <- results(deseq_dataset)
summary(results)
res <- results(deseq_dataset)
yielded following;
out of 38464 with nonzero total read count
adjusted p-value < 0.1
LFC > 0 (up) : 1, 0.0026%
LFC < 0 (down) : 0, 0%
outliers [1] : 263, 0.68%
low counts [2] : 0, 0%
(mean count < 0)
[1] see 'cooksCutoff' argument of ?results
[2] see 'independentFiltering' argument of ?results
There is only 1 gene upregulated, zero down and zero low counts which are not likely. Which step could be the problem ? I would like to know sanity checkpoint in the entire flow.
Thank you for your time
P.S sorry it this hurts your eyes. I couldnt format the code in the post.
what is the result of
plotPCA(vst, intgroup='condition')
from your code?Hi, 77%PC1 8%PC2 I added the plot
Hi thank you for the reply, I changed it to 0.05, but there is no difference since there is one gene that fulfills that condition.
How can anyone help you with code we cannot see?
Hi thank you for your reply, since it didn't give any error I thought there is something fundamentally wrong. I updated the code
@mskr_ You can enable proper code formatting following the markdown rules, so wrapping code blocks in ``` or by selecting the code chunk and then using the
10101
button. We made the changes for you now :)Hi, I placed the long code in a place after clicking 10101 button but it didnt update. Just trying to figure out, sorry and thank you :)