R/get_Model.R

Defines functions .get.Model

.get.Model <- function(model.available, model.folder, assembly, pop)
{
  list.models = getModelsList()
  if(is.data.frame(list.models)) {
    if(!any(list.models$name==model.available))
    {
      return(NA)
    }
    model.name = paste(model.available,".",assembly,".",pop,".Model.gds",sep="")
    if(!file.exists(file.path(model.folder,model.name)))
    {
      download.file(paste("https://github.com/cibiobcg/EthSEQ_Data/raw/master/EthSEQ_Models_v3/",model.name,sep=""),
                    file.path(model.folder,model.name),mode='wb')
    }
    return(file.path(model.folder,model.name))
  }
  else {
    return(NA)
  }
}

Try the EthSEQ package in your browser

Any scripts or data that you put into this service are public.

EthSEQ documentation built on March 31, 2023, 10:59 p.m.