gtracks: Produce genomic tracks

Description Usage Arguments Value Examples

View source: R/gtracks.R

Description

This function extract the coverages of bam files and print them in track format. It is also possible to add custom annotation in the form of a list of GRanges or a GRangesList. A TxDb object can also be used to add the names of the genes in the selected region.

Usage

1
gtracks(region, bam_files, ranges = NULL, annotation = NULL, org = NULL)

Arguments

region

A GRanges representing the region to display.

bam_files

A list of bam filename. They must be indexed with samtools index (i.e.: if you have a bam file named bam_file.bam, you must also have a file named bam_file.bam.bai in the same directory). The names of the elements of the list will be used as names for the displayed tracks.

ranges

A list of GRanges or a GRangesList of custom annotations to add to the display. The names of the elements of the list/GRangesList will be used for the displayed tracks.

annotation

A TxDb object to use for annotation must be used org param.

org

The OrgDb object matching the annotation.

Value

A ggbio::Tracks object.

Examples

1
2
3
4
region <- GRanges("chr1", IRanges(34840000, 34860000))
bam_files <- get_demo_bam_files()[1]
names(bam_files) <- "align1_rep1"
gtracks(region = region, bam_files = bam_files)

CharlesJB/GenomicTracks documentation built on May 6, 2019, 9:58 a.m.