gesel
Validating Gesel database files
Loading...
Searching...
No Matches
gesel Namespace Reference

Validate Gesel-related file formats. More...

Functions

void validate_database (const std::string &prefix, uint64_t num_genes)
 
std::uint64_t validate_genes (const std::string &prefix, const std::vector< std::string > &types)
 
std::uint64_t validate_genes (const std::string &prefix)
 

Detailed Description

Validate Gesel-related file formats.

Function Documentation

◆ validate_database()

void gesel::validate_database ( const std::string & prefix,
uint64_t num_genes )
inline

Validate Gesel database files for a particular species. Any invalid formatting or inconsistency between files will result in an error.

Parameters
prefixPrefix for the Gesel database files.
num_genesTotal number of genes for this species. This should be obtained from the accompanying gene annotation files, validated by validate_genes().

◆ validate_genes() [1/2]

std::uint64_t gesel::validate_genes ( const std::string & prefix)
inline

Validate Gesel gene annotation files of any version for a particular species. Any invalid formatting or inconsistency between files will result in an error.

For version 0.1.0, this function scans for all files starting with prefix and ending with ".tsv.gz", i.e., following the <prefix><type>.tsv.gz pattern. This may not work correctly when the gene annotation files are saved in the same directory as the database files.

Parameters
prefixPrefix for the Gesel gene annotation files.
Returns
Number of genes.

◆ validate_genes() [2/2]

std::uint64_t gesel::validate_genes ( const std::string & prefix,
const std::vector< std::string > & types )
inline

Validate Gesel gene annotation files (version 0.1.0) for a particular species. Any invalid formatting or inconsistency between files will result in an error.

In general, users should call the validate_genes() overload that does not accept types. This specific overload is only provided to enable validation in the unfortunate case where the gene annotation files are saved in the same directory as the database files.

Parameters
prefixPrefix for the Gesel gene annotation files. This should be of the form <DIRECTORY>/<SPECIES>_, where <SPECIES> is an NCBI taxonomy ID.
typesVector of gene identifier types, e.g., "ensembl", "symbol". This should contain at least one value.
Returns
Number of genes.