Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Command Overview

Binx provides a suite of commands for genomic analysis. Each command is designed to handle a specific task in the analysis pipeline.

Command Structure

All Binx commands follow the pattern:

binx <command> [options]

Get help for any command with --help:

binx --help           # List all commands
binx gwas --help      # Help for specific command

Available Commands

Analysis Commands

CommandDescriptionPrimary Use
gwasGenome-wide association studyIdentify trait-associated markers
kinshipCompute kinship matrixAccount for population structure
dosageEstimate genotype dosagesProcess read count data

Utility Commands

CommandDescriptionPrimary Use
convertConvert file formatsPrepare VCF data for analysis
plotGenerate visualizationsCreate Manhattan/QQ plots
qtlExtract QTLsIdentify significant loci
thresholdCalculate thresholdsDetermine significance cutoffs

Typical Workflows

Basic GWAS Pipeline

# 1. Convert VCF to Binx format
binx convert --vcf data.vcf.gz --output geno.tsv --format gwaspoly

# 2. Compute kinship matrix
binx kinship --geno geno.tsv --ploidy 4 --out kinship.tsv

# 3. Run GWAS
binx gwas --geno geno.tsv --pheno pheno.csv --trait yield \
          --kinship kinship.tsv --ploidy 4 --out results.csv

# 4. Visualize results
binx plot --input results.csv --output manhattan.svg --plot-type manhattan

With Dosage Estimation from VCF

# 1. Estimate dosages from VCF with allele depths
binx dosage --vcf data.vcf.gz --ploidy 4 --output geno.tsv --format gwaspoly

# 2. Continue with GWAS...
binx gwas --geno geno.tsv --pheno pheno.csv --out results.csv --trait yield --ploidy 4

Common Options

These options are available across multiple commands:

OptionDescription
--help, -hDisplay help information
--version, -VDisplay version information (top-level only)
--verboseEnable verbose output (where applicable)
--threadsNumber of threads (where applicable)
--output or --outOutput file path (varies by command)

Exit Codes

CodeMeaning
0Success
1Error (invalid arguments, file not found, processing error, etc.)

Next Steps

Explore individual command documentation: