Installation#
PyPI#
To install the fastdfe package via pip:
pip install fastdfe
fastdfe is compatible with Python 3.11 through 3.13.
Note
The SFS parsing is provided by the sfsutils package, whose input backends are optional
extras that fastdfe exposes under the same names: vcf (the cyvcf2
dependency, for VCF files), zarr (the zarr dependency, for VCF-Zarr stores) and arg
(the tskit dependency, for tree sequences / ARGs). Install the ones you need, for example
all of them:
pip install fastdfe[vcf,zarr,arg]
Conda#
As of version 1.1.12, fastdfe is also available on conda-forge. To install it:
mamba create -n fastdfe -c conda-forge fastdfe
mamba activate fastdfe
Note
The optional input backends are not pulled in automatically via conda. zarr and
tskit are on conda-forge, while cyvcf2 (for VCF handling) is on bioconda,
so add both channels:
mamba create -n fastdfe -c conda-forge -c bioconda fastdfe cyvcf2 zarr tskit
Alternatively, to ensure reproducibility, you can create a file environment.yml:
name: fastdfe
channels:
- conda-forge
- bioconda
dependencies:
- fastdfe
- cyvcf2
- zarr
- tskit
Then run the following commands to create and activate the environment:
mamba env create -f environment.yml
mamba activate fastdfe
You are now ready to use fastdfe:
import fastdfe as fd