Learn R Programming

vDiveR (version 2.0.0)

metadata_extraction: Metadata Extraction from NCBI/GISAID EpiCoV FASTA file

Description

This function retrieves metadata (ID, region, date) from the input FASTA file, with the source of, either NCBI (with default FASTA header) or GISAID (with default FASTA header). The function will return a dataframe that has three columns consisting ID, collected region and collected date. Records that do not have region or date information will be excluded from the output dataframe.

Usage

metadata_extraction(file_path, source)

Value

A dataframe that has three columns consisting ID, collected region and collected date

Arguments

file_path

path of fasta file

source

the source of fasta file, either "NCBI" or "GISAID"

Examples

Run this code
filepath <- system.file('extdata','GISAID_EpiCoV.faa', package = 'vDiveR')
meta_gisaid <- metadata_extraction(filepath, 'GISAID')

Run the code above in your browser using DataLab