Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.structure
Class Mutator

    java.lang.Object
      org.biojava.bio.structure.Mutator

    public class Mutator

extends Object

A class that can change one amino acid to another. Side chain atoms are neglected, only the Cb atom is kept. example usage:

     String filename   =  "/Users/ap3/WORK/PDB/5pti.pdb" ;
     String outputfile =  "/Users/ap3/WORK/PDB/mutated.pdb" ;

     PDBFileReader pdbreader = new PDBFileReader();

     try{
         Structure struc = pdbreader.getStructure(filename);
         System.out.println(struc);

         String chainId = " ";
         String pdbResnum = "3";
         String newType = "ARG";

         // mutate the original structure and create a new one.
          Mutator m = new Mutator();
          Structure newstruc = m.mutate(struc,chainId,pdbResnum,newType);

          FileOutputStream out= new FileOutputStream(outputfile);
          PrintStream p =  new PrintStream( out );

          p.println (newstruc.toPDB());

          p.close();

      } catch (Exception e) {
          e.printStackTrace();
      }

Since:
  1.5
Version:
  %I% %G%
Author:
  Andreas Prlic

Constructor Summary
`Mutator()`

Method Summary
`Structure` | `mutate(Structure struc, String chainId, String pdbResnum, String newType)` creates a new structure which is identical with the original one.
`AminoAcid` | `mutateResidue(AminoAcid oldAmino, String newType)` create a new residue which is of the new type.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Mutator

    public Mutator()

Method Detail

### mutate

    public Structure mutate(Structure struc,
                            String chainId,
                            String pdbResnum,
                            String newType)
                     throws PDBParseException

  creates a new structure which is identical with the original one. only one amino acid will be different.

  Parameters:
    `struc` - the structure object that is the container for the residue to be mutated
    `chainId` - the id (name) of the chain to be mutated. @see Chain.getName()
    `pdbResnum` - the PDB residue number of the residue
    `newType` - the new residue type (3 characters)
  Returns:
    a structure object where one residue has been modified
  Throws:
    `PDBParseException`

### mutateResidue

    public AminoAcid mutateResidue(AminoAcid oldAmino,
                                   String newType)
                            throws PDBParseException

  create a new residue which is of the new type. Only the atoms N, Ca, C, O, Cb will be considered.

  Parameters:
    `oldAmino` -
    `newType` -
  Returns:
    a new, mutated, residue
  Throws:
    `PDBParseException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD