track-constructors: Track constructors

track-constructorsR Documentation

Track constructors

Description

Produces track.table-inheriting objects.

Usage

  track.table(..., .name, .parameters, .organism, .assembly, .chromosomes,
    .makeNames = FALSE, .orderCols = TRUE, warn = TRUE)
  track.bam(bamPath, baiPath, addChr, quiet = FALSE, .name, .organism,
    .assembly, .parameters, warn = TRUE)
  track.genes(...)
  track.bands(...)
  track.exons(...)
  track.CNV(...)

Arguments

...

Arguments to be passed to the inherited constructor (refTable for track.table, track.table for the others). track.table has few more restrictions, see track.table-class for further details.

.name

Single character value, to fill the name field inherited from drawable.

warn

Single logical value, to be passed to the appropriate check method. Other conversion warnings rely on this value too in track.table.

.parameters

A list of drawing parameters, to fill the parameters field of the object.

.organism

Single character value, to fill the organism field of the object.

.assembly

Single character value, to fill the assembly field of the object.

.chromosomes

Single character value, levels to use for the 'chrom' column if conversion to factor is needed.

.makeNames

Single logical value, whether to compute the 'name' column with unique values or not. If TRUE, any existing 'name' column will be replaced.

.orderCols

Single logical value, whether to reorder the columns for more consistency between tracks or not.

bamPath

Single character value, the file name and path to a BAM file (.bam) to build a track around.

baiPath

Single character value, the file name and path to the corresponding BAI file (.bai) to build a track around. If missing, a guess will be tried (adding '.bai' to bamPath or remplacing '.bam' by '.bai').

addChr

Single logical value, whether to automatically add 'chr' ahead chromosome names when querying or not. If missing, a guess will be tried looking for chromosome names beginning by 'chr' in the BAM header declaration.

quiet

Single logical value, whether to throw diagnostic messages during BAI parsing or not.

Value

track.table and track.bam inheriting objects.

Author(s)

Sylvain Mareschal

See Also

track.table-class, track.bam-class

Examples

  # track.table from a data.frame
  df <- data.frame(
    chrom=1, strand="+", start=1:5, end=2:6, name=letters[1:5],
    stringsAsFactors=FALSE
  )
  track.table(df)
  
  # track.table from vectors
  track.table(chrom=1, strand="+", start=1:5, end=2:6, name=letters[1:5])
  
  # track.bam
  track.bam(system.file("extdata/ATM.bam", package="Rgb"))

Rgb documentation built on Aug. 18, 2023, 5:05 p.m.