vcf_utls: The utility for handling VCF

Description Usage Arguments Examples

Description

The utility for handling VCF

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
vcf_flt(x, snv, qual)

vcf_info(x)

vcf_gt(x, labs)

vcf_anno(x, cds)

vcf_info(x)

vcf_gt(x, labs = NULL)

vcf_anno(x, cds)

Arguments

x

data.frame: VCF format

snv

character: "snp", or "indel" [default: snp]

qual

numeric: options of vcf_flt parameters

labs

character: labels of sample name [default: NULL]

cds

DNAStringSet object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
# sample VCF data
vcf <- rskodat::vcf

# base filtering of VCF
snp <- vcf_flt(vcf, "snp", qual = 900)
indel <- vcf_flt(vcf, "indel", qual = 900)

# column of 'INFO'
info <- vcf_info(snp); dim(info)

# column of 'GT' and 'PL'
gt <- vcf_gt(snp); dim(gt)

# variant annotation
## TransDecoder output fasta
orf <- system.file("extdata/longorf.fna.gz", package = "rskodat")
longorf <- Biostrings::readDNAStringSet(orf)
names(longorf) <- sapply(strsplit(names(longorf), " "), "[", 1)

## annotation of snps
res <- vcf_anno(snp, longorf)


## End(Not run)

shkonishi/rskoseq documentation built on April 18, 2021, 3:50 p.m.