TobiTekath / DTUrtle

Perform differential transcript usage (DTU) analysis of bulk or single-cell RNA-seq data. See documentation at:
https://tobitekath.github.io/DTUrtle
GNU General Public License v3.0
17 stars 3 forks source link

gene-level DGE columns in dtu_table output #4

Closed william-arthur-johnson closed 2 years ago

william-arthur-johnson commented 2 years ago

Hi there,

I'm interested in including DGE results (as stored in dturtle$dge_analysis$results_sig) in the dtu_table object alongside the results of the DTU analysis. Is this possible?

Thanks!

TobiTekath commented 2 years ago

Hi William,

thank you for using DTUrtle. Yes this is very much possible, as the dtu_table is just a plain data frame.

Depending on what you want as a result, you could for example simply merge the dtu_table and the dge_analysis$results_sig table.

If you only want to retain genes which are both significant in the DTU and DGE analysis (and therefore imply DTE), you could do something like this:

dturtle$dtu_table <- merge.data.frame(x = dturtle$dtu_table, 
                                      y = dturtle$dge_analysis$results_sig, 
                                      by.x = "gene_ID", by.y = "gene")

If you want to retain all significant DTU and DGE genes, you could do:

dturtle$dtu_table <- merge.data.frame(x = dturtle$dtu_table, 
                                      y = dturtle$dge_analysis$results_sig, 
                                      by.x = "gene_ID", by.y = "gene", all = TRUE)

I hope this is what you were looking for.

Best, Tobi