data(thermo)
## protein length and formula
# first ten proteins in thermo$protein
protein.length(1:10)
# these are all the same
protein.formula("P53_PIG")
protein.formula(iprotein("P53_PIG"))
protein.formula(ip2aa(iprotein("P53_PIG")))
# the formula of a pentapeptide, written in a line
as.chemical.formula(protein.formula(seq2aa("a_test", "ANLSG")))
## steps in calculation of chemical activities of two proteins
## in metastable equilibrium, after Dick and Shock, 2011
protein <- iprotein(c("CSG_METVO", "CSG_METJA"))
# load supplemental database to use "old" [Met] sidechain group
add.obigt()
# set up the basis species to those used in DS11
basis("CHNOS+")
# note this yields logaH2 = -4.657486
swap.basis("O2", "H2")
# show the steps of the equilibrium calculation
protein.equil(protein, loga.protein=-3)
## using protein.formula: average oxidation state of
## carbon of proteins from different organisms
# get amino acid compositions of microbial proteins
# generated from the RefSeq database
file <- system.file("extdata/refseq/protein_refseq.csv.xz", package="CHNOSZ")
ip <- add.protein(read.aa(file))
# only use those organisms with a certain
# number of sequenced bases
ip <- ip[as.numeric(thermo$protein$abbrv[ip]) > 100000]
pf <- protein.formula(thermo$protein[ip, ])
zc <- ZC(pf)
# the organism names we search for
# "" matches all organisms
terms <- c("Halo", "Streptomyces", "Pseudomonas", "Salmonella",
"Escherichia", "Bacteroides", "Lactobacillus", "Staphylococcus",
"Streptococcus", "Methano", "Bacillus", "Thermo", "")
tps <- thermo$protein$ref[ip]
plot(0, 0, xlim=c(1, 13), ylim=c(-0.3, -0.05), pch="",
ylab="average oxidation state of carbon in proteins",
xlab="", xaxt="n", mar=c(6, 3, 1, 1))
for(i in 1:length(terms)) {
it <- grep(terms[i], tps)
zct <- zc[it]
points(jitter(rep(i, length(zct))), zct, pch=20)
}
terms[13] <- paste("all microbial")
axis(1, 1:13, terms, las=2)
title(main=paste("Average Oxidation State of Carbon:",
"Total Protein per taxID in NCBI RefSeq", sep="\n"))
Run the code above in your browser using DataLab