Get annotations from pdbs of hits error
pdb <- read.pdb("1tag")
seq <- pdbseq(pdb)
blast <- blast.pdb(seq)
blast
hits <- plot.blast(blast, cutoff=240)
head(hits$hits)
head(hits$pdb.id)
anno <- pdb.annotate(hits$acc)
Warning message:
In .format_tbl(ret, ids, anno.terms, unique = unique) :
Annotation data could not be found for PDB ids:
3OHM_A
I am trying to get annotations from pdbs of hits, but I get the following error. I presume it's because 3OHM is replaced by 7SQ2, so how do I remove 3OHM from the hits, thanks!
http://thegrantlab.org/bio3d_v2/tutorials/principal-component-analysis
Comments (4)
-
-
reporter Dear Xinqiu,
Thanks for your reply, when I continue the code below, the new error report will appear.
Because there are 100 characters in the “hits“ variable, but only 99 in the “annotation“ variable, which is just one more character "3OHM ".
I get the following error ”Error in
[.data.frame
(annotation, , "color") : undefined columns selected”. I think when I remove 3OHM from the hits, it should fix this error, but I don't know how to remove 3OHM from “hits”, can you guide me? Thanks!
head(anno[, c("resolution", "ligandId", "citation")])
files <- get.pdb(hits, path="raw_pdbs", split = TRUE)
pdbs <- pdbaln(files)
core <- core.find(pdbs)
col=rep("black", length(core$volume))
col[core$volume<2]="pink"; col[core$volume<1]="red"
plot(core, col=col)
core.inds <- print(core, vol=1.0)
write.pdb(xyz=pdbs$xyz[1,core.inds$xyz], file="quick_core.pdb")
xyz <- pdbfit( pdbs, core.inds )
rd <- rmsd(xyz)
hist(rd, breaks=40, xlab="RMSD (Å)", main="Histogram of RMSD")
hc.rd <- hclust(as.dist(rd))
pdbs$id <- substr(basename(pdbs$id), 1, 6)
annotation <- pdb.annotate(hits)
hclustplot(hc.rd, colors=annotation[, "color"], labels=pdbs$id, cex=0.5,
ylab="RMSD (Å)", main="RMSD Cluster Dendrogram", fillbox=FALSE)Error in
[.data.frame
(annotation, , "color") :
undefined columns selected
Bests,
Dang
-
You can first identify the position of the problem PDB code and then remove the corresponding element from every part of the “hits”. For example,
ind <- grep("3OHM", hits$pdb.id) hits$pdb.id <- hits$pdb.id[-ind] hits$hits <- hits$hits[-ind, ] hits$acc <- hits$acc[-ind]
-
reporter Thank you for your help.
- Log in to comment
It should be removed already. The warning message can be ignored.