VisualiseTwoIRanges: VisualiseTwoIRanges

Description Usage Arguments Author(s) References See Also Examples

View source: R/visualiseTwoIRanges.R

Description

VisualiseTwoIRanges is a function that displays the intervals of two IRanges, one above the other, in different colors, along a chromosome or subset of a chromosome. The intent is to show large-scale relationships between the two IRanges.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
VisualiseTwoIRanges(
  irA,
  irB,
  start = 1,
  end = NA,
  nameA = "RangesA",
  nameB = "RangesB",
  chrom_length = NA,
  title = NA,
  pdf = NULL,
  close.device = NULL
)

Arguments

irA

First IRanges object to be vsualised.

irB

Second IRanges object to be vsualised.

start

Start of the visualisation band.

end

End of the visualisation band.

nameA

Name of irA, default is 'RangesA'

nameB

Name of irB, default is 'RangesB'

chrom_length

The length of the chromosome spanned by irA and irB

title

Title, printed at the top of the plot.

pdf

Name of a file to which the image should be written. If pdf="" the filename is constructed from nameA and nameB. The suffix ".pdf" will be appended if not included. If NULL, no pdf is opened and an x11 window is raised up as by plot.

close.device

Whether to close the plot device after writing the image. A FALSE setting allows multiple images to be written to the same pdf file, but then eventually closing the device is up to the user. Default is NULL that means: close an x11, do not close a pdf.

Author(s)

Alexander Favorov favorov@sensi.org, Loris Mularoni, Yulia Medvedeva, Harris A. Jaffee, Ekaterina V. Zhuravleva, Veronica Busa, Leslie M. Cope, Andrey A. Mironov, Vsevolod J. Makeev, Sarah J. Wheelan.

References

GenometriCorr home

See Also

The GenometriCorr documentation and vignette.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library('rtracklayer')
library('plyranges')
library('GenometriCorr')

cpgis<-import(system.file("extdata", "UCSCcpgis_hg19.bed", package = "GenometriCorr"));

refseq<-import(system.file("extdata", "UCSCrefseqgenes_hg19.bed", package = "GenometriCorr"));


human.chrom.length<-c(249250621,243199373,198022430,191154276,180915260,171115067,159138663,146364022,141213431,135534747,135006516,133851895,115169878,107349540,102531392,90354753,81195210,78077248,59128983,63025520,48129895,51304566,59373566,155270560)


names(human.chrom.length)<-c('chr1','chr2','chr3','chr4','chr5','chr6','chr7','chr8','chr9','chr10','chr11','chr12','chr13','chr14','chr15','chr16','chr17','chr18','chr19','chr20','chr21','chr22','chrY','chrX')

VisualiseTwoIRanges(
 (cpgis %>% filter(seqnqmes=='chr1')@ranges, 
 (refseq %>% filter(seqnqmes=='chr1')@ranges, 
	nameA='CpG Islands', nameB='RefSeq Genes',
	chrom_length=human.chrom.length[['chr1']],
	title="CpGIslands and RefGenes on chr1, hg19",
	pdf='CpGi_vs_RefSeq_genes_chr1_hg19')

favorov/GenometriCorr documentation built on March 30, 2021, 5:21 p.m.