vardb package¶
The vardb package contains utilities for loading and querying data in vardb. The contents of this package are used in other scripts and apis to build complex functionality.
Subpackages¶
- vardb.connections package
- Submodules
- vardb.connections.bioapps module
- vardb.connections.bioapps_api module
- vardb.connections.bioapps_sql module
- vardb.connections.connection module
- vardb.connections.karen module
- vardb.connections.lims module
- vardb.connections.vardb_connection module
- vardb.connections.vardb_hdfs module
- vardb.connections.vardb_loader module
- vardb.metadata_wrangling package
- Subpackages
- vardb.metadata_wrangling.oasis package
- Submodules
- vardb.metadata_wrangling.oasis.demographics module
- vardb.metadata_wrangling.oasis.diagnosis module
- vardb.metadata_wrangling.oasis.drug_map module
- vardb.metadata_wrangling.oasis.error_code module
- vardb.metadata_wrangling.oasis.helpers module
- vardb.metadata_wrangling.oasis.oasis module
- vardb.metadata_wrangling.oasis.output module
- vardb.metadata_wrangling.oasis.preprocess module
- vardb.metadata_wrangling.oasis.radiation module
- vardb.metadata_wrangling.oasis.treatment module
- vardb.metadata_wrangling.oasis package
- Submodules
- vardb.metadata_wrangling.configuration module
- vardb.metadata_wrangling.get_bam_cnvs module
- vardb.metadata_wrangling.helpers module
- vardb.metadata_wrangling.loader_maker module
- vardb.metadata_wrangling.locate_metadata_changes module
- vardb.metadata_wrangling.metadata_collector module
- Subpackages
- vardb.queries package
- vardb.variant_data_files package
- vardb.variant_file_loaders package
Submodules¶
vardb.tools module¶
Some helper functions. Currently the only one that is frequently used is the initialize_logger function.
-
class
vardb.tools.
StreamToLogger
(logger, log_level=20)¶ Bases:
object
Fake file-like stream object that redirects writes to a logger instance.
-
write
(buf)¶
-
-
vardb.tools.
get_login_from_file
(filename)¶ Gets account info from ~/filename (.ginaccount for bioapps, .pgpass for vardb, .limsaccount for lims)
Returns: a string with username:password
-
vardb.tools.
get_md5sum
(path)¶ Gets md5sum for file
Returns: md5sum for the file
-
vardb.tools.
initialize_logger
(filename=None, logLevel='info', logLevel_streaming='warning')¶ Initializes a logger with the indicated filename. Also, sends stderr to the logger as well.
Parameters: filename –
-
vardb.tools.
line_count
(filename)¶ Just calculates the line count of a file
Parameters: filename – Returns: line count of file with filename
-
vardb.tools.
production_error_handling
(log_name)¶ This outer function handles passing the log name to the decorator.
Parameters: log_name – Name of the logger to use.