get_close: Finding SPECID for transmission pairs

Description Usage Arguments Details Value Examples

Description

Identifies the SPECID collected nearest a given date, and on the correct side of the date when specified. The criteria is

Usage

1
get_close(meta, date, enrollid, case, iSNV = TRUE)

Arguments

meta

data frame with meta data con

date

The estimated trasmission date

enrollid

The enrollid

case

c("donor","recipient")

iSNV

boolan if TRUE then we take the sample that has iSNV if the "best fit" doesn't. This is the historic use of the function. Recall that we do not have samples before transmission in many cases anyway.

Details

1) Sample closest to transmission that are on the "right side" of tranmission (before transmission for donor if possible)

2) Titer is the tie breaker when applicable.

3) If no iSNV were found in a donor sample and iSNV==T we take the sample with iSNV present.

Value

The SPECID that best fits the critea

Examples

1
2
d<-small_meta$collect[4]+1
get_close(small_meta,d,enrollid = "50001",case = "Donor",iSNV = TRUE)

jtmccr1/HIVEr documentation built on May 29, 2019, 1:50 a.m.