Module Import alias Import alias Import alias Import alias Import alias Import alias identifier Import alias FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Str TupleLoad SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr IfExp AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad ListLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num Expr Call NameLoad NameLoad NameLoad If CompareEq NameLoad Num body Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad orelse Expr Call NameLoad NameLoad NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad For NameStore Call NameLoad Num body TryExcept body If CompareGt NameLoad Num body Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num NameLoad Assign SubscriptStore NameLoad Index Num NameLoad Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Break handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad orelse Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad decorator_list
N/A N/A os N/A shutil N/A sqlite3 N/A sys N/A uuid N/A database gemini_db N/A gemini_load_chunk append_variant_info N/A N/A main_curr chunk_db N/A N/A N/A 
    Append the variant and variant_info data from a chunk_db
    to the main database.
     N/A cmd attach ? as toMerge N/A N/A N/A main_curr execute cmd N/A chunk_db N/A N/A N/A main_curr execute BEGIN TRANSACTION N/A cmd INSERT INTO variants SELECT * FROM toMerge.variants N/A N/A N/A main_curr execute cmd N/A cmd INSERT INTO variant_impacts SELECT * FROM toMerge.variant_impacts N/A N/A N/A main_curr execute cmd N/A N/A N/A main_curr execute END TRANSACTION N/A cmd detach toMerge N/A N/A N/A main_curr execute cmd N/A append_sample_genotype_counts N/A N/A main_curr chunk_db N/A N/A N/A 
    Append the sample_genotype_counts from a chunk_db
    to the main database.
     N/A cmd attach ? as toMerge N/A N/A N/A main_curr execute cmd N/A chunk_db N/A cmd INSERT INTO sample_genotype_counts            SELECT * FROM toMerge.sample_genotype_counts N/A N/A N/A main_curr execute cmd N/A cmd detach toMerge N/A N/A N/A main_curr execute cmd N/A append_sample_info N/A N/A main_curr chunk_db N/A N/A N/A 
    Append the sample info from a chunk_db
    to the main database.
     N/A cmd attach ? as toMerge N/A N/A N/A main_curr execute cmd N/A chunk_db N/A cmd create table samples as select * from toMerge.samples where 1=0 N/A N/A N/A main_curr execute cmd N/A cmd INSERT INTO samples SELECT * FROM toMerge.samples N/A N/A N/A main_curr execute cmd N/A cmd detach toMerge N/A N/A N/A main_curr execute cmd N/A append_resource_info N/A N/A main_curr chunk_db N/A N/A N/A 
    Append the resource info from a chunk_db
    to the main database.
     N/A cmd attach ? as toMerge N/A N/A N/A main_curr execute cmd N/A chunk_db N/A cmd INSERT INTO resources SELECT * FROM toMerge.resources N/A N/A N/A main_curr execute cmd N/A cmd detach toMerge N/A N/A N/A main_curr execute cmd N/A append_version_info N/A N/A main_curr chunk_db N/A N/A N/A 
    Append the version info from a chunk_db
    to the main database.
     N/A cmd attach ? as toMerge N/A N/A N/A main_curr execute cmd N/A chunk_db N/A cmd INSERT INTO version SELECT * FROM toMerge.version N/A N/A N/A main_curr execute cmd N/A cmd detach toMerge N/A N/A N/A main_curr execute cmd N/A append_vcf_header N/A N/A main_curr chunk_db N/A N/A N/A 
    Append the vcf_header from a chunk_db
    to the main database.
     N/A cmd attach ? as toMerge N/A N/A N/A main_curr execute cmd N/A chunk_db N/A cmd INSERT INTO vcf_header SELECT * FROM toMerge.vcf_header N/A N/A N/A main_curr execute cmd N/A cmd detach toMerge N/A N/A N/A main_curr execute cmd N/A append_gene_summary N/A N/A main_curr chunk_db N/A N/A N/A 
    Append the gene_summary from a chunk_db
    to the main database.
     N/A cmd attach ? as toMerge N/A N/A N/A main_curr execute cmd N/A chunk_db N/A cmd INSERT INTO gene_summary SELECT * FROM toMerge.gene_summary N/A N/A N/A main_curr execute cmd N/A cmd detach toMerge N/A N/A N/A main_curr execute cmd N/A append_gene_detailed N/A N/A main_curr chunk_db N/A N/A N/A 
    Append the gene_detailed from a chunk_db
    to the main database.
     N/A cmd attach ? as toMerge N/A N/A N/A main_curr execute cmd N/A chunk_db N/A cmd INSERT INTO gene_detailed SELECT * FROM toMerge.gene_detailed N/A N/A N/A main_curr execute cmd N/A cmd detach toMerge N/A N/A N/A main_curr execute cmd N/A update_sample_genotype_counts N/A N/A main_curr chunk_db N/A N/A N/A 
    Update the main sample_genotype_counts table with the
    counts observed in one of the chunked databases (chunk_db)
     N/A curr_db_conn N/A N/A sqlite3 connect chunk_db N/A N/A curr_db_conn isolation_level None N/A N/A curr_db_conn row_factory N/A sqlite3 Row N/A curr_db_curr N/A N/A curr_db_conn cursor N/A cmd SELECT sample_id, num_hom_ref,                   num_het, num_hom_alt,                   num_unknown FROM sample_genotype_counts N/A N/A N/A curr_db_curr execute cmd N/A row curr_db_curr N/A N/A N/A N/A main_curr execute UPDATE sample_genotype_counts
                          SET num_hom_ref = num_hom_ref + ?,
                              num_het = num_het + ?,
                              num_hom_alt = num_hom_alt + ?,
                              num_unknown = num_unknown + ?
                          WHERE sample_id= ?  N/A N/A row N/A num_hom_ref N/A row N/A num_het N/A row N/A num_hom_alt N/A row N/A num_unknown N/A row N/A sample_id N/A N/A N/A curr_db_curr close N/A merge_db_chunks N/A N/A args N/A N/A N/A N/A N/A N/A os path exists N/A args db N/A N/A N/A N/A os remove N/A args db N/A N/A N/A gemini_db create_tables N/A args db N/A N/A args vcf N/A N/A gemini_load_chunk get_extra_effects_fields args N/A N/A main_conn N/A N/A sqlite3 connect N/A args db N/A N/A main_conn isolation_level None N/A main_curr N/A N/A main_conn cursor N/A N/A N/A main_curr execute PRAGMA synchronous = OFF N/A N/A N/A main_curr execute PRAGMA journal_mode=MEMORY N/A databases N/A N/A database N/A args chunkdbs N/A N/A N/A N/A databases append database N/A N/A idx database N/A enumerate databases N/A N/A db N/A database N/A 0 N/A N/A append_variant_info main_curr db N/A N/A idx 0 N/A N/A N/A append_sample_genotype_counts main_curr db N/A N/A append_sample_info main_curr db N/A N/A append_resource_info main_curr db N/A N/A append_version_info main_curr db N/A N/A append_vcf_header main_curr db N/A N/A append_gene_summary main_curr db N/A N/A append_gene_detailed main_curr db N/A N/A N/A update_sample_genotype_counts main_curr db N/A N/A args index N/A N/A N/A N/A gemini_db create_indices main_curr N/A N/A N/A main_conn commit N/A N/A N/A main_curr close N/A merge_chunks N/A N/A parser args N/A N/A N/A errors N/A N/A try_count N/A range 2 N/A N/A N/A N/A N/A try_count 0 N/A N/A tmp_dbs N/A N/A N/A N/A os path join N/A args tempdir N/A %s.db N/A N/A uuid uuid4 N/A _ N/A args chunkdbs N/A N/A chunk_db tmp_db N/A zip N/A args chunkdbs tmp_dbs N/A N/A N/A N/A shutil copyfile N/A chunk_db N/A 0 tmp_db N/A N/A chunk_db N/A 0 tmp_db N/A output_db N/A args db N/A N/A args db N/A N/A N/A os path join N/A args tempdir N/A %s.db N/A N/A uuid uuid4 N/A N/A merge_db_chunks args N/A N/A try_count 0 N/A N/A N/A N/A shutil move N/A args db output_db N/A tmp_db tmp_dbs N/A N/A N/A N/A os remove tmp_db N/A N/A N/A N/A N/A sqlite3 OperationalError N/A e N/A N/A N/A N/A errors append N/A str e N/A N/A N/A N/A sys stderr write N/A sqlite3.OperationalError: %s
 e N/A N/A N/A Exception N/A Attempted workaround for SQLite locking issue on NFS drives has failed. One possible reason is that the temp directory %s is also on an NFS drive. Error messages from SQLite: %s N/A N/A args tempdir N/A N/A join errors N/A