Archive/NESCent.code/DNAbin2gtypes.R

############### Take test data FASTA file and trial ########################
## takes a FASTA file


DNAbin2gtypes <- function(go, strata, id.pop = 1){

  sv <- id.pop


  go <- as.matrix(go)

  x <- sapply(rownames(go), function(n) {
    as.character(go[n, ])[1, ]
  }, simplify = FALSE)

  gtypes(strata, strata.col = sv, dna.seq = x)

}
christianparobek/skeleSim documentation built on Feb. 29, 2020, 6:58 p.m.