Package org.biojava.nbio.structure.io
Class MMCIFFileReader
java.lang.Object
org.biojava.nbio.structure.io.LocalPDBDirectory
org.biojava.nbio.structure.io.MMCIFFileReader
- All Implemented Interfaces:
StructureIOFile
,StructureProvider
How to parse an mmCif file:
public static void main(String[] args) throws Exception { String filename = "/path/to/something.cif.gz" ; StructureIOFile reader = new MMCIFFileReader(); Structure struc = reader.getStructure(filename); System.out.println(struc); }
- Since:
- 1.7
- Author:
- Andreas Prlic
-
Nested Class Summary
Nested classes/interfaces inherited from class org.biojava.nbio.structure.io.LocalPDBDirectory
LocalPDBDirectory.FetchBehavior, LocalPDBDirectory.ObsoleteBehavior
-
Field Summary
Fields inherited from class org.biojava.nbio.structure.io.LocalPDBDirectory
DEFAULT_PDB_FILE_SERVER, LAST_REMEDIATION_DATE, lineSplit, MIN_PDB_FILE_SIZE, PDB_FILE_SERVER_PROPERTY
-
Constructor Summary
ConstructorDescriptionConstructs a new MMCIFFileReader, initializing the extensions member variable.MMCIFFileReader
(String path) Constructs a new PDBFileReader, initializing the extensions member variable. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
getFilename
(String pdbId) Converts a PDB ID into a filename with the proper extensionprotected String[]
Location of obsolete files within the directory, as an array of paths.protected String[]
Location of split files within the directory, as an array of paths.getStructure
(InputStream inStream) Handles the actual parsing of the file into a Structure object.static void
Methods inherited from class org.biojava.nbio.structure.io.LocalPDBDirectory
addExtension, checkFileExists, clearExtensions, deleteStructure, downloadStructure, getDir, getExtensions, getFetchBehavior, getFileParsingParameters, getInputStream, getLocalFile, getObsoleteBehavior, getPath, getServerName, getStructure, getStructure, getStructure, getStructureById, initPaths, isAutoFetch, prefetchStructure, setAutoFetch, setFetchBehavior, setFileParsingParameters, setObsoleteBehavior, setPath
-
Field Details
-
MMCIF_SPLIT_DIR
-
MMCIF_OBSOLETE_DIR
-
-
Constructor Details
-
MMCIFFileReader
public MMCIFFileReader()Constructs a new MMCIFFileReader, initializing the extensions member variable. The path is initialized in the same way asUserConfiguration
, i.e. to system property/environment variableUserConfiguration.PDB_DIR
. Both autoFetch and splitDir are initialized to false -
MMCIFFileReader
Constructs a new PDBFileReader, initializing the extensions member variable. The path is initialized to the given path, both autoFetch and splitDir are initialized to false.
-
-
Method Details
-
main
- Throws:
Exception
-
getStructure
Description copied from class:LocalPDBDirectory
Handles the actual parsing of the file into a Structure object.- Specified by:
getStructure
in classLocalPDBDirectory
- Returns:
- Throws:
IOException
-
getMMcifConsumer
-
getFilename
Description copied from class:LocalPDBDirectory
Converts a PDB ID into a filename with the proper extension- Specified by:
getFilename
in classLocalPDBDirectory
- Returns:
- The filename, e.g. "4hhb.pdb.gz"
-
getSplitDirPath
Description copied from class:LocalPDBDirectory
Location of split files within the directory, as an array of paths. These will be joined with either slashes (for the URL) or the file separator (for directories). The returned results should be constant, to allow for caching.- Specified by:
getSplitDirPath
in classLocalPDBDirectory
- Returns:
- A list of directories, relative to the /pub/pdb directory on the server
-
getObsoleteDirPath
Description copied from class:LocalPDBDirectory
Location of obsolete files within the directory, as an array of paths. These will be joined with either slashes (for the URL) or the file separator (for directories). The returned results should be constant, to allow for caching.- Specified by:
getObsoleteDirPath
in classLocalPDBDirectory
- Returns:
- A list of directories, relative to the /pub/pdb directory on the server
-