org.strbio.mol
Class ProteinSet

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by org.strbio.mol.PolymerSet
                  extended by org.strbio.mol.ProteinSet
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess
Direct Known Subclasses:
ProfileSet

public class ProteinSet
extends PolymerSet

Class to represent a set of proteins to be acted on in a group.

 Version 1.35, 7/22/99 - moved findPDBName to org.strbio.local.PDB
 Version 1.34, 7/9/99 - added thread
 Version 1.33, 6/4/99 - added predictSS
 Version 1.32, 11/23/98 - fixed findDSSP to handle compressed PDB files
 Version 1.31, 8/7/98 - added writeXXX(outfile)
 Version 1.3, 7/10/98 - can create a ProteinSet from a Profile
 Version 1.21, 6/10/98 - added writeCASP
 Version 1.2, 4/23/98 - now extends PolymerSet
 Version 1.1, 4/9/98 - added findPDB, findDSSP, readList
 Version 1.0, 4/2/98 - original version
 

Version:
1.35, 7/22/99
Author:
JMC
See Also:
Protein, ThreadSet, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.strbio.mol.PolymerSet
PolymerSet.PolymerEnumeration
 
Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ProteinSet()
          Create an empty protein set.
ProteinSet(Profile q)
          Make a protein set from a profile... the protein set will contain newly created Proteins, one per sequence in the profile.
ProteinSet(ProteinSet y)
          Copy another protein set, but not the proteins (only the pointers to them).
 
Method Summary
static ProteinSet findDSSP(java.lang.String name, Printf outfile)
          find and load proteins from a DSSP file (do DSSP on PDB file)
static ProteinSet findPDB(java.lang.String name, Printf outfile)
          find and load proteins from a PDB file.
 void fixDistanceGaps()
          Fix distance gaps in this set; replace all proteins with gaps with a set of chains that has been split up at the gap boundaries.
 Polymer newPolymer()
          Make sure this set contains only Proteins.
 void predictSS(Printf outfile)
          Predict the secondary structure of these proteins, using the default method (Pred2ary, with large jury).
 void predictSS(Printf outfile, SSPredictor method)
          Predict the secondary structure of these proteins, using a specified prediction method.
 Protein protein(int i)
          Return the i'th protein in the array.
 long residues()
          total # of residues in the set
 ThreadResults[] thread(Printf outfile)
          Thread, using the default method.
 ThreadResults[] thread(Printf outfile, ThreadMethod method)
          Thread the proteins, using a specified threading method.
 boolean write(java.lang.String filename)
          Write set to a file, with name determined by the suffix.
 void writeCASP(Printf outfile)
          Write set to CASP file.
 void writeCASP(java.lang.String filename)
          Write set to CASP file.
 void writeConv(Printf outfile)
          Write set to Conv file.
 void writeConv(java.lang.String filename)
          Write set to Conv file.
 void writeEA(Printf outfile)
          Write set to EA file.
 void writeEA(java.lang.String filename)
          Write set to EA file.
 void writePDB(Printf outfile)
          Write set to PDB file, including all SEQRES, JMCSTR, and ATOM records.
 void writePDB(Printf outfile, boolean vanillaPDB)
          Write set to PDB file.
 void writePDB(java.lang.String filename)
          Write set to PDB file, including all SEQRES, JMCSTR, and ATOM records.
 void writePDB(java.lang.String filename, boolean vanillaPDB)
          Write set to PDB file.
 void writeVar2(Printf outfile)
          Write set to Var2 file.
 void writeVar2(java.lang.String filename)
          Write set to Var2 file.
 
Methods inherited from class org.strbio.mol.PolymerSet
add, add, add, addReversedCopies, clear, clearPolymers, clearProperties, clearProperty, ensureNames, findClosest, getNames, getPropertyAll, getPropertyOne, isEqual, keepOnlyChainID, keepOnlyNames, keepOnlyNamesFuzzy, load, n, nMonomers, noSpaceNames, nPolymersInFile, p, polymer, polymers, polymersInFile, polymersInFile, polymersInFile, polymersInFile, printNames, read, read, read, readList, remove, remove, removeRedundantSequences, save, searchByName, searchByNameFuzzy, searchByNameFuzzy, searchByNameFuzzyIndex, searchByNameFuzzyIndex, searchByNameIndex, setPolymerAt, setProperty, stripNoAtoms, writeFasta, writeFasta, writeList, writeList, writePTS, writePTS, writeYAPF, writeYAPF
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

ProteinSet

public ProteinSet()
Create an empty protein set.


ProteinSet

public ProteinSet(ProteinSet y)
Copy another protein set, but not the proteins (only the pointers to them).


ProteinSet

public ProteinSet(Profile q)
Make a protein set from a profile... the protein set will contain newly created Proteins, one per sequence in the profile. Information from each residue in the profile is copied into each residue of each protein. Gaps are also copied.

Method Detail

newPolymer

public Polymer newPolymer()
Make sure this set contains only Proteins.

Overrides:
newPolymer in class PolymerSet

protein

public Protein protein(int i)
Return the i'th protein in the array.


writePDB

public final void writePDB(java.lang.String filename,
                           boolean vanillaPDB)
                    throws java.io.IOException
Write set to PDB file.

Parameters:
filename - name of file to write to
vanillaPDB - if true, won't write JMCSTR records
Throws:
java.io.IOException
See Also:
Protein.writePDB(org.strbio.io.Printf, boolean)

writePDB

public final void writePDB(Printf outfile,
                           boolean vanillaPDB)
                    throws java.io.IOException
Write set to PDB file.

Parameters:
outfile - file to write to
vanillaPDB - if true, won't write JMCSTR records
Throws:
java.io.IOException
See Also:
Protein.writePDB(org.strbio.io.Printf, boolean)

writePDB

public final void writePDB(java.lang.String filename)
                    throws java.io.IOException
Write set to PDB file, including all SEQRES, JMCSTR, and ATOM records.

Overrides:
writePDB in class PolymerSet
Parameters:
filename - name of file to write to
Throws:
java.io.IOException
See Also:
Protein.writePDB(org.strbio.io.Printf, boolean)

writePDB

public final void writePDB(Printf outfile)
                    throws java.io.IOException
Write set to PDB file, including all SEQRES, JMCSTR, and ATOM records.

Overrides:
writePDB in class PolymerSet
Parameters:
outfile - open Printf to write to
Throws:
java.io.IOException
See Also:
Protein.writePDB(org.strbio.io.Printf, boolean)

writeEA

public final void writeEA(java.lang.String filename)
                   throws java.io.IOException
Write set to EA file.

Throws:
java.io.IOException
See Also:
Protein.writeEA(org.strbio.io.Printf)

writeEA

public final void writeEA(Printf outfile)
                   throws java.io.IOException
Write set to EA file.

Throws:
java.io.IOException
See Also:
Protein.writeEA(org.strbio.io.Printf)

writeCASP

public final void writeCASP(java.lang.String filename)
                     throws java.io.IOException
Write set to CASP file.

Throws:
java.io.IOException
See Also:
Protein.writeCASP(org.strbio.io.Printf)

writeCASP

public final void writeCASP(Printf outfile)
                     throws java.io.IOException
Write set to CASP file.

Throws:
java.io.IOException
See Also:
Protein.writeCASP(org.strbio.io.Printf)

writeConv

public final void writeConv(java.lang.String filename)
                     throws java.io.IOException
Write set to Conv file.

Throws:
java.io.IOException
See Also:
Protein.writeConv(org.strbio.io.Printf)

writeConv

public final void writeConv(Printf outfile)
                     throws java.io.IOException
Write set to Conv file.

Throws:
java.io.IOException
See Also:
Protein.writeConv(org.strbio.io.Printf)

writeVar2

public final void writeVar2(java.lang.String filename)
                     throws java.io.IOException
Write set to Var2 file.

Throws:
java.io.IOException
See Also:
Protein.writeVar2(org.strbio.io.Printf)

writeVar2

public final void writeVar2(Printf outfile)
                     throws java.io.IOException
Write set to Var2 file.

Throws:
java.io.IOException
See Also:
Protein.writeVar2(org.strbio.io.Printf)

write

public boolean write(java.lang.String filename)
              throws java.io.IOException
Write set to a file, with name determined by the suffix. Returns true if the name was understood, or false if a default (YAPF format) file was written.

Overrides:
write in class PolymerSet
Throws:
java.io.IOException

residues

public final long residues()
total # of residues in the set


findPDB

public static final ProteinSet findPDB(java.lang.String name,
                                       Printf outfile)
                                throws java.io.IOException
find and load proteins from a PDB file.

Throws:
java.io.IOException

findDSSP

public static final ProteinSet findDSSP(java.lang.String name,
                                        Printf outfile)
                                 throws java.io.IOException
find and load proteins from a DSSP file (do DSSP on PDB file)

Throws:
java.io.IOException

predictSS

public void predictSS(Printf outfile,
                      SSPredictor method)
               throws java.io.IOException
Predict the secondary structure of these proteins, using a specified prediction method.

Throws:
java.io.IOException

predictSS

public void predictSS(Printf outfile)
               throws java.io.IOException
Predict the secondary structure of these proteins, using the default method (Pred2ary, with large jury).

Throws:
java.io.IOException

thread

public ThreadResults[] thread(Printf outfile,
                              ThreadMethod method)
                       throws java.io.IOException
Thread the proteins, using a specified threading method.

Throws:
java.io.IOException

thread

public ThreadResults[] thread(Printf outfile)
                       throws java.io.IOException
Thread, using the default method.

Throws:
java.io.IOException

fixDistanceGaps

public void fixDistanceGaps()
Fix distance gaps in this set; replace all proteins with gaps with a set of chains that has been split up at the gap boundaries.