Help with PCA Projection

Issue #902 new
Former user created an issue

Hello,

I am trying to project a new structure as well as MD data into the PC space from the existing structures in the PDB. I have seen Issue #463 as well as the tutorials and am struggling to get my script to work.

Following the tutorial #load new structure pdb <- read.pdb("newstructure.pdb")

#read sequence from the new structure seq <- pdbseq(pdb)

#blast search for related structures in the pdb blast <- blast.pdb(seq)

#restrict pdbs to high similarity hits <- plot.blast(blast, cutoff=240)

#download the files files <- get.pdb(hits, path="raw_pdbs", split = TRUE)

#extract and align sequences pdbs <- pdbaln(files, web.args=list(email='name@university.edu'))

#find core residues that do not deviate in the structures core <- core.find(pdbs)

#core selection core.inds <- print(core, vol=1.0)

#align the files based on the core xyz <- pdbfit(pdbs, core.inds)

#ignore gaps in the structure gaps.pos <- gap.inspect(pdbs$xyz)

#calculate PCA for structures currently in the pdb pc.xray <- pca.xyz(xyz[, gaps.pos$f.inds])

Here is where I get stuck. I know I need to align both the new structure and the MD trajectory (of the new structure) and then project it, but I am struggling to get this correct.

#align the new structure to the core xyz1 <- fit.xyz(pdb$xyz, core.inds)

#project onto existing PC space proj1 <-project.pca(xyz1,pc.xray)

#load simulation files dcd <- read.dcd("simulation.dcd")

#align simulation frames as in the tutorial xyz2 <- fit.xyz(fixed=pdb$xyz, mobile=dcd, fixed.inds=ca.inds$xyz, mobile.inds=ca.inds$xyz, rm.gaps=TRUE)

#project simulation frames proj2 <-project.pca(xyz2, pc.xray)

Thank you for your help.

Comments (1)

  1. Log in to comment