vcf_counts_SNP_genecoords: VCF gene position counts

View source: R/vcf_counts_SNP_genecoords.R

vcf_counts_SNP_genecoordsR Documentation

VCF gene position counts

Description

Function returns a matrix with allelic counts per gene per individual for SNP and gene coordinates as inputs

Usage

vcf_counts_SNP_genecoords(
  vcf_data,
  df_snppos,
  df_genecoords,
  keep_indiv = NULL,
  extract_SNP = NULL,
  filter_gene = NULL
)

Arguments

vcf_data

an object of vcfR class

df_snppos

a dataframe for SNP information with SNP BP as column names.

df_genecoords

a dataframe for gene boundaries with CHR START END GENE as column names. Where CHR should be integer 1-22. START and END column should be integer. GENE column contains gene names

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 Genes. Mutation counts will be provided for genes included in the list only. Default is all genes.

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_SNP_genecoords(vcf_data_test,df_snppos_test,df_genecoords_test)

## End(Not run)


sariya/GARCOM documentation built on Jan. 1, 2023, 8:29 a.m.