Previous changeset 1:54dd1596e04e (2019-01-13) Next changeset 3:ddef4de91df6 (2019-03-27) |
Commit message:
planemo upload for repository https://github.com/galaxycomputationalchemistry/galaxy-tools-compchem/tree/master/tools/bio3d commit cd0830e5e3502721fa355cc8e3fedc331201a6e4 |
added:
test-data/PCA_1.pdb visualize_pc.R |
b |
diff -r 54dd1596e04e -r 5892927664be test-data/PCA_1.pdb --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/PCA_1.pdb Tue Feb 26 08:27:55 2019 -0500 |
b |
b'@@ -0,0 +1,14791 @@\n+MODEL 1\n+ATOM 1 CA ALA 1 24.197 5.292 5.774 1.00 0.05 \n+ATOM 2 CA ALA 2 23.445 7.891 3.028 1.00 0.04 \n+ATOM 3 CA ALA 3 24.995 9.213 -0.229 1.00 0.04 \n+ATOM 4 CA ALA 4 24.439 12.164 -2.595 1.00 0.05 \n+ATOM 5 CA ALA 5 25.954 11.194 -5.963 1.00 0.08 \n+ATOM 6 CA ALA 6 22.514 11.125 -7.630 1.00 0.05 \n+ATOM 7 CA ALA 7 20.153 14.073 -7.862 1.00 0.08 \n+ATOM 8 CA ALA 8 17.482 13.463 -5.205 1.00 0.04 \n+ATOM 9 CA ALA 9 14.490 15.817 -5.576 1.00 0.02 \n+ATOM 10 CA ALA 10 11.052 14.708 -4.396 1.00 0.07 \n+ATOM 11 CA ALA 11 8.198 15.513 -6.896 1.00 0.02 \n+ATOM 12 CA ALA 12 5.822 18.263 -5.514 1.00 0.04 \n+ATOM 13 CA ALA 13 2.245 17.206 -4.720 1.00 0.05 \n+ATOM 14 CA ALA 14 -0.383 19.619 -3.321 1.00 0.04 \n+ATOM 15 CA ALA 15 -3.326 18.616 -1.169 1.00 0.03 \n+ATOM 16 CA ALA 16 -6.175 20.200 0.820 1.00 0.02 \n+ATOM 17 CA ALA 17 -6.648 20.354 4.596 1.00 0.01 \n+ATOM 18 CA ALA 18 -10.198 21.285 5.623 1.00 0.04 \n+ATOM 19 CA ALA 19 -11.428 22.994 8.812 1.00 0.05 \n+ATOM 20 CA ALA 20 -14.240 22.210 11.307 1.00 0.04 \n+ATOM 21 CA ALA 21 -15.968 25.339 9.926 1.00 0.04 \n+ATOM 22 CA ALA 22 -16.143 23.831 6.418 1.00 0.03 \n+ATOM 23 CA ALA 23 -13.303 25.671 4.682 1.00 0.02 \n+ATOM 24 CA ALA 24 -10.421 23.993 2.844 1.00 0.01 \n+ATOM 25 CA ALA 25 -6.811 25.245 2.494 1.00 0.01 \n+ATOM 26 CA ALA 26 -4.007 24.119 0.146 1.00 0.03 \n+ATOM 27 CA ALA 27 -1.040 22.400 1.855 1.00 0.02 \n+ATOM 28 CA ALA 28 2.156 21.854 -0.155 1.00 0.06 \n+ATOM 29 CA ALA 29 4.028 18.533 0.065 1.00 0.06 \n+ATOM 30 CA ALA 30 6.117 16.163 -2.035 1.00 0.04 \n+ATOM 31 CA ALA 31 6.368 12.391 -2.616 1.00 0.03 \n+ATOM 32 CA ALA 32 9.409 10.160 -1.944 1.00 0.01 \n+ATOM 33 CA ALA 33 10.183 6.647 -3.273 1.00 0.01 \n+ATOM 34 CA ALA 34 10.995 3.651 -1.004 1.00 0.01 \n+ATOM 35 CA ALA 35 14.535 2.434 -0.203 1.00 0.03 \n+ATOM 36 CA ALA 36 13.984 -0.881 -2.019 1.00 0.05 \n+ATOM 37 CA ALA 37 13.549 0.773 -5.456 1.00 0.03 \n+ATOM 38 CA ALA 38 16.787 2.795 -4.941 1.00 0.04 \n+ATOM 39 CA ALA 39 20.345 1.757 -5.847 1.00 0.07 \n+ATOM 40 CA ALA 40 22.321 0.268 -2.894 1.00 0.05 \n+ATOM 41 CA ALA 41 26.077 0.879 -3.164 1.00 0.03 \n+ATOM 42 CA ALA 42 29.273 1.550 -1.211 1.00 0.03 \n+ATOM 43 CA ALA 43 29.818 4.986 0.448 1.00 0.04 \n+ATOM 44 CA ALA 44 33.171 5.621 -1.259 1.00 0.02 \n+ATOM 45 CA ALA 45 32.479 4.215 -4.713 1.00 0.06 \n+ATOM 46 CA ALA 46 29.962 3.090 -7.378 1.00 0.04 \n+ATOM 47 CA ALA 47 30.361 -0.512 -6.123 1.00 0.03 \n+ATOM 48 CA ALA 48 27.092 -2.453 -5.754 1.00 0.05 \n+ATOM 49 CA ALA 49'..b'.271 -23.421 -6.056 1.00 0.05 \n+ATOM 386 CA ALA 386 -18.831 -20.648 -6.522 1.00 0.07 \n+ATOM 387 CA ALA 387 -20.917 -22.335 -3.781 1.00 0.07 \n+ATOM 388 CA ALA 388 -18.422 -21.355 -1.011 1.00 0.09 \n+ATOM 389 CA ALA 389 -19.049 -17.938 0.678 1.00 0.11 \n+ATOM 390 CA ALA 390 -16.213 -15.339 0.421 1.00 0.09 \n+ATOM 391 CA ALA 391 -14.237 -17.392 -2.120 1.00 0.05 \n+ATOM 392 CA ALA 392 -15.125 -15.344 -5.236 1.00 0.04 \n+ATOM 393 CA ALA 393 -13.819 -11.735 -5.068 1.00 0.04 \n+ATOM 394 CA ALA 394 -14.186 -10.779 -8.753 1.00 0.04 \n+ATOM 395 CA ALA 395 -14.563 -11.904 -12.357 1.00 0.03 \n+ATOM 396 CA ALA 396 -10.865 -12.326 -13.334 1.00 0.02 \n+ATOM 397 CA ALA 397 -9.716 -15.776 -14.545 1.00 0.02 \n+ATOM 398 CA ALA 398 -7.731 -18.105 -12.223 1.00 0.03 \n+ATOM 399 CA ALA 399 -5.424 -18.609 -15.234 1.00 0.04 \n+ATOM 400 CA ALA 400 -4.283 -14.973 -14.844 1.00 0.02 \n+ATOM 401 CA ALA 401 -2.147 -13.312 -12.122 1.00 0.04 \n+ATOM 402 CA ALA 402 1.155 -13.783 -13.925 1.00 0.02 \n+ATOM 403 CA ALA 403 3.548 -10.722 -13.835 1.00 0.02 \n+ATOM 404 CA ALA 404 5.405 -11.613 -17.064 1.00 0.04 \n+ATOM 405 CA ALA 405 2.104 -11.975 -18.956 1.00 0.04 \n+ATOM 406 CA ALA 406 0.828 -8.568 -17.766 1.00 0.02 \n+ATOM 407 CA ALA 407 4.203 -6.980 -18.675 1.00 0.08 \n+ATOM 408 CA ALA 408 3.835 -8.287 -22.218 1.00 0.11 \n+ATOM 409 CA ALA 409 0.169 -7.322 -22.591 1.00 0.07 \n+ATOM 410 CA ALA 410 -0.257 -4.001 -20.729 1.00 0.04 \n+ATOM 411 CA ALA 411 3.174 -2.365 -19.968 1.00 0.03 \n+ATOM 412 CA ALA 412 2.097 1.289 -20.212 1.00 0.03 \n+ATOM 413 CA ALA 413 -0.758 0.762 -17.730 1.00 0.01 \n+ATOM 414 CA ALA 414 -0.921 3.400 -15.002 1.00 0.02 \n+ATOM 415 CA ALA 415 -2.788 4.441 -11.864 1.00 0.01 \n+ATOM 416 CA ALA 416 -3.627 8.153 -11.551 1.00 0.02 \n+ATOM 417 CA ALA 417 -4.688 9.952 -8.356 1.00 0.04 \n+ATOM 418 CA ALA 418 -5.878 13.552 -7.876 1.00 0.03 \n+ATOM 419 CA ALA 419 -7.870 15.831 -5.583 1.00 0.03 \n+ATOM 420 CA ALA 420 -6.649 14.822 -2.057 1.00 0.02 \n+ATOM 421 CA ALA 421 -8.791 16.537 0.622 1.00 0.02 \n+ATOM 422 CA ALA 422 -8.475 15.737 4.352 1.00 0.02 \n+ATOM 423 CA ALA 423 -10.483 17.155 7.299 1.00 0.03 \n+ATOM 424 CA ALA 424 -13.106 16.563 10.015 1.00 0.05 \n+ATOM 425 CA ALA 425 -16.080 14.342 8.995 1.00 0.05 \n+ATOM 426 CA ALA 426 -18.451 16.404 6.797 1.00 0.03 \n+ATOM 427 CA ALA 427 -15.858 18.916 5.559 1.00 0.01 \n+ATOM 428 CA ALA 428 -14.438 17.551 2.262 1.00 0.01 \n+ATOM 429 CA ALA 429 -17.527 18.224 0.113 1.00 0.03 \n+ATOM 430 CA ALA 430 -16.755 21.948 0.408 1.00 0.01 \n+ATOM 431 CA ALA 431 -14.705 23.937 -2.210 1.00 0.07 \n+ATOM 432 CA ALA 432 -10.871 23.713 -2.349 1.00 0.04 \n+ATOM 433 CA ALA 433 -8.634 26.639 -1.246 1.00 0.00 \n+ENDMDL\n+END \n' |
b |
diff -r 54dd1596e04e -r 5892927664be visualize_pc.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/visualize_pc.R Tue Feb 26 08:27:55 2019 -0500 |
[ |
@@ -0,0 +1,45 @@ +#!/usr/bin/env Rscript + +options(stringAsfactors = FALSE) +args <- commandArgs(trailingOnly = TRUE) + +library(bio3d) + +dcdfile <- args[1] +pdbfile <- args[2] + +dcd <- read.dcd(dcdfile) +pdb <- read.pdb(pdbfile) + +method <- args[3] +selection <- args[4] +domain <- args[5] +id <- args[6] +pcid <- as.integer(id) + +pdbout <- args[7] + + +if (selection == "string") { + inds <- atom.select(pdb, string = domain) +} +if (selection == "elety") { + inds <- atom.select(pdb, elety = domain) +} +if (selection == "resid") { + inds <- atom.select(pdb, resid = domain) +} +if (selection == "segid") { + inds <- atom.select(pdb, segid = domain) +} +xyz <- fit.xyz(fixed=pdb$xyz, mobile=dcd, fixed.inds=inds$xyz, mobile.inds=inds$xyz) + +if (method == "FALSE") { + pc <- pca.xyz(xyz[,inds$xyz], use.svd=FALSE) +} +if (method == "TRUE") { + pc <- pca.xyz(xyz[,inds$xyz], use.svd=TRUE) +} + +mktrj.pca(pc, pc=pcid, b=pc$au[,pcid], file=pdbout) + |