data(AA)
AA
AA.lm<-lm(AA$Monoisotopic ~ AA$Average)
plot(AA$Monoisotopic, AA$Average);
abline(AA.lm, col='grey')
text(AA$Monoisotopic, AA$Average, AA$letter1, pos=3)
plot(AA$Average-AA$Monoisotopic)
axis(3,1:20,AA$letter1);
abline(v=1:20,col='grey')
# computes monoisotopic mass out of formula using the CDK package
if (FALSE) {
if (require(rcdk)){
plot(AA$Monoisotopic,
sapply(AA$formula, function(x){
get.formula(as.character(x), charge = 1)@mass
}))
}
}
if (FALSE) {
if (require(XML)){
unimodurl <- url("http://www.unimod.org/xml/unimod_tables.xml")
unimod.list <- XML::xmlToList(
XML::xmlParse(
scan(unimodurl, what = character())))
unimod.AA <- data.frame(
do.call('rbind', unimod.list$amino_acids))
rownames(unimod.AA) <- unimod.AA$one_letter
}
}
Run the code above in your browser using DataLab