Learn R Programming

vanddraabe (version 1.1.1)

getAtomTypeCounts: Get AtomType Counts

Description

Counts the number of AtomTypes within the provided string.

Usage

getAtomTypeCounts(atom.types)

Arguments

atom.types

A vector of strings containing a combination of the 167 AtomTypes.

Value

a vector of numbers indicating the counts of each AtomType. The vector is ordered based on the names.AtomTypes with AtomTypes not included assigned a value of zero (0).

Details

This is a wrapper using the base::table() function. The vector of AtomTypes (strings) are passed to the function, non-standard AtomTypes are removed, the AtomTypes are counted, and the counts are ordered based on the names.AtomTypes constant.

NOTE: This is a non-public function.

See Also

Other utilities: ConservationSet, DetermineChainsOfInterest, ExtractFileTimeStamp, ExtractPDBids, FileTimeStamp, HasXWaters, Nearby, ProtHetWatIndices, RescaleValues, RetainChainsOfInterest, ReturnPDBfullPath, StandardizeAsparticAcidNames, StandardizeCysteineNames, StandardizeGlutamicAcidNames, StandardizeHistidineNames, StandardizeLysineNames, TimeSpan, UniqueAtomHashes, aaStandardizeNames, getResTypeCounts, res2xyz, resAtomType2AtomClass, write.basic.pdb, write.conservedWaters.pdb

Examples

Run this code
# NOT RUN {
  
# }
# NOT RUN {
  set.seed(13)
  num.AtomTypes <- sample(1:10, 30, replace = TRUE)
  atom.types <- rep(sample(names.res.AtomTypes, 30), num.AtomTypes)
  getAtomTypeCounts(atom.types)
  # [1]  0  0  0  0  0  0  0  0  0  0  0  0  0  7  1  0  0  0  0
  #      0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0  0
  #      0  0  0  4  0  0  0  0  4  3  6  0  0  0  0  0  0  0  0
  #      0  0 10  0  8  0  0  0  0  0  0  0  0  0  0  0  0  0  6
  #      4  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  #      0  5  0  0  0  0  0  0  0  7  0  0  0  0  0  0  0  7  0
  #      3  0  0  5  3  0  5  0  0  5  8  0  8  0  8  0  0  0  0
  #      0  0  2  0  0  1  0  0  0  3  0  0  6  0  0  0  0  0  3
  #      0  0  0  0 10  0  0  0  0  0  0  1  0  0  0
  
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab