R/read.phy.R

read.phy <-
function(fil = NULL)
{
  if(is.null(fil)){
    stop("You have to specify the input phylip file.")
  }
  fil <- readLines(fil)
  fil = fil[grepl("[A-Za-z1-9]", fil)]
  if(length(fil) <= 1){
    stop("The input file contains only one row, is it in phy format?")
  }
  class(fil) <- "phy"
  return(fil)
}

Try the seqRFLP package in your browser

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

seqRFLP documentation built on May 2, 2019, 6:02 a.m.