writePHMM {aphid}R Documentation

Export profile hidden Markov models as text.

Description

writePHMM takes an object of class "PHMM" and writes it to a text file in HMMER3 format.

Usage

writePHMM(x, file = "", append = FALSE, form = "HMMER3", vers = "f")

Arguments

x

an object of class "PHMM".

file

the name of the file to write the model to.

append

logical indicating whether the model text should be appended below any existing text in the output file, or whether any existing text should be overwritten. Defaults to FALSE.

form

character string indicating the format in which to write the model. Currently only HMMER3f is supported.

vers

character string indicating the version of version of the format in which to write the model. Currently only "f" is supported.

Details

This function writes an object of class "PHMM" to a HMMER3/f text file. Note that unlike HMMER, the aphid package does not currently support position-specific background emission probabilities.

Value

NULL (invisibly)

Author(s)

Shaun Wilkinson

References

Finn, RD, Clements J & Eddy SR (2011) HMMER web server: interactive sequence similarity searching. Nucleic Acids Research. 39 W29-W37. http://hmmer.org/.

HMMER: biosequence analysis using profile hidden Markov models. http://www.hmmer.org.

See Also

readPHMM to parse a PHMM object from a HMMER3 text file.

Examples

  ## Derive a profile hidden Markov model from the small globin alignment
  data(globins)
  x <- derivePHMM(globins, residues = "AMINO", seqweights = NULL)
  x
  fl <- tempfile()
  writePHMM(x, file = fl)
  readPHMM(fl)
  ##
  ## Derive a PHMM for the woodmouse data and write to file
  
    library(ape)
    data(woodmouse)
    woodmouse.PHMM <- derivePHMM(woodmouse)
    tmpf <- tempfile(fileext = ".hmm")
    writePHMM(woodmouse.PHMM, file = tmpf)
  

[Package aphid version 1.3.5 Index]