R: Choose fragments in a provided region around the viewpoint
chooseNearCisFragments
R Documentation
Choose fragments in a provided region around the viewpoint
Description
This function extracts fragment data from a Data4Cseq object's rawFragments slot for visualization with the functions visualizeViewpoint and drawHeatmap . Relevant fragments are located within the chosen visualization range; the viewpoint itself can be excluded or included.
Experiment data of class Data4Cseq with information on the 4C-seq experiment, including fragment data for the viewpoint chromosome
regionCoordinates
Interval on the viewpoint chromosome for the intended visualization
deleteViewpoint
If TRUE, delete all fragments that intersect with the experiment's viewpoint interval
Value
A data frame containing the chosen near-cis fragments
Note
Viewpoint fragments are removed per default to prevent bias through overrepresented sequences caused by self-ligation. These fragments can be included, but should be interpreted with caution.
Author(s)
Carolin Walter
Examples
# read example data
data(liverData)
fragments<-chooseNearCisFragments(liverData, regionCoordinates = c(20800000, 21000000))
head(fragments)
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(Basic4Cseq)
Loading required package: Biostrings
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
Loading required package: stats4
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: XVector
Loading required package: GenomicAlignments
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: SummarizedExperiment
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: Rsamtools
Loading required package: caTools
Attaching package: 'caTools'
The following object is masked from 'package:IRanges':
runmean
The following object is masked from 'package:S4Vectors':
runmean
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Basic4Cseq/chooseNearCisFragments.Rd_%03d_medium.png", width=480, height=480)
> ### Name: chooseNearCisFragments
> ### Title: Choose fragments in a provided region around the viewpoint
> ### Aliases: chooseNearCisFragments
> ### chooseNearCisFragments,Data4Cseq,numeric-method
> ### Keywords: chooseNearCisFragments
>
> ### ** Examples
>
> # read example data
> data(liverData)
> fragments<-chooseNearCisFragments(liverData, regionCoordinates = c(20800000, 21000000))
> head(fragments)
chromosomeName fragmentStart fragmentEnd fragmentCentre isNonBlind
104 10 20803166 20804714 20803924 TRUE
105 10 20804721 20808310 20806515 TRUE
106 10 20808317 20808848 20808517 TRUE
107 10 20808855 20810907 20809888 TRUE
108 10 20811250 20814707 20813114 TRUE
109 10 20814714 20814861 20814774 TRUE
fragmentLength leftFragEndLength rightFragEndLength leftFragEndValid
104 1548 229 260 TRUE
105 3589 19 19 FALSE
106 531 102 232 TRUE
107 2052 136 121 TRUE
108 3457 547 276 TRUE
109 147 59 85 TRUE
rightFragEndValid leftFragEndReads rightFragEndReads fragEndReadsAverage
104 TRUE 2 0 1
105 FALSE 0 0 0
106 TRUE 1 0 0
107 TRUE 5 0 2
108 TRUE 0 0 0
109 TRUE 1 10 6
>
>
>
>
>
> dev.off()
null device
1
>