organize_metadata: Organize HIV metadata

Description Usage Arguments Value Examples

View source: R/miscellaneous.R

Description

This function aims to organize the HIV metadata in a format that will be more useful for the analysis of HIV transmissions in Senegal using coalescent model. It mainly gets information on different dataframes and organize them so as to create a matrix for the states (demes) on the phylogenetic tree

Usage

1
organize_metadata(metadata_CGR, metadata_SN)

Arguments

metadata_CGR

data.frame object that contains metadata for the CGR (close global reference) sequences. These sequeces will receive the state "src", a deme in our mathematical model.

metadata_SN

data.frame object that contains all metadata for the Senegal (SN) sequences. Sequences will receive the states: "gpf", "gpm", or "msm".

Value

a data.frame object containing 2 columns. The first column represents the sequences name, and second column represents the state of the sequences. In our case, state can be any of the demes (gpf, gpm, msm, and src).

Examples

1
2
3
4
5
6
all.data.cgr <- read.csv(system.file("data/HIV_subtypes_summary_CGR.csv",
                                     package = "senegalHIVmodel"))
all.data.SN <- read.csv(system.file("data/HIV_subtypes_summary_SENEGAL_noDups.csv",
                                     package = "senegalHIVmodel"))

all_data <- organize_metadata(all.data.cgr, all.data.SN)

thednainus/senegalHIVmodel documentation built on Oct. 28, 2021, 3:11 p.m.