Performing DE analysis using edgeR for PhIP-seq data with multiple samples, some with some without replicates.
1
0
Entering edit mode
f_rahmdani • 0
@f_rahmdani-23913
Last seen 10 months ago
Canada

Hi,

I am currently attempting to perform a differential expression (DE) analysis using edgeR for phip-seq data. The analysis involves comparing multiple samples with bead-only samples. some of the samples lack replicates while others have them, I have not encountered any errors. However, I am concerned whether this approach is appropriate for conducting the analysis.


for (cond in 1:length(pair_names)){
    CONTRASTS = makeContrasts(pair_names[cond], levels = design )
    contrast= CONTRASTS[CONTRASTS[,1] != 0,]
    names(contrast)
    contrast_pair = c(names(contrast))
    res_edgeR = exactTest(edgeR_obj, pair = contrast_pair )
   }

Thank you,

edgeR • 563 views
ADD COMMENT
1
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

edgeR does not require replicates for every group, so there is no problem with that.

I can't make any comments on your code however. The code depends on variables that aren't defined and it doesn't entirely make sense. The final value res_edgeR is overwritten for each condition, so you'll only get results for the last condition. I'm not sure what you're trying to do, but I suspect there is a simpler way to achieve it.

ADD COMMENT
0
Entering edit mode

Thank you so much for your valuable feedback. The code I shared is only a part of the overall script. To provide the results for each of the 48 experimental conditions vs control, I am writing the results to a file. Although as you said there may be simpler ways to achieve this:

group = as.factor(sample_meta$group)
design <- model.matrix(~ 0 + group)

pair_names = c()

for (col in 2:ncol(design)) {
  pair = paste0(colnames(design)[col], "-", colnames(design)[1])
  pair_names <- append(pair_names, pair )
}

for (cond in 1:length(pair_names)){
    CONTRASTS = makeContrasts(pair_names[cond], levels = design )
    contrast= CONTRASTS[CONTRASTS[,1] != 0,]
    names(contrast)
    contrast_pair = c(names(contrast))
    res_edgeR = exactTest(edgeR_obj, pair = contrast_pair )

    topTags_table = topTags(res_edgeR, adjust.method = "fdr", n = 38000)

    topTags_file = paste0(outPath_tables, "edgeR_DE_res_", contrast[2], ".tsv")
    write.table(topTags_table, topTags_file, sep = "\t", quote = FALSE, row.names = FALSE) 
 }

Once again, thank you for your assistance.

ADD REPLY

Login before adding your answer.

Traffic: 721 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