CLI Module¶
The command-line interface module provides the main entry point for VariantCentrifuge.
Command-line interface for VariantCentrifuge.
- variantcentrifuge.cli.main()[source]¶
Run main entry point for variantcentrifuge CLI.
- Return type:
- Steps:
Parse arguments.
Configure logging and load config.
Validate mandatory parameters (reference, filters, fields).
Validate input files (VCF, phenotype).
Update configuration with CLI parameters.
Run the pipeline.
- Changes for presets:
Added a –preset argument which allows specifying one or more predefined filters.
If multiple presets are chosen, they are combined with AND (&).
If user-specified filters are also provided, they are combined with these presets using AND.
Presets must be defined in config.json under “presets”.
- Changes for sample substring removal:
Added a –remove-sample-substring argument which, if provided, removes the specified substring from all sample names extracted from the VCF before any comparisons or mappings.
- Changes for links:
Added a –no-links argument to disable adding link columns. By default, links are added.
- Changes for custom columns:
Added a –add-column argument which can be given multiple times to append columns with given headers (but blank values) to the final output.
- Changes for transcript filtering:
Added a –transcript-list and –transcript-file argument which allows specifying one or more transcript IDs (by comma-separated list or a file with one transcript ID per line).
If provided, these transcripts are used to construct a SnpSift filter expression that filters variants by EFF[*].TRID field.
- New changes for extra sample fields in genotype:
Replaced the old two-flag logic with a single –append-extra-sample-fields flag that optionally takes zero or more fields. If this flag is used with no arguments, it simply enables genotype+field appending with no extra fields. If arguments (space-separated) are provided, those fields are appended (e.g. DP, AD).
We retain –extra-sample-field-delimiter to control the delimiter between genotype and extra fields (default ‘:’).