extract_vscan_counts: extract_vscan_counts

extract_vscan_countsR Documentation

extract_vscan_counts

Description

Extract VarScan counts

Usage

.extract_vscan_counts(vcf_data, ad_idx, rd_idx)

Arguments

vcf_data

a matrix of String containing count information in VarScan format

ad_idx

the index of the FORMAT AD field

rd_idx

the index of the FORMAT RD field

Details

Extract VarScan counts and return read counts for the reference and alternate allele. For VarScan generated vcf, SNPs with more than one alternate allele are discarded (because only a single count is then reported in the AD fields) making the min.rc unavailable (of vcf2pooldata). The VarScan –min-reads2 option might replace to some extent the min.rc functionality although SNP where the two major alleles in the Pool-Seq data are different from the reference allele (e.g., expected to be more frequent when using a distantly related reference genome for mapping) will be disregarded.

Value

A numeric matrix of read count with nsnp rows and 2*npools columns. The first npools columns consist of read count for the reference allele (RD), columns npools+1 to 2*npools consist of read coverage (RD+AD)

Examples

.extract_vscan_counts(rbind(c("0/0:0:20","1/1:18:1"),c("0/1:12:15","1/1:27:2")),3,2)


poolfstat documentation built on Sept. 8, 2023, 5:49 p.m.