Package org.biojava.bio.structure.server
Class FlatFileInstallation
- java.lang.Object
-
- org.biojava.bio.structure.server.FlatFileInstallation
-
- All Implemented Interfaces:
PDBInstallation
public class FlatFileInstallation extends java.lang.Object implements PDBInstallation
a PDB installation that reads all files from one directory in the file system. and keeps several files with the information parsed from the PDB headers for easier data access.
In particular these files are:- pdbinfo.txt - contains resolution, experimetnal technique, deposition and modification date, biological description of the structure
- chaininfo.txt - contains information about every chain, like the compound information from the header, the nr of amino acids in chain, The alignment to the SEQRES residues
- Author:
- Andreas Prlic
- See Also:
PrepareIndexFile
-
-
Field Summary
Fields Modifier and Type Field Description static java.text.SimpleDateFormatdateFormatstatic java.lang.StringDEFAUL_CHAIN_FILEstatic java.lang.StringDEFAULT_INDEX_FILEstatic java.util.logging.Loggerlogger
-
Constructor Summary
Constructors Constructor Description FlatFileInstallation(java.io.File filePath)create a new FlatFile Installation and point it to the directory that contains all PDB files
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPDBFilter(PDBFilter filter)add a filter for PDB files.voidapplyFilters()voidclearFilters()remove all filters, next time getAll is called, it will return all available PDBsjava.util.List<PDBHeader>getAll()get all PDBHeaders that pass the added Filters, if no filters have been added returns all available PDBsjava.io.FilegetChainInfoFile()java.io.FilegetFilePath()PDBHeadergetPDBHeader(java.lang.String pdbId)get the PDB header for a single protein structurejava.io.FilegetPDBInfoFile()StructuregetStructure(java.lang.String pdbId)request a structure by its PDB identifierbooleanhasNext()return if the iteration over all structures will return another structureStructurenext()iterate over all structures in this Installation that pass the provided filters and return the next one in the list.voidsetChainInfoFile(java.io.File chainInfoFile)voidsetFilePath(java.io.File filePath)voidsetPDBInfoFile(java.io.File indexFile)
-
-
-
Field Detail
-
logger
public static final java.util.logging.Logger logger
-
DEFAULT_INDEX_FILE
public static final java.lang.String DEFAULT_INDEX_FILE
- See Also:
- Constant Field Values
-
DEFAUL_CHAIN_FILE
public static final java.lang.String DEFAUL_CHAIN_FILE
- See Also:
- Constant Field Values
-
dateFormat
public static java.text.SimpleDateFormat dateFormat
-
-
Method Detail
-
getPDBInfoFile
public java.io.File getPDBInfoFile()
-
setPDBInfoFile
public void setPDBInfoFile(java.io.File indexFile)
-
getChainInfoFile
public java.io.File getChainInfoFile()
-
setChainInfoFile
public void setChainInfoFile(java.io.File chainInfoFile)
-
getFilePath
public java.io.File getFilePath()
-
setFilePath
public void setFilePath(java.io.File filePath)
-
addPDBFilter
public void addPDBFilter(PDBFilter filter)
Description copied from interface:PDBInstallationadd a filter for PDB files. THis can be used to request, e.g. all X-ray structures, or all structures with a given resolution, all proteins with a certain function, etc.- Specified by:
addPDBFilterin interfacePDBInstallation- Parameters:
filter- the filter to apply when getAll is being called.- See Also:
PDBInstallation.getAll()
-
clearFilters
public void clearFilters()
Description copied from interface:PDBInstallationremove all filters, next time getAll is called, it will return all available PDBs- Specified by:
clearFiltersin interfacePDBInstallation
-
applyFilters
public void applyFilters()
-
getAll
public java.util.List<PDBHeader> getAll()
Description copied from interface:PDBInstallationget all PDBHeaders that pass the added Filters, if no filters have been added returns all available PDBs- Specified by:
getAllin interfacePDBInstallation- Returns:
- a list of PDBHeader objects
-
getPDBHeader
public PDBHeader getPDBHeader(java.lang.String pdbId)
Description copied from interface:PDBInstallationget the PDB header for a single protein structure- Specified by:
getPDBHeaderin interfacePDBInstallation- Returns:
- the PDB header object
-
getStructure
public Structure getStructure(java.lang.String pdbId)
Description copied from interface:PDBInstallationrequest a structure by its PDB identifier- Specified by:
getStructurein interfacePDBInstallation- Returns:
- the structure for the pdbId
-
hasNext
public boolean hasNext()
Description copied from interface:PDBInstallationreturn if the iteration over all structures will return another structure- Specified by:
hasNextin interfacePDBInstallation- Returns:
- true if there is another structure that has not been iterated over yet
-
next
public Structure next()
Description copied from interface:PDBInstallationiterate over all structures in this Installation that pass the provided filters and return the next one in the list.- Specified by:
nextin interfacePDBInstallation- Returns:
- the next structure
-
-