User Guide
This page presents a "hands on" introduction to bio3d and the R environment. Its is intended to familiarize the user with a few essentials important for getting off to a quick start. In the examples below we assume that you have successfully installed R and the Bio3D package, by following the installation instructions on the Download page.
This page contains the following sections:
• Introduction
• Loading Bio3d
• Finding Help
• Quitting and Bailing out
• Saving your work
• Bio3d Demo
• Example Function Usage
• Loading Bio3d
• Finding Help
• Quitting and Bailing out
• Saving your work
• Bio3d Demo
• Example Function Usage
A number of worked examples are available as short Tutorials on the bio3d wiki. You can also view the online Documentation or download the package manual (in PDF format).
Introduction
R is a software environment for statistical computing and graphics. Amongst other things it includes:
• an effective data handling and storage facility,
• a suite of operators for calculations on arrays, in particular matrices,
• a large, coherent, integrated collection of intermediate tools for data analysis,
• graphical facilities for data analysis and display either on-screen or on hardcopy, and
• a well-developed, simple and effective programming language.
• a suite of operators for calculations on arrays, in particular matrices,
• a large, coherent, integrated collection of intermediate tools for data analysis,
• graphical facilities for data analysis and display either on-screen or on hardcopy, and
• a well-developed, simple and effective programming language.
Bio3d is an R package containing utilities to process, organize and explore structure and sequence data. Features include the ability to read and write structure, sequence and dynamic trajectory data, perform atom selection, re-orientation, superposition, rigid core identification, clustering, distance matrix analysis, conservation analysis and principal component analysis. Bio3d takes advantage of the extensive graphical and statistical capabilities of the R environment and thus represents a useful framework for exploratory analysis of structural data.
Loading bio3d
Start R (type R at the comand prompt or, on Windows, double click on the R icon) and load the bio3d package by typing library(bio3d) at the R console prompt.
Use the command lbio3d() to list the functions within the package.
Finding Help
To get help on a particular function try ?function or help(function).
For example, ?pca.xyz
To search the help system for documentation matching a particular word or topic use the command help.search("topic"). For example, help.search("pdb")
Typing help.start() will start a local HTML interface. After initiating 'help.start()' in a session the '?function' commands will open as HTML pages.
To execute examples for a particular function use the command example(function). To run examples for the read.dcd function try example(read.dcd)
Quitting and Bailing out
R is generally very tolerant, and can be interrupted by Ctrl-C (i.e. hold down the key marked Control and hit the C key). This will interrupt the current operation and return to the R prompt.
To quit R all-together, type q()
Note the option to save your work for future use: "save workspace image [y/n/c]".
Answering yes to this question will result in a binary .RData file being written to the current directory. This file contains details of all objects created in your current session. This file is read the next time R is executed in this directory, providing access to all your previous objects. To avoid this, answer "n" at quit time, or erase the .RData file before re-starting R.
Saving your work
You can save an external representation of any R objects to a specified file using the save() command. The objects can be read back from the file at a later time by using the function load().
To save all objects in your current session use the save.image() command.
Bio3d Demo
Run the command demo(bio3d).
[UNDER CONSTRUCTION]
The bio3d package consists of input/output functions, conversion and manipulation functions, analysis functions, and graphics functions all of which are fully documented. Remember that you can get help on any particular function by using the command ?function or help(function) from within R.
Example Function Usage
To better understand how a particular function operates it is often helpful to view and execute an example. Every function within the bio3d package is documented with example code that you can view by issuing the help command.
Running the command example(function) will directly execute the example for a given function.
In addition, a numer of worked examples are available as short Tutorials on the bio3d wiki.