File: genomic_ranges_list.hpp

package info (click to toggle)
r-bioc-alabaster.base 1.6.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,652 kB
  • sloc: cpp: 11,377; sh: 29; makefile: 2
file content (45 lines) | stat: -rw-r--r-- 1,256 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef TAKANE_GENOMIC_RANGES_LIST_HPP
#define TAKANE_GENOMIC_RANGES_LIST_HPP

#include "H5Cpp.h"

#include <filesystem>
#include <stdexcept>
#include <string>

#include "utils_public.hpp"
#include "utils_compressed_list.hpp"

/**
 * @file genomic_ranges_list.hpp
 * @brief Validation for genomic ranges lists.
 */

namespace takane {

namespace genomic_ranges_list {

/**
 * @param path Path to the directory containing the genomic ranges list.
 * @param metadata Metadata for the object, typically read from its `OBJECT` file.
 * @param options Validation options.
 */
inline void validate(const std::filesystem::path& path, const ObjectMetadata& metadata, Options& options) {
    internal_compressed_list::validate_directory<false>(path, "genomic_ranges_list", "genomic_ranges", metadata, options);
}

/**
 * @param path Path to a directory containing an genomic ranges list.
 * @param metadata Metadata for the object, typically read from its `OBJECT` file.
 * @param options Validation options.
 * @return The length of the list.
 */
inline size_t height(const std::filesystem::path& path, const ObjectMetadata& metadata, Options& options) {
    return internal_compressed_list::height(path, "genomic_ranges_list", metadata, options);
}

}

}

#endif