gtrack.convert_to_indexed: Convert a track to indexed format

View source: R/db-index.R

gtrack.convert_to_indexedR Documentation

Convert a track to indexed format

Description

Converts a per-chromosome track to indexed format (track.dat + track.idx).

Usage

gtrack.convert_to_indexed(track = NULL)

Arguments

track

track name to convert

Details

This function converts a track from the per-chromosome file format to single-file indexed format. The indexed format dramatically reduces file descriptor usage for genomes with many contigs and provides better performance for parallel access.

The function performs the following steps:

  1. Validates that all per-chromosome files have consistent metadata

  2. Creates track.dat by concatenating all per-chromosome files

  3. Creates track.idx with offset/length information for each chromosome

  4. Uses atomic operations (fsync + rename) to ensure data integrity

  5. Removes the old per-chromosome files after successful conversion

Value

None

See Also

gtrack.create, gtrack.create_sparse, gtrack.create_dense

Examples

## Not run: 
# Convert a track to indexed format
gtrack.convert_to_indexed("my_track")

## End(Not run)

misha documentation built on Dec. 14, 2025, 9:06 a.m.