### Run Miniforge3 install script Source: https://phyloacc.github.io/install.html Run the downloaded Miniforge3 install script. Replace with the actual script name. Follow the prompts and restart your shell after installation. ```bash bash .sh ``` -------------------------------- ### Generate a config file with phyloacc_workflows init Source: https://phyloacc.github.io/workflow.html Quick start method to create a starting config file with required fields left blank. Run this command in your terminal. ```bash ./phyloacc_workflows init -o my-config.yaml ``` -------------------------------- ### Install PhyloAcc with conda Source: https://phyloacc.github.io/index.html Alternative installation using conda instead of mamba. Mamba is recommended for faster installation. ```bash conda install phyloacc ``` -------------------------------- ### Verify PhyloAcc installation with version and dependency checks Source: https://phyloacc.github.io/install.html Run 'phyloacc.py --version' to print version info and 'phyloacc.py --depcheck' to ensure C++ binaries are installed. Errors indicate installation issues. ```bash phyloacc.py --version ``` ```bash phyloacc.py --depcheck ``` -------------------------------- ### Run phyloacc.py with command-line options Source: https://phyloacc.github.io/readme.html Example command-line invocation of phyloacc.py with specific options: alignment file, BED file, mod file, and target branches. This is the command-line equivalent of the config file example. ```bash phyloacc.py -a alignment.fa -b loci.bed -m model.mod -t "species1;species2;species3" ``` -------------------------------- ### Install PhyloAcc from Bioconda Source: https://phyloacc.github.io/install.html Installs PhyloAcc from Bioconda using mamba. Follow the prompts and wait for dependencies to install. ```bash mamba install phyloacc ``` -------------------------------- ### Copy the full config template Source: https://phyloacc.github.io/workflow.html Alternative method to get a fully-commented config template by copying it from the repository's internal path. ```bash cp config-template.yaml my-config.yaml ``` -------------------------------- ### Make phyloacc_workflows executable Source: https://phyloacc.github.io/workflow.html If you get 'Permission denied' when running ./phyloacc_workflows, make the script executable with this command and try again. ```bash chmod +x phyloacc_workflows ``` -------------------------------- ### Set up conda environment with phyloacc_workflows setup Source: https://phyloacc.github.io/workflow.html Creates a dedicated conda environment named 'phyloacc-workflows' with all required dependencies. Re-running this command after changes to envs/environment.yml updates the existing environment. ```bash ./phyloacc_workflows setup ``` -------------------------------- ### Specify phyloacc.py options in a YAML config file Source: https://phyloacc.github.io/readme.html Example YAML configuration file (phyloacc-cfg.yaml) that specifies the same options as the command-line example: alignment, bed, mod, and targets. This file is used with the --config option. ```yaml alignment: alignment.fa bed: loci.bed mod: model.mod targets: "species1;species2;species3" ``` -------------------------------- ### Run phyloacc.py with a config file Source: https://phyloacc.github.io/readme.html Command to run phyloacc.py using a YAML config file with the --config option. This is equivalent to the command-line example. ```bash phyloacc.py --config phyloacc-cfg.yaml ``` -------------------------------- ### Create PhyloAcc conda environment Source: https://phyloacc.github.io/install.html Create a conda environment named phyloacc-env for installing and running PhyloAcc. ```bash mamba create -n phyloacc-env ``` -------------------------------- ### Initialize mamba and provide full path if needed Source: https://phyloacc.github.io/install.html If conda or mamba is not initialized, run 'mamba init' and restart the shell. If that fails, provide the full path to the mamba executable, e.g., '/where/you/installed/miniforge3/bin/mamba'. ```bash mamba init ``` ```bash /where/you/installed/miniforge3/bin/mamba ``` -------------------------------- ### Check if mamba/conda is installed Source: https://phyloacc.github.io/install.html Run this command to check if mamba and conda are already installed. If the output shows 'mamba X.X.X conda X.X.X', they are installed and you can skip to step 3. ```bash mamba --version ``` -------------------------------- ### Execute workflow: ./phyloacc_workflows run --configfile my-config.yaml -j 20 -e slurm Source: https://phyloacc.github.io/workflow.html Run the workflow after the dry run looks correct. Drop --dryrun to actually execute. Runtime can range from minutes to many hours depending on alignment size and number of chromosomes/scaffolds. Snakemake prints progress, and each rule writes its own log under /logs//. ```bash ./phyloacc_workflows run --configfile my-config.yaml -j 20 -e slurm ``` -------------------------------- ### Set up batches for species tree model with phyloacc.py Source: https://phyloacc.github.io/readme.html Command-line invocation of phyloacc.py to set up batches of loci for the species tree model. Requires a directory of FASTA alignments, a mod file from phyloFit, and an output directory. Options include target branches, number of jobs, processes per job, batch size, and SLURM partitions. ```bash phyloacc.py \ -d [directory containing multiple FASTA formatted nucleotide alignments] \ -m [mod file from phyloFit with input tree and neutral rate matrix] \ -o [desired output directory] \ -t "[semi-colon separated list of target branches in the species tree]" \ -j [number of jobs/batches to split the input alignments into] \ -p [processes to use per job/batch of alignments] \ -batch [number of alignments per job/batch] \ -part "[comma separated list of SLURM partitions to submit batches to as jobs]" ``` -------------------------------- ### Activate the PhyloAcc conda environment Source: https://phyloacc.github.io/install.html Activates the 'phyloacc-env' environment using mamba. Required before installing or running software in the environment. ```bash mamba activate phyloacc-env ``` -------------------------------- ### Gather outputs with phyloacc_post.py Source: https://phyloacc.github.io/readme.html Command to run phyloacc_post.py, specifying the output directory that was used when running phyloacc.py. ```bash phyloacc_post.py \ -i [path output directory specified when running phyloacc.py] ``` -------------------------------- ### Set up batches for gene tree model with phyloacc.py Source: https://phyloacc.github.io/readme.html Command-line invocation of phyloacc.py to set up batches of loci for the gene tree model. Requires a directory of FASTA alignments, a mod file, and a Newick species tree with branch lengths in coalescent units. Uses the -r gt option. ```bash phyloacc.py \ -d [directory containing multiple FASTA formatted nucleotide alignments] \ -m [mod file from phyloFit with input tree and neutral rate matrix] \ -r gt \ -l [file with Newick formatted species tree with branch lengths in coalescent units] \ -o [desired output directory] \ -t "[semi-colon separated list of target branches in the species tree]" \ -j [number of jobs/batches to split the input alignments into] \ -p [processes to use per job/batch of alignments] \ -batch [number of alignments per job/batch] \ -part "[comma separated list of SLURM partitions to submit batches to as jobs]" ``` -------------------------------- ### Download repository archive with wget Source: https://phyloacc.github.io/workflow.html Alternative to git: download the main branch archive directly from GitHub using wget. Extract the archive and work in the resulting directory. ```bash wget https://github.com/phyloacc/phyloacc-workflows/archive/main.zip ``` -------------------------------- ### Update conda to fix environment solving issues Source: https://phyloacc.github.io/install.html Run this command to update conda to the latest version, which may resolve issues where 'mamba install phyloacc' fails or hangs due to dependency solving problems. ```bash conda update -n base -c defaults conda ``` -------------------------------- ### Set up batches with adaptive model using sCF cutoffs Source: https://phyloacc.github.io/readme.html Command-line invocation of phyloacc.py to set up batches of loci with the model determined by sCF cutoffs. Requires a directory of FASTA alignments, a mod file, and a Newick species tree with branch lengths in coalescent units. Uses the -r adaptive option. ```bash phyloacc.py \ -d [directory containing multiple FASTA formatted nucleotide alignments] \ -m [mod file from phyloFit with input tree and neutral rate matrix] \ -r adaptive \ -l [file with Newick formatted species tree with branch lengths in coalescent units] \ -o [desired output directory] \ -t "[semi-colon separated list of target branches in the species tree]" \ -j [number of jobs/batches to split the input alignments into] \ -p [processes to use per job/batch of alignments] \ -batch [number of alignments per job/batch] \ -part "[comma separated list of SLURM partitions to submit batches to as jobs]" ``` -------------------------------- ### Check conda environment readiness Source: https://phyloacc.github.io/workflow.html Confirms that the phyloacc-workflows conda environment is ready. Use this at any time to verify the environment is correctly set up. ```bash ./phyloacc_workflows check ``` -------------------------------- ### Dry run command: ./phyloacc_workflows run --configfile my-config.yaml -j 20 -e slurm --dryrun Source: https://phyloacc.github.io/workflow.html Run a dry run to validate the config file and see what jobs Snakemake plans to run before submitting anything. -j 20 sets the maximum number of concurrent jobs, and -e slurm submits jobs to a SLURM cluster using per-rule resources from rule_resources in the config. If testing on a single machine, drop -e slurm to run locally using up to -j CPU cores. Do not run without an executor on a login node. ```bash ./phyloacc_workflows run --configfile my-config.yaml -j 20 -e slurm --dryrun ``` -------------------------------- ### Verify .condarc file with cat command Source: https://phyloacc.github.io/install.html Run this command to confirm your .condarc file is set up correctly. The output should match the .condarc contents shown above. ```bash cat ~/.condarc ``` -------------------------------- ### Clone the repository with git Source: https://phyloacc.github.io/workflow.html Use this command to clone the phyloacc-workflows repository from GitHub. After cloning, work in the phyloacc-workflows directory or provide full paths to workflow files. ```bash git clone https://github.com/phyloacc/phyloacc-workflows.git ```