Access Infernal commands from Julia.
This package is registered. Install with:
import Pkg
Pkg.add("Infernal")This package does not export any symbols.
Use either qualified calls such as Infernal.cmfetch(...) or import the
functions you need explicitly:
using Infernal: cmfetch, cmalign, cmalign_parse_sfileMost functions are thin wrappers around Infernal command-line tools. They write command outputs to temporary files and return a named tuple containing the generated paths.
cmfetch: fetch a covariance model from a CM databasecmalign: align sequences to a covariance modelcmalign_parse_sfile: parsecmalign --sfileoutput into aDataFramecmbuild: build a covariance model from an alignmentcmemit: emit example sequences from a covariance modelcmcalibrate: calibrate a covariance modelcmsearch: search sequences with a covariance modelcmsearch_parse_tblout: parsecmsearch --tbloutoutput into aDataFrameesl_afetch: fetch an alignment from an MSA databaseesl_reformat: convert between sequence/alignment formats
using Infernal: cmfetch, cmalign, cmalign_parse_sfile
cm = cmfetch("/path/to/Rfam.cm", "RF00162")
alignment = cmalign(cm.out, "/path/to/sequences.fasta"; outformat="Stockholm")
summary = cmalign_parse_sfile(alignment.sfile)
summary[:, ["seq_name", "bit_sc", "avg_pp"]]alignment.out contains the alignment written by cmalign, while
alignment.sfile contains the per-sequence summary parsed above.
using Infernal: esl_afetch, esl_reformat
seed = esl_afetch("/path/to/Rfam.seed", "RF00162")
afa = esl_reformat("AFA", seed.out; informat="Stockholm")
println(read(afa.out, String))using Infernal: cmbuild, cmemit, cmsearch, cmsearch_parse_tblout
built = cmbuild("/path/to/alignment.sto"; informat="Stockholm")
emitted = cmemit(built.cmout; N=5, outformat="AFA")
search = cmsearch(built.cmout, emitted.out)
hits = cmsearch_parse_tblout(search.tblout)- The wrapped Infernal commands must succeed or the functions throw
ProcessFailedException. - Temporary output files are not deleted automatically; remove them when they are no longer needed.
Supported platforms:
- Linux
- macOS (Intel & M-series)
Windows not supported because Infernal is not available for Windows (use WSL instead).