14.1.7. Data Output¶
14.1.7.1. mosaic.mdio.sqlite3MDIO module¶
digraph inheritance299f813db9 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "metaMDIO.metaMDIO" [URL="mosaic.meta.html#mosaic.mdio.metaMDIO.metaMDIO",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip=".. warning:: |metaclass|"]; "sqlite3MDIO.data_record" [URL="#mosaic.mdio.sqlite3MDIO.data_record",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Smart data record structure that automatically encodes/decodes data for storage"]; "sqlite3MDIO.sqlite3MDIO" [URL="#mosaic.mdio.sqlite3MDIO.sqlite3MDIO",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "metaMDIO.metaMDIO" -> "sqlite3MDIO.sqlite3MDIO" [arrowsize=0.5,style="setlinewidth(0.5)"]; }A class that extends metaMDIO to implement SQLite support for metadata storage.
- Created:
9/28/2014
- Author:
Arvind Balijepalli <arvind.balijepalli@nist.gov>
- License:
See LICENSE.TXT
- ChangeLog:
- class mosaic.mdio.sqlite3MDIO.data_record(data_label, data, data_t)[source]¶
Bases:
dict
Smart data record structure that automatically encodes/decodes data for storage in a sqlite3 DB.
- class mosaic.mdio.sqlite3MDIO.sqlite3MDIO[source]¶
Bases:
metaMDIO
- csvString(query)[source]¶
Return database records that match the specified query as a CSV formatted string.
- exportToCSV(query)[source]¶
Export database records that match the specified query to a CSV flat file.
- queryDB(query)[source]¶
Important
Abstract method: This method must be implemented by a sub-class.
Query a database. :Parameters:
query : query string
See also
See specific implementations of metaMDIO for query syntax.
- readAnalysisInfo()[source]¶
Important
Abstract method: This method must be implemented by a sub-class.
Read analysis information from the database.
- readAnalysisLog()[source]¶
Important
Abstract method: This method must be implemented by a sub-class.
Read the analysis log from the database.
- readSettings()[source]¶
Important
Abstract method: This method must be implemented by a sub-class.
Read JSON settings from the database.
- writeAnalysisInfo(infolist)[source]¶
Important
Abstract method: This method must be implemented by a sub-class.
Write analysis information to the database. Note that subsequent calls to this method will overwrite the analysis inoformation entry in the table.
- Args:
- infolistA list of strings in the following order [ datPath, dataType, partitionAlgorithm, processingAlgorithm, filteringAlgorithm].
datPath : full path to the data directory
dataType : type of data processed (e.g. ABF, QDF, etc.)
partitionAlgorithm : name of partition algorithm (e.g. eventSegment)
processingAlgorithm : name of event processing algorithm (e.g. multStateAnalysis)
filteringAlgorithm : name of filtering algorithm (e.g. waveletDenoiseFilter) or None if no filtering was performed.
- writeAnalysisLog(analysislog)[source]¶
Important
Abstract method: This method must be implemented by a sub-class.
Write the analysis log string to the database. Note that subsequent calls to this method will overwrite the analysis log entry.
- Args:
analysislog : analysis log string to save