exportMBbed: Export motifbreakR variants to bed file

View source: R/scoreMotif.R

exportMBbedR Documentation

Export motifbreakR variants to bed file

Description

Export motifbreakR variants to bed file

Usage

exportMBbed(results, file, name = NULL, color = "effect_size")

Arguments

results

The output of motifbreakR

file

Character; the file name of the destination file

name

Character; name for the BED track, defaults to "motifbreakR results"

color

Character; one of ref_sig (Refpvalue), alt_sig (Altpvalue), best_sig (lowest between Refpvalue and Altpvalue), (each of which require pre-computation of p-values with calculatePvalue), or ref_score (pctRef), alt_score (pctAlt), best_score (highest between pctRef and pctAlt), or the default value of effect_size (alleleDiff).

Value

exportMBbed produces an output BED file, with diverging color scale for effect_size (blue representing stronger binding in REF, red representing stronger binding in ALT), or a sequential color scale otherwise (low values as purple, high values as yellow). The score column is either the effect_size (alleleDiff column), the -log10(p-value) (capped at 10), corresponding to Refpvalue, Altpvalue, or the best match of the two, or the score pctRef, pctAlt, or the highest match of the two. The name column is formatted SNP_id:REF/ALT:providerId. Additionally a color key is returned indicating the range of values for each color output.

See Also

See exportMBtable for the function that exports the full motifbreakR results as a tab or comma separated table file.

Examples

data(example.results)
example.results

exportMBbed(example.results, file = "mb_test_output.bed", color = "effect_size")


Simon-Coetzee/motifBreakR documentation built on Aug. 6, 2024, 5:17 a.m.