Creates a DE_data
object from a tibble or data-frame of differential expression
results.
Details
The input data should have one row per gene or transcript, and at least the following columns:
chromosome
: character column, chromosome on which the gene/transcript is located.start
andend
: numeric, starting and end position of the gene/transcript (in bp). A columnposition
will be constructed as the middle value (mean) betweenstart
andend
.score
orpadj
: numeric, the DE score or adjusted p-value of the gene/transcript. If columnscore
column is missing, will be constructed as-log10(padj)
.foldChange
orlog2FoldChange
: numeric, the fold-change or log2(fold-change) of the gene/transcript. If columnlog2FoldChange
is missing, will be constructed aslog2(foldChange)
.
Examples
x <- get_example_data()
DE_data(x[["DE"]])
#> # A tibble: 10,671 × 9
#> gene chromosome padj log2FoldChange start end label score position
#> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <chr> <dbl> <dbl>
#> 1 PGSC00… ST4.03ch00 0.787 0.0114 4.58e7 4.58e7 Prot… 0.104 4.58e7
#> 2 PGSC00… ST4.03ch01 0.630 0.00529 8.86e7 8.86e7 PhD-… 0.201 8.86e7
#> 3 PGSC00… ST4.03ch02 0.864 0.00362 4.86e7 4.86e7 Acet… 0.0637 4.86e7
#> 4 PGSC00… ST4.03ch03 0.530 0.0320 6.23e7 6.23e7 Phos… 0.276 6.23e7
#> 5 PGSC00… ST4.03ch04 0.975 0.00225 7.22e7 7.22e7 Cons… 0.0109 7.22e7
#> 6 PGSC00… ST4.03ch05 NA -0.000726 5.20e7 5.20e7 Cons… NA 5.20e7
#> 7 PGSC00… ST4.03ch06 0.844 -0.00323 5.95e7 5.95e7 30S … 0.0739 5.95e7
#> 8 PGSC00… ST4.03ch07 0.944 -0.00337 5.67e7 5.67e7 Ent-… 0.0252 5.67e7
#> 9 PGSC00… ST4.03ch08 0.403 0.0290 5.68e7 5.68e7 B3 d… 0.394 5.68e7
#> 10 PGSC00… ST4.03ch09 NA -0.000241 6.15e7 6.15e7 Cons… NA 6.15e7
#> # ℹ 10,661 more rows