R: Find all regions in data above p-value threshold
findRegions
R Documentation
Find all regions in data above p-value threshold
Description
After the ACME calculation, each probe is associated with a
p-value of enrichment. However, one often wants the contiguous
regions associated with runs of p-values above a given p-value
threshold.
Usage
findRegions(x, thresh = 1e-04)
Arguments
x
An ACMESetCalc object
thresh
The p-value threshold
Details
Runs of p-values above the p-value threshold will be reported as one
"region". These can be used for downstream analyses, export to
browsers, submitted for transcription factor binding enrichment
analyses, etc.
Value
A data frame with these columns:
Length
The length of the region in probes
TF
Either TRUE or FALSE; TRUE regions represent regions of
enrichment while FALSE regions are the regions between the TRUE regions
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(ACME)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/ACME/findRegions.Rd_%03d_medium.png", width=480, height=480)
> ### Name: findRegions
> ### Title: Find all regions in data above p-value threshold
> ### Aliases: findRegions
> ### Keywords: manip
>
> ### ** Examples
>
> data(example.agff)
> example.agffcalc <- do.aGFF.calc(example.agff,window=1000,thresh=0.9)
Working on sample 1
Working on chromosome:
chr1 chr10 chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr2 chr20 chr21 chr22 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chrX Working on sample 2
Working on chromosome:
chr1 chr10 chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr2 chr20 chr21 chr22 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chrX > foundregions <- findRegions(example.agffcalc,thresh=0.001)
> foundregions[1:6,]
Length TF StartInd EndInd Sample Chromosome Start
testsamp1.chr1.1 2720 FALSE 1 2720 testsamp1 chr1 18370933
testsamp1.chr1.2 7 TRUE 2721 2727 testsamp1 chr1 160504242
testsamp1.chr1.3 183 FALSE 2728 2910 testsamp1 chr1 160512520
testsamp1.chr1.4 7 TRUE 2911 2917 testsamp1 chr1 161743296
testsamp1.chr1.5 709 FALSE 2918 3626 testsamp1 chr1 161744293
testsamp1.chr1.6 1 TRUE 3627 3627 testsamp1 chr1 161866419
End Median Mean
testsamp1.chr1.1 160502834 3.778240e-01 0.4516588005
testsamp1.chr1.2 160511031 1.941371e-04 0.0001449863
testsamp1.chr1.3 161743150 4.560643e-01 0.4888990295
testsamp1.chr1.4 161743722 3.221346e-05 0.0000860163
testsamp1.chr1.5 161866348 3.778240e-01 0.4200206198
testsamp1.chr1.6 161866419 5.729070e-04 0.0005729070
>
>
>
>
>
> dev.off()
null device
1
>