Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

create_chromR

Create chromR object


Description

Creates and populates an object of class chromR.

Usage

create.chromR(vcf, name = "CHROM", seq = NULL, ann = NULL, verbose = TRUE)

vcfR2chromR(x, vcf)

seq2chromR(x, seq = NULL)

ann2chromR(x, gff)

Arguments

vcf

an object of class vcfR

name

a name for the chromosome (for plotting purposes)

seq

a sequence as a DNAbin object

ann

an annotation file (gff-like)

verbose

should verbose output be printed to the console?

x

an object of class chromR

gff

a data.frame containing annotation data in the gff format

Details

Creates and names a chromR object from a name, a chromosome (an ape::DNAbin object), variant data (a vcfR object) and annotation data (gff-like). The function create.chromR is a wrapper which calls functions to populate the slots of the chromR object.

The function vcf2chromR is called by create.chromR and transfers the data from the slots of a vcfR object to the slots of a chromR object. It also tries to extract the 'DP' and 'MQ' fileds (when present) from the fix slot's INFO column. It is not anticipated that a user would need to use this function directly, but its placed here in case they do.

The function seq2chromR is currently defined as a generic function. This may change in the future. This function takes an object of class DNAbin and assigns it to the 'seq' slot of a chromR object.

The function ann2chromR is called by create.chromR and transfers the information from a gff-like object to the 'ann' slot of a chromR object. It is not anticipated that a user would need to use this function directly, but its placed here in case they do.

See Also

Examples

library(vcfR)
data(vcfR_example)
chrom <- create.chromR('sc50', seq=dna, vcf=vcf, ann=gff)
head(chrom)
chrom
plot(chrom)

chrom <- masker(chrom, min_QUAL = 1, min_DP = 300, max_DP = 700, min_MQ = 59, max_MQ = 61)
chrom <- proc.chromR(chrom, win.size=1000)

plot(chrom)
chromoqc(chrom)

vcfR

Manipulate and Visualize VCF Data

v1.12.0
GPL-3
Authors
Brian J. Knaus [cre, aut] (<https://orcid.org/0000-0003-1665-4343>), Niklaus J. Grunwald [aut] (<https://orcid.org/0000-0003-1656-7602>), Eric C. Anderson [ctb], David J. Winter [ctb], Zhian N. Kamvar [ctb] (<https://orcid.org/0000-0003-1458-7108>), Javier F. Tabima [ctb] (<https://orcid.org/0000-0002-3603-2691>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.