create.chromR | R Documentation |
Creates and populates an object of class chromR.
create.chromR(vcf, name = "CHROM", seq = NULL, ann = NULL, verbose = TRUE)
vcfR2chromR(x, vcf)
seq2chromR(x, seq = NULL)
ann2chromR(x, gff)
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 |
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.
chromR-class
,
vcfR-class
,
DNAbin
,
VCF specification
gff3 format
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.