Functions to easily extract various info from aa.index

Issue #912 new
Former user created an issue

Functions to easily extract various info from aa.index

from: data(bio3d::aa.index)

Hydrophobicity Indexes

hydrophob = function() { tmp = sapply(bio3d::aa.index, function(x) grepl("(?i)Hydropath|Hydrophob", x$D)) I = lapply(bio3d::aa.index[tmp], function(x) x$I); do.call(rbind, I); }

Descriptions

describe = function(width = 0.9 * getOption("width"), indent.ext = 3, print=TRUE) { txt = sapply(bio3d::aa.index, '[[', "D"); txt = paste0(names(txt), ": ", txt); if(print) { cat(strwrap(txt, width=width, exdent=indent.ext), sep = "\n"); } invisible(txt); }

The latest version of the code is on my GitHub page: - the functions are included in the specified file; https://github.com/discoleo/R/blob/master/Chemistry/Proteins.Structure.R

Comments (0)

  1. Log in to comment