diversityStats: calculate nucleotide diversity statsistics for a...

Description Usage Arguments Value Examples

Description

calculate nucleotide diversity statsistics for a gene/transcript use with plyr::ldply() on VCFList objects to create a table.

Usage

1
diversityStats(data, geneInfo = NULL)

Arguments

data

tidyVCF with 'EFF' field parsed and diversity calculated by position

geneInfo

Value

a row with nucleotide diversity statistics of the transcript.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
geneInfo <- getGeneInfo(genes = c("AT3G62980", "AT3G26810"))

## download and compile a list of VCF files
myVCFList <- VCFList(geneInfo)

## Parse EFF field
myVCFList <- plyr::llply(myVCFList, parseEFF)

## calculate site-wise nucleotide diversity
myVCFList <- plyr::llply(myVCFList, Nucleotide_diversity)

## tabulate diversity statistics
plyr::ldply(myVCFList, diversityStats, .id="transcript_ID")

wrightrc/r1001genomes documentation built on Nov. 10, 2019, 12:45 p.m.