segmentation: Function for segmentate tracks in BED format.

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/genomebrowser.R

Description

segmentation performs a segmentation of track data in bed format in order to enable its effective representation.

Usage

1
segmentation(track, cell)

Arguments

track

a Data Frame with genomic features (in BED format).

cell

a numeric value with the size of each segment.

Value

a segmented Data Frame in BED format.

Note

Input file is provided in BED format which is an universal format for genomic features.

Author(s)

David Barrios and Carlos Prieto. Bioinformatics, University of Salamanca. See http://d3gb.usal.es/

See Also

The ‘D3GB’ Website: http://d3gb.usal.es

genomebrowser, genomemap, genome_addTrack.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Segmentate tracks.
# Create test data
chr <- character()
pos <- numeric()

for(i in 1:nrow(GRCh38)){
  chr <- c(chr,as.character(rep(GRCh38[i,"chr"],100)))
  pos <- c(pos,sample(GRCh38[i,"start"]:GRCh38[i,"end"],100))
}

value <- round(rexp(length(pos)),2)

track <- data.frame(chr,pos,pos+1,NA,value)
segments <- segmentation(track, 50000)

D3GB documentation built on May 2, 2019, 9:42 a.m.