InteractionTrack: Constructor to create an InteractionTrack object

Description Usage Arguments Value Examples

Description

Create an InteractionTrack object from an GenomicInteractions object to visualise a specified chromosome.

Usage

1
2
InteractionTrack(x, chromosome = "", name = name(x), start = NULL,
  end = NULL)

Arguments

x

A GenomicInteractions object.

chromosome

String specifying which chromosome to use to create a track.

name

String specifying the name of the track.

start

Integer scalar specifying the start location for the track.

end

Integer scalar specifying the end location for the track.

Value

An InteractionTrack object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(Gviz)
anchor.one = GRanges(c("chr1", "chr1", "chr1", "chr1"), 
    IRanges(c(10, 20, 30, 20), width=5))
anchor.two = GRanges(c("chr1", "chr1", "chr1", "chr2"), 
    IRanges(c(100, 200, 300, 50), width=5))

interaction_counts = sample(1:10, 4)
test <- GenomicInteractions(anchor.one, anchor.two, counts=interaction_counts)
metadata(test) <- list(description="this is a test", experiment_name="test")
interactions.track = InteractionTrack(name="Test", test, chromosome="chr1")                        
plotTracks(list(interactions.track), chromosome="chr1", from=0, to=500)

LTLA/fugi documentation built on June 22, 2019, 8:50 p.m.