what is the correct command line to import my txi data file as a deseq2 dataset in a time series experiment
1
0
Entering edit mode
@ahmedaalkarim-18333
Last seen 3.7 years ago
Cambridge

Dear all, my time series experiment; I exposed my plant to light and harvest after 6 time points (0, 0.5, 2, 4. 8, 10h), therefore, I have the effect of the conditions  (light), the Time, and the interaction (light+time). I used SALMON and then Tximport. my question is what is the correct command line to import my txi data file as a deseq2 dataset in a  time series experiment. Is the following one correct or not???

dds <- DESeqDataSetFromTximport(txi, sampleTable, ~Condition + Time)

I need to do the Data quality assessment by sample clustering and visualization and I need to be in the right way.

 

Thanks in advance for your help

Ahmed

deseq2 • 897 views
ADD COMMENT
0
Entering edit mode

Thanks Micheal for your help

Regards

ADD REPLY
0
Entering edit mode

Dear Micheal, unfortunately, the command line does not work. Maybe I will need to make myself clear. I need to  import my txi data file for deseq2, because I need to do quality assessment and latter deferential gene analyses. I use the following command 

dds <- DESeqDataSetFromTximport(txi, sampleTable, ~Condition)

and it works well.

But because I  did a  time series experiment.

I tried the following to command lines, 

dds <- DESeqDataSetFromTximport(txi, sampleTable, ~Condition + Time)

dds <- DESeqDataSetFromTximport(txi, sampleTable, ~Condition + Time + Condition:Time)

but they did not work. So, my question is should I proceed with the first command or what is the right way?/?

thanks

ADD REPLY
0
Entering edit mode

I moved these to "Comments" instead of "Answers". If you want to reply to an existing answer, you can click "Add Reply" or "Add Comment" so it gets tagged to the correct thread.

Here is also a copy of the posting guide:

https://www.bioconductor.org/help/support/posting-guide/

Take a look at the key points, these will help you form a question where you can get the most value from the responses of the developers.

ADD REPLY
0
Entering edit mode

Dear Micheal, unfortunately, the command line does not work. Maybe I will need to make myself clear. I need to  import my txi data file for deseq2, because I need to do quality assessment and latter deferential gene analyses. I use the following command 

dds <- DESeqDataSetFromTximport(txi, sampleTable, ~Condition)

and it works well.

But because I  did a  time series experiment.

I tried the following to command lines, 

dds <- DESeqDataSetFromTximport(txi, sampleTable, ~Condition + Time)

dds <- DESeqDataSetFromTximport(txi, sampleTable, ~Condition + Time + Condition:Time)

but they did not work. So, my question is should I proceed with the first command or what is the right way?/?

Here my command lines that works (but it is one factor "the condition")

# see your files with .sf
>files <- list.files(pattern = ".sf")
>files
#read the tx2gene.csv files
>tx2gene <- read.csv("Sb_tx2gene.csv",head=TRUE)
>head(tx2gene)
>txi <- tximport(files, type = "salmon", tx2gene = tx2gene)
 

>samplename <- c("0.0h_1", "0.0h_2", "0.0h_3", "0.5h_1", "0.5h_2", "0.5h_3", "12h_1",  "12h_2", 
                "12h_3", "2.0h_1", "2.0h_2", "2.0h_3", "4.0h_1", "4.0h_2", "4.0h_3", "6.0h_1",
                "6.0h_2", "6.0h_3")
>counts<- txi$counts
>colnames(counts)<- samplename
>head(counts)

>sampleTable <- data.frame(Condition = c(rep("0.0h",3), rep("0.5h", 3), rep("2.0h", 3), rep("4.0h", 3),
                                        rep("6.0h", 3), rep("12h", 3)))

# I will creat a column called Time to use it later with Condition for time series statics#
>sampleTable$Time <- rep(c("0", "0.5", "2", "4", "6", "12"), each = 3)

# it is a vector, I need to convert as a factor 
>sampleTable$Time <- as.factor(sampleTable$Time)

# import txi as a deseq2 dataset

>dds <- DESeqDataSetFromTximport(txi, sampleTable, ~ Condition)

thanks

ADD REPLY
0
Entering edit mode

ok, I'll follow over to the new post:

importing Tximport to DESeq2 for a time series experiment

ADD REPLY
1
Entering edit mode
@mikelove
Last seen 7 hours ago
United States

The basic line is correct, but the design is not according to our time series example:

https://bioconductor.org/packages/release/workflows/vignettes/rnaseqGene/inst/doc/rnaseqGene.html#time

ADD COMMENT

Login before adding your answer.

Traffic: 824 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6