Last data update: 2014.03.03
R: narrowPeaktoGRanges
narrowPeaktoGRanges R Documentation
narrowPeaktoGRanges
Description
read the narrowpeak format from MACS software into GRangesList object.
NAME_peaks.narrowPeak is BED6+4 format file which contains the peak locations together with peak summit,
pvalue and qvalue. You can load it to UCSC genome browser. Definition of some specific columns are:
5th: integer score for display
7th: fold-change
8th: -log10pvalue
9th: -log10qvalue
10th: relative summit position to peak start.
Usage
narrowPeaktoGRanges(file)
Arguments
file
a string specifies where the narrow peak file is located.
Value
A GRanges object will be returned.
References
MACS2 software: https://github.com/taoliu/MACS/tree/master/MACS2
Examples
narrowPeak=system.file("extdata", "m6A_hg19_1000peaks_macs2.narrowPeak", package="Guitar")
m6A_Bcell <- narrowPeaktoGRanges(narrowPeak) # bam imported as GAlignments
m6A_Bcell
Results
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(Guitar)
Loading required package: Rsamtools
Loading required package: GenomeInfoDb
Loading required package: stats4
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
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: Biostrings
Loading required package: XVector
Loading required package: GenomicFeatures
Loading required package: AnnotationDbi
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: rtracklayer
Loading required package: GenomicAlignments
Loading required package: SummarizedExperiment
Loading required package: ggplot2
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Guitar/narrowPeaktoGRanges.Rd_%03d_medium.png", width=480, height=480)
> ### Name: narrowPeaktoGRanges
> ### Title: narrowPeaktoGRanges
> ### Aliases: narrowPeaktoGRanges
>
> ### ** Examples
>
> narrowPeak=system.file("extdata", "m6A_hg19_1000peaks_macs2.narrowPeak", package="Guitar")
> m6A_Bcell <- narrowPeaktoGRanges(narrowPeak) # bam imported as GAlignments
> m6A_Bcell
GRanges object with 1000 ranges and 10 metadata columns:
seqnames ranges strand | V1 V2 V3
<Rle> <IRanges> <Rle> | <factor> <integer> <integer>
[1] chr1 [14409, 14906] * | chr1 14409 14906
[2] chr1 [15315, 15532] * | chr1 15315 15532
[3] chr1 [16663, 16787] * | chr1 16663 16787
[4] chr1 [16964, 17085] * | chr1 16964 17085
[5] chr1 [17676, 17798] * | chr1 17676 17798
... ... ... ... . ... ... ...
[996] chr1 [38155955, 38156121] * | chr1 38155955 38156121
[997] chr1 [38172672, 38172772] * | chr1 38172672 38172772
[998] chr1 [38173969, 38174361] * | chr1 38173969 38174361
[999] chr1 [38174536, 38174636] * | chr1 38174536 38174636
[1000] chr1 [38259802, 38260396] * | chr1 38259802 38260396
V4 V5 V6 V7
<factor> <integer> <factor> <numeric>
[1] cellular_dox_macs_kpdup_peak_1 1511 . 12.26350
[2] cellular_dox_macs_kpdup_peak_2 84 . 4.52297
[3] cellular_dox_macs_kpdup_peak_3 242 . 4.05520
[4] cellular_dox_macs_kpdup_peak_4 20 . 1.66964
[5] cellular_dox_macs_kpdup_peak_5 103 . 2.23147
... ... ... ... ...
[996] cellular_dox_macs_kpdup_peak_996 35 . 4.04413
[997] cellular_dox_macs_kpdup_peak_997 197 . 7.80644
[998] cellular_dox_macs_kpdup_peak_998 291 . 11.82129
[999] cellular_dox_macs_kpdup_peak_999 38 . 3.68638
[1000] cellular_dox_macs_kpdup_peak_1000 120 . 6.33227
V8 V9 V10
<numeric> <numeric> <integer>
[1] 155.56317 151.18591 96
[2] 11.31053 8.40897 57
[3] 27.62019 24.28956 49
[4] 4.54747 2.03608 1
[5] 13.36805 10.39292 27
... ... ... ...
[996] 6.19355 3.53633 133
[997] 23.01747 19.77756 49
[998] 32.53416 29.11507 99
[999] 6.54282 3.87012 21
[1000] 15.10463 12.07185 158
-------
seqinfo: 1 sequence from an unspecified genome; no seqlengths
>
>
>
>
>
> dev.off()
null device
1
>