Summarizes motifbreakR results as a tibble from mb_to_tibble. See details.
Arguments
- mbtibble
motifbreakR results summarized with mb_to_tibble.
- key_col
The name of the column used to key the txdb. Default
gene_id
. May betranscript_id
or otherwise if you use a different value oflevel
in get_upstream_snps.
Details
Summarizes motifbreakR results. Returns a tibble with columns indicating:
ngenes
: The number of genes in the SNP set.nsnps
: The number of SNPs total.nstrong
: The number of SNPs with a "strong" effect.alleleDiffAbsMean
The mean of the absolute values of thealleleDiff
scores.alleleDiffAbsSum
The sum of the absolute values of thealleleDiff
scores.alleleEffectSizeAbsMean
The mean of the absolute values of thealleleEffectSize
scores.alleleEffectSizeAbsSum
The sum of the absolute values of thealleleEffectSize
scores.
Examples
data(vignettedata)
vignettedata$mbres
#> # A tibble: 1,335 × 10
#> gene_id SNP_id tf pctRef pctAlt scoreRef scoreAlt effect alleleDiff
#> <chr> <chr> <chr> <dbl> <dbl> <dbl> <dbl> <chr> <dbl>
#> 1 100316005 chr33:7472… ACE2 0.986 0.783 4.85 3.87 strong -0.980
#> 2 100316005 chr33:7472… ADR1 0.759 0.917 3.34 4.01 weak 0.673
#> 3 100316005 chr33:7471… AFT2 0.964 0.878 5.50 5.02 weak -0.480
#> 4 100316005 chr33:7472… AFT2 0.902 0.740 5.15 4.24 strong -0.911
#> 5 100316005 chr33:7473… AFT2 0.879 0.705 5.02 4.04 strong -0.980
#> 6 100316005 chr33:7472… AGL42 0.859 0.693 5.14 4.15 strong -0.986
#> 7 100316005 chr33:7471… AGL55 0.695 0.861 3.97 4.91 strong 0.939
#> 8 100316005 chr33:7472… ALX3 0.972 0.776 4.23 3.43 strong -0.806
#> 9 100316005 chr33:7473… ALX3 0.919 0.773 4.02 3.42 weak -0.600
#> 10 100316005 chr33:7473… ARG80 0.731 0.961 3.16 4.15 strong 0.993
#> # ℹ 1,325 more rows
#> # ℹ 1 more variable: alleleEffectSize <dbl>
mb_summarize(vignettedata$mbres)
#> # A tibble: 1 × 7
#> ngenes nsnps nstrong alleleDiffAbsMean alleleDiffAbsSum alleleEffectSizeAbsM…¹
#> <int> <int> <int> <dbl> <dbl> <dbl>
#> 1 5 1335 950 0.798 1066. 0.155
#> # ℹ abbreviated name: ¹alleleEffectSizeAbsMean
#> # ℹ 1 more variable: alleleEffectSizeAbsSum <dbl>