Home

Awesome

tmhmm

BranchGitHub Actions logoCodecov logo
masterR-CMD-checkcodecov.io
developR-CMD-checkcodecov.io

R package for TMHMM [1, 2], to predict transmembrane helices in proteins.

Please note that this page is intended for academic users only. Other users are requested to contact the Software Package Manager at health-software@dtu.dk

Install

usethis::install_github("richelbilderbeek/tmhmm")

Install TMHMM to a default folder:

library(tmhmm)
install_tmhmm("https://services.healthtech.dtu.dk/download/28c408dc-ef5e-47ad-a284-66754bcd27f7")

The URL can be obtained by requesting a download link at the TMHMM website at https://services.healthtech.dtu.dk/service.php?TMHMM-2.0. As this URL expires after four hours, tmhmm cannot do this for you.

Example

library(tmhmm)

# Use an example proteome
fasta_filename <- system.file(
  "extdata",
  "UP000464024.fasta",
  package = "tmhmm"
)

# Predict the topology
topology <- predict_topology(fasta_filename)

# Simplify the protein names
topology$name <- stringr::str_match(
  string = topology$name,
  pattern = "..\\|.*\\|(.*)_SARS2"
)[,2]

# Plot the topology
plot_topology(topology)

Each element of the topology sequence denotes the location of each amino acid:

SARS-CoV-2 topology

FAQ

Under which operating systems does tmhmm work?

tmhmm can only work on the set of operating systems TMHMM works on. Currently, only Linux is supported:

Operating systemSupported by TMHMMSupported by tmhmm
AIXY?
IRIX32Y?
IRIX64Y?
LinuxYY
MacOSNN
OSF1Y?
SunOSY?
WindowsNN

Are there similar packages?

These are the ones I use:

Note that running script shows that TMHMM is approximately 100x faster than PureseqTM:

fasta_filename <- system.file("extdata", "UP000464024.fasta", package = "pureseqtmr")
system.time({tmhmm::predict_topology(fasta_filename = fasta_filename)})
system.time({pureseqtmr::predict_topology(fasta_filename = fasta_filename)})

Results:

> system.time({tmhmm::predict_topology(fasta_filename = fasta_filename)})
   user  system elapsed 
  1.723   0.008   1.733 
> system.time({pureseqtmr::predict_topology(fasta_filename = fasta_filename)})
   user  system elapsed 
117.511   1.746  85.748 

Also when running these tools from scripts, the results are similar:

time ./bin/decodeanhmm.Linux_x86_64 lib/TMHMM2.0.model UP000464024.fasta -f lib/TMHMM2.0.options
[...]
real	0m1.379s
user	0m1.375s
sys	0m0.004s
time ./PureseqTM_proteome.sh -i UP000464024.fasta 
71
real	0m53.471s
user	1m36.354s
sys	0m1.426s

References