samples_db creates and queries a database containing of familial statuses and mean coverage.

samples_db.create_db(trios_file, coverage_file, delete=False)[source]

Creates a database containing trio information.

Parameters:
  • trios_file (str) – The path to a file containing trio information.
  • coverage_file (str) – The path to a file containing mean coverage for samples.
  • delete (bool) – Flag that determines if the sqlite database file will be overriden when running this function.

Samples files are available in the sample_db_files directory from this repository.

samples_db.get_coverage_for_sample(s)[source]

Executes a query over the datavase to find the coverage for a given sample.

Parameters:s (str) – The sample (e.g. LP6005057-DNA_F03)
Returns:The mean coverage for this sample.
Return type:str (could be casted to a float)
samples_db.get_sample_ids_for_family(f)[source]

Executes a query over the database to find the samples from a given family.

Parameters:f (str) – The family (e.g. 1443)
Returns:A dictionary containing the familial status (mother, father, twin1 or twin2 as a key and the sample id as a value.

Previous topic

plot_size_doc_scatter: Tool to plot the depth of coverage information as a function of CNV size

Next topic

validation: a module used for command line arguments validation

This Page