vcf_counts_annot {GARCOM} | R Documentation |
gene annotation counts using VCF data
Description
Function returns a matrix with allelic (reference) counts per gene per individual for SNP-gene annotation
Usage
vcf_counts_annot(
vcf_data,
df_snpgene,
keep_indiv = NULL,
extract_SNP = NULL,
filter_gene = NULL
)
Arguments
vcf_data |
an object of vcfR class |
df_snpgene |
a data frame that contains SNP and annotated gene with SNP and GENE as column name |
keep_indiv |
an option to specify individuals to retain. Mutation counts will be provided for individuals included in the list only. Default is all individuals. Provide list of individuals in a vector. |
extract_SNP |
an option to specify SNPs for which mutation counts are needed. Mutation counts will be provided for SNPs included in the list only. Default is all SNPs. |
filter_gene |
an option to filter in a list of Genes. Mutation counts will be provided for genes specifed in the list only. Default is all genes. Provide list of genes in a vector. |
Details
Inputs needed are a vcf data and a data frame of SNP-gene annotation. The function returns a matrix of allelic counts (reference) per gene per sample (where each row represents a gene and each column represents an individual starting with the second column where first column contains gene information).
Value
Returns an matrix of data.table class as an output with allelic (reference) gene counts within each sample where each row corresponds to gene and column to individual IDs from column second. The first column contains gene names.
Author(s)
Sanjeev Sariya
Examples
## Not run:
vcf_counts_annot(vcf,df_snpgene_test)
## End(Not run)