Merge and filter motifbreakR + echolocatoR results
Source:R/MOTIFBREAKR_filter.R
MOTIFBREAKR_filter.RdFor each SNP we have at least one allele achieving a p-value<1e-4 threshold that we required. The seqMatch column shows what the reference genome sequence is at that location, with the variant position appearing in an uppercase letter. pctRef and pctAlt display the the score for the motif in the sequence as a percentage of the best score that motif could achieve on an ideal sequence. In other words, (scoreVariant-minscorePWM)/(maxscorePWM-minscorePWM). We can also see the absolute scores for our method in scoreRef and scoreAlt and their respective p-values.
Usage
MOTIFBREAKR_filter(
mb_res,
merged_DT,
filter_by_locus = NULL,
remove_NA_geneSymbol = TRUE,
pct_threshold = NULL,
pvalue_threshold = 1e-04,
qvalue_threshold = 0.05,
effect_strengths = NULL,
snp_filter = "Support>0",
top_geneSymbol_hits = NULL,
no_no_loci = NULL,
verbose = TRUE
)Arguments
- mb_res
Results generated by MOTIFBREAKR, in GRanges format.
- merged_DT
Table with columns Locus and SNP to filter
mb_resby.- filter_by_locus
Filter
mb_resto only include SNPs present in a given Locus (e.g."BST1"). Set toNULL(default) for not perform any filtering. Requiresmerged_DTargument to be supplied.- remove_NA_geneSymbol
Remove results where
geneSymbol==NA.- pct_threshold
Remove rows below the percentage of the optimal binding score (PCT) threshold.
- pvalue_threshold
Remove rows below the raw significance value (p-value) threshold.
- qvalue_threshold
Remove rows below the multiple testing-corrected significance value (q-value) threshold.
- effect_strengths
Only include results with certain effect strengths.
- snp_filter
Condition to filter SNPs by, after
mb_resandmerged_DThave been merged together into one table.- top_geneSymbol_hits
Only include N top results per gene symbol based on absolute
risk_score, where N=top_geneSymbol_hits. Iftop_geneSymbol_hits=NULL, no such filtering is performed.- no_no_loci
Filter out SNPs contained within specific loci in the
merged_DTtable.- verbose
Print messages.
Value
data.table
with the filtered motif disruption results
after merging with merged_DT.
Examples
if (FALSE) { # \dontrun{
merged_DT <- echodata::get_Nalls2019_merged()
mb_res <- MOTIFBREAKR(rsid_list = c("rs11175620"),
# limit the number of datasets tests
# for demonstration purposes only
pwmList_max = 4,
calculate_pvals = FALSE)
mb_res_filt <- MOTIFBREAKR_filter(mb_res = mb_res,
merged_DT = merged_DT)
} # }