Run RABBIT
RABBIT can be run either in Julia REPL or CLI.
Julia REPL
Load package
For example, to use MagicImpute for genotype imputation, run
using MagicImputeFor parallel computation of n processes (1 main + n-1 workers) at chromosome level, run
using Distributed
addprocs(n)
@everywhere using MagicImpute
using MagicImputeSet n <= #chromosomes and n < number of logical processors in the computer.
Run function
For genetic analysis, there are always two required inputs: genofile and pedinfo. The following is an overview of the key functions:
magicsimulate("founderhaplo.vcf.gz","ped.csv")
magicfilter("geno.vcf.gz","ped.csv")
magiccall("geno.vcf.gz","ped.csv")
magicmap("geno.vcf.gz","ped.csv")
magicimpute("geno.vcf.gz","ped.csv"; mapfile="outstem_magicmap_construct_map.csv.gz")
magicreconstruct("geno.vcf.gz","ped.csv")For genotype-phenotype mapping, there are also two required inputs: ancestryfile exported by magicreconstruct and phenofile.
magicscan("magicancestry.csv.gz","pheno.csv")Help
To get help for a function, for example, magicimpute, run
?magicimputeSee section Pipeline for the description of each step and see section API for all public functions.
CLI
The RABBIT CLI is a collection of main function files; each file is a wrapper of the corresponding julia function using ArgParse.jl. Most functions for data analysis have CLI, but all visualization functions such as MagicBase.plotcondprob do not have.
Run main function file
All main function files such as rabbit_magicimpute.jl and rabbit_magicmap.jl are located in the download RABBIT repository folder. To run a main function file in a command shell, change into work directory including input files, and run
path/to/bin/julia.exe path/to/RABBITCLI/src/rabbit_function.jl -g geno.vcf.gz -p ped.csvWe will assume that the paths to julia.exe and the main function file have been added in the platform environmental variable PATH.
julia rabbit_function.jl -g geno.vcf.gz -p ped.csvThe following is an overview of the key main function files:
julia rabbit_magicfilter.jl -g geno.vcf.gz -p ped.csv
julia rabbit_magiccall.jl -g geno.vcf.gz -p ped.csv
julia rabbit_magicmap.jl -g geno.vcf.gz -p ped.csv
julia rabbit_magicimpute.jl -g geno.vcf.gz -p ped.csv --mapfile outstem_magicmap_construct_map.csv.gz
julia rabbit_magicreconstruct.jl -g geno.vcf.gz -p ped.csv
julia rabbit_magicscan.jl -g ancestry.csv.gz -p pheno.csvHelp
To get help for each main function file, run
julia rabbit_function.jl -hSee section CLI for all help documents.