Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDataDir ¶
func DefaultDataDir() string
DefaultDataDir returns the OS-standard data directory for ATB. If ATB_DATA_DIR (or its compact alias ATB_DATADIR) is set, it takes precedence on every platform — useful for shared installations where each user (or a system-wide profile) wants to point at a common data volume without editing per-user config files. On Windows: %LOCALAPPDATA%\atb\data On macOS: ~/Library/Application Support/atb/data On Linux/other: $XDG_DATA_HOME/atb/data or ~/.local/share/atb/data
func DefaultPath ¶
func DefaultPath() string
DefaultPath returns the default config file path. If ATB_CONFIG is set, it takes precedence — letting a shared-server admin point all users at a single config file via /etc/profile.d. On Windows: %LOCALAPPDATA%\atb\config.toml On macOS: ~/Library/Application Support/atb/config.toml On Linux/other: $XDG_CONFIG_HOME/atb/config.toml or ~/.config/atb/config.toml
func ExpandPath ¶
ExpandPath expands a leading ~ to the user's home directory.
func ResolveDataDir ¶ added in v0.16.0
ResolveDataDir returns the effective data directory using this precedence:
- flagValue (--data-dir CLI flag) if non-empty
- ATB_DATA_DIR environment variable (alias: ATB_DATADIR)
- cfg.General.DataDir from the loaded config
Use this everywhere a command needs the data directory so the env var works in shared-server setups without forcing each user to maintain their own config file.
Types ¶
type AGCConfig ¶ added in v0.18.0
type AGCConfig struct {
ArchiveMapURL string `toml:"archive_map_url"`
ArchiveBaseURL string `toml:"archive_base_url"`
ArchiveDir string `toml:"archive_dir"`
}
AGCConfig holds overrides for AGC genome-archive retrieval. An empty ArchiveMapURL or ArchiveDir falls back to the default in internal/sources; an empty ArchiveBaseURL means downloads resolve through the published index rather than a synthesized base URL.
type Config ¶
type Config struct {
General GeneralConfig `toml:"general"`
Fetch FetchConfig `toml:"fetch"`
Download DownloadConfig `toml:"download"`
AGC AGCConfig `toml:"agc"`
}
Config holds all configuration for atb.
type DownloadConfig ¶
type DownloadConfig struct {
Parallel int `toml:"parallel"`
OutputDir string `toml:"output_dir"`
CheckDiskSpace bool `toml:"check_disk_space"`
MinFreeSpaceGB int `toml:"min_free_space_gb"`
}
DownloadConfig holds settings for genome downloads.
type FetchConfig ¶
FetchConfig holds settings for metadata fetching.
type GeneralConfig ¶
type GeneralConfig struct {
DataDir string `toml:"data_dir"`
DefaultFormat string `toml:"default_format"`
}
GeneralConfig holds general application settings.