get_snpdata: Generate the SNPdata object

View source: R/data_manip.R

get_snpdataR Documentation

Generate the SNPdata object

Description

This function generate the input data needed for whole genome SNP data genotyped from malaria parasite

Usage

snpdata=get_snpdata(vcf.file = "file.vcf.gz", meta.file = "file.txt", output.dir = "/path/to/output/dir")

Arguments

vcf.file

the input VCF file (required)

meta.file

the metadata file (required)

output.dir

the path to the folder where to store the output files (optional)

gaf

the gene ontology annotation file (optional). If not provided, the default file obtained from https://plasmodb.org/plasmo/app/downloads/Current_Release/Pfalciparum3D7/gaf/ will be used

gff

the gene annotation file (optional). If not provided, the default file obtained from https://plasmodb.org/plasmo/app/downloads/Current_Release/Pfalciparum3D7/gff/ will be used

Details

use the print(snpdata) function to print the created object

Value

an object of class SNPdata with 5 elements

  1. meta: a data frame that contains the sample's metadata

  2. details: a data frame with SNPs genomic coordinates, fraction of missing data per SNP and their correspondent gene names and descriptions

  3. GT: an integer matrix with the genotype data. 0='reference allele', 1='alternate allele', 2='mixed allele', NA='missing allele'

  4. vcf: the vcf file from which the data is generated

  5. index: an integer


FellouMada/rSNPdata documentation built on June 12, 2022, 7:29 p.m.