cnv_db.db

cnv_db.db.create_dgv()[source]

Creates the DGV table in the database of known cnvs.

This executes the SQL CREATE query corresponding to the DGV (Database of Genomic Variants) schema. It does so by reading a compressed text file named ‘dgv-variants-hg19.txt.gz’ representing a database dump in a text file.

cnv_db.db.query_dgv_overlap(cnv)[source]

Queries the dgv table for known overlapping CNVs.

Parameters:cnv (cnv_struct.cnv) – The cnv object to query for overlap.
Returns:A list of overlapping CNV objects.
Return type:list

Internally, this generate the corresponding SQL SELECT from the cnv object and queries the sqlite database.

Note

The elegant method for detecting overlaps is from Stack Overflow.

Previous topic

cnv_db: DGV database interface

Next topic

cnv_struct: A data structure to handle CNVs

This Page