Question: what is the correct command line to import my txi data file as a deseq2 dataset in a time series experiment
0
gravatar for ahmedaalkarim
6 months ago by
Cambridge
ahmedaalkarim0 wrote:

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 • 133 views
ADD COMMENTlink modified 6 months ago • written 6 months ago by ahmedaalkarim0

Thanks Micheal for your help

Regards

ADD REPLYlink written 6 months ago by ahmedaalkarim0

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 REPLYlink written 6 months ago by ahmedaalkarim0

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 REPLYlink written 6 months ago by Michael Love23k

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 REPLYlink written 6 months ago by ahmedaalkarim0

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

importing Tximport to DESeq2 for a time series experiment

ADD REPLYlink written 6 months ago by Michael Love23k
Answer: what is the correct command line to import my txi data file as a deseq2 dataset
1
gravatar for Michael Love
6 months ago by
Michael Love23k
United States
Michael Love23k wrote:

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 COMMENTlink written 6 months ago by Michael Love23k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 177 users visited in the last hour