R/rm.sequence.fasta.R

rm.sequence.fasta <- function(infile, outfile = "sequence.removed.fasta",to.rm = NULL){
    dat <- read.fasta(infile)
    sequence.to.keep.index <- !as.character(dat[,1]) %in% to.rm
    dat <- dat[sequence.to.keep.index,] 
    dat2fasta(dat, outfile = outfile)
}

Try the phylotools package in your browser

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

phylotools documentation built on May 2, 2019, 3:25 a.m.