square-terminalRunning from command line

We created three separate Python scripts corresponding to the core modules of GWAStic. These scripts allow advanced users to input parameters and run the tool from the command line, giving flexibility to users who prefer this approach. This solution addresses the need for a command-line alternative while preserving the usability of the existing GUI for those who prefer a more visual, interactive experience. We believe this approach strikes the right balance, allowing a broader range of GWAS researchers to utilize the software in a way that best suits their workflow.

Usage:
1. Follow the Anaconda and gwastic installation instructions and activate you gwastic enviroment.
2. Save one of the Python script examples below on your local machine (we will use vcf_to_bed.py).
3. Adjust the parameters, make sure all file paths are set correctly.
4. Move to the path of your Python script in the commmand line.
5. Run the script with the command:
python vcf_to_bed.py

VCF to BED conversation

from gwastic_desktop.gwas_pipeline import GWAS

# Initialize the GWAS class
gwas = GWAS()

# Set the parameters manually 
vcf_file = "test/example.vcf.gz"
id_file = None  # If no ID file, keep it None; otherwise, provide the file path
file_out = "output"
maf = "0.05"
geno = "0.1"

# Call the vcf_to_bed method from the GWAS class
log = gwas.vcf_to_bed(vcf_file, id_file, file_out, maf, geno)

# Print or log the output
print(log)

GWAS analysis

Genomic Prediction

Last updated