Add benchmark pipeline for dense and sparse query testing
Introduces a complete query benchmark track to evaluate performance and verify consistency between dense and sparse index formats. Adds scripts to simulate fixed-size paired-end reads, pack a sparse presence index, execute queries in both modes, and capture wall time and RSS metrics. Includes a verification step that compares outputs by read ID to ensure content identity across parallel processing. Updates build configuration, documentation, and ignore patterns to support the new pipeline for two microbial specimens.
This commit is contained in:
@@ -13,6 +13,11 @@ STOP_WORDS = {'complete', 'chromosome', 'whole', 'sequence', 'genome',
|
||||
'endosymbiont', 'of'}
|
||||
STOP_PREFIXES = ('scaffold', 'contig', 'plasmid')
|
||||
|
||||
# Specimens used as read sources for the query benchmark (see
|
||||
# DevDocMD/implementation/benchmark_query_testing.md): one common bacterium,
|
||||
# one distant lineage (the only archaeon in SPECIES).
|
||||
QUERY_SPECIMENS = ['Escherichia_coli--K-12_MG1655', 'Saccharolobus_islandicus--M.16.4']
|
||||
|
||||
|
||||
def is_stop(tok):
|
||||
t = tok.lower()
|
||||
@@ -113,6 +118,27 @@ def main():
|
||||
print(f'{sp_done} {sp_stats}: global_index_presence/index.done')
|
||||
print(f'{sc_done} {sc_stats}: global_index_count/index.done')
|
||||
|
||||
print()
|
||||
print('QUERY_SPECIMENS :=', ' '.join(QUERY_SPECIMENS))
|
||||
|
||||
by_specimen = {e[0]: e for e in entries}
|
||||
for specimen in QUERY_SPECIMENS:
|
||||
_, species, sim_dir, genome = by_specimen[specimen]
|
||||
query_dir = sim_dir.replace('simulated_data/', 'query_data/', 1)
|
||||
reads = f'{query_dir}/reads_R1.fastq.gz'
|
||||
dense_out = f'query_dense/{specimen}.fasta.gz'
|
||||
dense_stat = f'stats/query_dense/{specimen}.stats'
|
||||
sparse_out = f'query_sparse/{specimen}.fasta.gz'
|
||||
sparse_stat = f'stats/query_sparse/{specimen}.stats'
|
||||
vq_stat = f'stats/verify_query/{specimen}.stats'
|
||||
|
||||
print()
|
||||
print(f'# query: {specimen}')
|
||||
print(f'{reads}: {genome}')
|
||||
print(f'{dense_out} {dense_stat}: {reads} global_index_presence/index.done')
|
||||
print(f'{sparse_out} {sparse_stat}: {reads} global_index_presence_sparse/index.done')
|
||||
print(f'{vq_stat}: {dense_out} {sparse_out}')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user