Predict the Topology of a Membrane Protein

  collapse = TRUE,
  comment = "#>"

This demo shows how to estimate the location of the amino acids in a membrane protein. This package tmhmm uses the tool TMHMM to do so. The amino acids of a membrane protein are estimated to be either inside the cell (the cytosol side), outside of the cell (the surroundings of the cell) or in the transmembrane part.

Load the library:


For this vignette to work, TMHMM must have been installed. TMHMM can be installed using install_tmhmm, but this does require a download link that must be requested from


The TMHMM installation is checked here, with the goal of producing a helpful error message:


We need a FASTA file to work on:

fasta_filename <- system.file("extdata", "tmhmm.fasta", package = "tmhmm")
cat(readLines(fasta_filename), sep = "\n")

Estimating the locations of the amino acids:

if (is_tmhmm_installed()) {
  locatome <- run_tmhmm(fasta_filename)
  cat(locatome, sep = "\n")

The legend of these locations:

Character|Location ---------|--------------------- i |Inside or cytosol-side o |Outside or surroundings-side M |Transmembrane

Try the tmhmm package in your browser

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

tmhmm documentation built on Nov. 18, 2020, 9:07 a.m.