Question: how merge the gene expression value of two sample
0
gravatar for lkianmehr
9 months ago by
lkianmehr30
France
lkianmehr30 wrote:

Hello,

I need your help to resolve this question, maybe is easy but I am new about it. I would be appreciated if give me please any idea about that.

actually, I have 8 sample (count file from HTSeq-count of RNA-seq data, with this order: D1_1, D1_2, D3_1, D3_2, R1_1, R1_2, R3_1, R3_2) and make them into 4 group (2 sample in each one). Now I am going to calculate the proportion of gene expression for each group. I have log scaled and normalized them, but I want to merge the ratio of gene expression of each 2 sample together (for ex D1_1 and D1_2) to do the next analysis. could you give me any advice to do that?

my dataset is like this:

                        D1_1                D1_2                D3_1                D3_2    
ENSMUSG00000000001.4    1.39484378430357    2.46452589579488    2.15638312017686    1.39484378430357    
ENSMUSG00000000003.15   0.211843606133756   0.360646924628625   0.307483505135223   0.211843606133756

but I want to have D1 (D1_1 and D1_2) versus D3 (D3_1 and D3_2). I need to merge or don't know should be gotten average or what else?

thanks in advance

gene-expression rna-seq deseq • 467 views
ADD COMMENTlink modified 8 months ago by genomax67k • written 9 months ago by lkianmehr30

Good description of the data and problem. Please post some example data and expected output, if possible

ADD REPLYlink written 9 months ago by cpad011211k

Is there a reason you are not using an established package like deseq2 to do this analysis?

ADD REPLYlink written 9 months ago by genomax67k

No, I did differential Gene expression analysis by DESeq2 but now I want to just compare gene type of each group on based of gene expression value, not DGE analysis, you mean I can do this work by DESeq2, if so, how?

ADD REPLYlink written 9 months ago by lkianmehr30

What do you mean by compare gene type? Is there any reason you can't use the DESeq2 logFoldChange values to compare between the groups?

ADD REPLYlink written 9 months ago by jared.andrews072.3k

because I want to just calculate the proportion of gene type (Protein coding, miRNA, MiscRNA and etc) on each group, not DGE!

ADD REPLYlink written 9 months ago by lkianmehr30

Still not sure I understand completely. Can you maybe post an example of the output you want/expect?

ADD REPLYlink written 8 months ago by jared.andrews072.3k

yes, I expect to have a result like this:

gene    D1  D3  R1  R3  type    
0610005C13Rik   3.26    4.09    3.14    1.03    antisense_RNA   
0610009B22Rik   0.57    0.46    0.91    2.21    protein_coding  
0610009E02Rik   0.77    0.42    0.68    1.31    processed_transcript    
0610009L18Rik   0.58    0.56    4   18.07   bidirectional_promoter_lncRNA
ADD REPLYlink modified 8 months ago by genomax67k • written 8 months ago by lkianmehr30

So you want to merge (e.g. D1_1 and D1_2 to get just D1, in the example you provide it does not seem to be addition/average) and then annotate each gene row?

ADD REPLYlink modified 8 months ago • written 8 months ago by genomax67k

No, just to know can I average them to compare them to others as one sample (D1) or not?

ADD REPLYlink written 8 months ago by lkianmehr30
2

Comparing groups of samples is really best done by something like boxplots, as they give a better indication of the variation within each group. However, with only two samples in each group, boxplots aren't an option, so yes, I suppose taking the average is as good an option as any. I would do it with a grain of salt though, and show the actual sample counts/fold changes in any figures you plan to make.

ADD REPLYlink written 8 months ago by jared.andrews072.3k
2
gravatar for h.mon
8 months ago by
h.mon25k
Brazil
h.mon25k wrote:

Are the D1_1 and D1_2 technical replicates? If so, you can use the function collapseReplicates() from DESeq2, this would sum up the counts. Then you can follow up with your regular analysis.

ADD COMMENTlink written 8 months ago by h.mon25k

Oh yeah, completely forgot about this - it is a good option as well.

ADD REPLYlink written 8 months ago by jared.andrews072.3k

yes, they are technical replicates. thanks

ADD REPLYlink written 8 months ago by lkianmehr30

Sorry, I need your help to write this command correctly, because I am very new with R and DESeq2, I have written this command and faced with this problem could you please correct command it would be needed?

gr <- factor(c(rep("D1", 2), rep("D3", 2)))
colData <- data.frame(group=gr, type="paired-end")
cds <- DESeqDataSetFromMatrix(cn3, colData, design= ~group)
cds <- DESeq(cds)
cnt <- log2(1+counts(cds, normalized=T))
cntColl <- collapseReplicates(cnt, gr, renameCols = TRUE)

Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘assay’ for signature ‘"matrix", "missing"’
ADD REPLYlink modified 8 months ago by genomax67k • written 8 months ago by lkianmehr30
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 2.3.0
Traffic: 900 users visited in the last hour