R/get_lead_pos.R

Defines functions get_lead_pos

get_lead_pos <- function(dat,
                         xvar,
                         index_SNP){
    leadSNP <- SNP <- NULL;
    
    if (is.null(index_SNP)) {
        lead.pos <- subset(dat, leadSNP==TRUE)[[xvar]]
    } else {
        lead.pos <- subset(dat, SNP == index_SNP)[[xvar]]
    }
    return(lead.pos)
}
RajLabMSSM/echoannot documentation built on Oct. 26, 2023, 2:41 p.m.