BioJava Cookbook for release 3.*
BioJava 3 is a major re-write of BioJava 1. As such many things work differently. This cookbook provides examples how to work with the new codebase.
The page was inspired by various programming cookbooks and follows a "How do I...?" type approach. Each "How do I?" is linked to some example code that does what you want and sometimes more. Basically if you find the code you want and copy and paste it into your program you should be up and running quickly. I have endeavoured to over document the code to make it more obvious what I am doing so some of the code might look a bit bloated.
BioJava: an open-source framework for bioinformatics in 2012
Andreas Prlic; Andrew Yates; Spencer E. Bliven; Peter W. Rose; Julius Jacobsen; Peter V. Troshin; Mark Chapman; Jianjiong Gao; Chuan Hock Koh; Sylvain Foisy; Richard Holland; Gediminas Rimsa; Michael L. Heuer; H. Brandstatter-Muller; Philip E. Bourne; Scooter Willis Bioinformatics 2012;
How Do I....?
Core Module - Working with Sequences
Required modules: biojava3-core
- Overview of biojava3-core?
- How are sequences created?
- How do I compare two DNA Sequences and create a consensus sequence?
- How do I read or write Fasta files?
- How do I read Genbank files?
- How do I view Features on a sequence?
Required modules: biojava3-structure, biojava3-alignment Optional module : biojava3-structure-gui for the 3D visualisation Optional external library : JmolApplet.jar for the 3D visualisation
See also the BioJava 3 tutorial for an introduction into the protein structure modules.
- How can I parse a PDB file?
- How can I parse a .mmcif file?
- What is the BioJava structure datamodel?
- How can I do calculations on atoms?
- How can I access the header information of a PDB file?
- How does BioJava deal with SEQRES and ATOM groups?
- How can I mutate a residue?
- How can I calculate a structure alignment?
- How can I use a simple GUI to calculate an alignment?
- How can I interact with Jmol?
- How can I serialize to a database?
- How can I load data from the SCOP classification?
- How can I work with the Berkeley version of SCOP?
- How can I find residues binding a ligand?
- How to work with biological assemblies of proteins
- How to get information using RCSB's RESTful services
- How do I calculate the true length of a structure?
Pairwise and Multiple Sequence Alignment
Required modules: biojava3-alignment, biojava3-core, biojava3-phylo Required external library: forester.jar
- How can I read a Sequence Alignment in Stockholm format? (Pfam, Rfam)
- How can I calculate a Pairwise Sequence Alignment? (Smith Waterman, Needleman Wunsch)
- How can I calculate a Pairwise Sequence Alignment with DNA sequences?
- How can I create a Multiple Sequence Alignment?
- How can I profile the time and memory requirements of a Multiple Sequence Alignment?
Required modules: biojava3-genome
Required modules: biojava3-core,biojava3-sequencing Required external library: guava-11.0.1.jar
Required modules: biojava3-core Required external library: forester.jar
- How do I convert Profile object into Multiple Sequence Alignment object to be use in the TreeConstructor
Physico-Chemical Properties Computation
Required modules: biojava3-aa-prop, biojava3-structure and biojava3-core
- How can I compute physico-chemical properties via APIs?
- How can I compute physico-chemical properties using Command Prompt?
- How can I compute PROFEAT properties via APIs?
Required modules: biojava3-protein-disorder
- How can I predict disordered regions of the protein using its sequence?
- Can I use the predictor from the command line?
Protein Modification Identification
Required modules: biojava3-modfinder, biojava-structure
- How can I identify protein modifications in a 3D structure?
- How can I get the list of supported protein modifications?
- How can I define and register a new protein modification?
Remote Web Service Calls
Required modules: biojava3-core, biojava-ws
- How can I use NCBI's QBlast service ?
- How can I use Blast XML Output in my program?
- How can I get Pfam annotations for a protein sequence using the Hmmer3 service?
Legacy 1.8.x CookBook
The CookBook for the legacy 1.8.x code base is available from BioJava:CookBookLegacy.