Non-Containerized Installation
Use this path when you want to run convert-pheno directly from CPAN, GitHub, or inside your own Perl environment.
Native Windows support is tested with Strawberry Perl 5.40 and 5.42. The
current CPAN release of Net::IDN::Encode, an indirect dependency of
JSON::Validator, does not build with these Perl versions. Until a compatible
release reaches CPAN, install the upstream patch before Convert-Pheno:
$netIdnPatch = 'https://github.com/ernix/Net-IDN-Encode/archive/3ebe6f2e239b470efcb64a044edc8202798188af.tar.gz'
cpanm --notest $netIdnPatch
cpanm --notest Convert::Pheno
convert-pheno --help
This dependency supports internationalized domain-name validation; it is not used by the conversion logic itself.
System Dependenciesβ
On Debian-based distributions, install:
sudo apt-get install cpanminus libbz2-dev zlib1g-dev libperl-dev
Also install the following when your install path pulls the full dependency set
from cpanfile or Makefile.PL:
sudo apt-get install libssl-dev
In practice, this matters for repository installs such as
cpanm --notest --installdeps . and for dependencies like JSONLD,
IO::Socket::SSL, and Net::SSLeay.
Method 1: From CPANβ
Option 1: Install Under ~/perl5β
cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
cpanm --notest Convert::Pheno
convert-pheno --help
To make the local Perl library persistent across shells:
echo 'eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)' >> ~/.bashrc
To update later:
cpanm Convert::Pheno
Method 2: CPAN In A Conda Environmentβ
This path is useful when you want an isolated environment but still want to run the non-containerized CLI or Perl module.
Step 1: Install Minicondaβ
The following example targets x86_64 Linux systems:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
Close and reopen the terminal after the installer finishes.
Step 2: Configure Channelsβ
Set up the channels required by Bioconda:
conda config --add channels bioconda
It is better to install into a fresh environment to avoid dependency conflicts.
Step 3: Create The Environment And Installβ
conda create -n myenv
conda activate myenv
conda install -c conda-forge gcc_linux-64 perl perl-app-cpanminus
# conda install -c bioconda perl-mac-systemdirectory # macOS only
cpanm --notest Convert::Pheno
convert-pheno --help
Replace myenv with your preferred environment name.
To deactivate the environment:
conda deactivate
Method 3: From GitHubβ
If you want to install the latest GitHub version without keeping an editable
checkout, cpanm can install directly from the repository URL:
cpanm --notest https://github.com/CNAG-Biomedical-Informatics/convert-pheno.git
convert-pheno --help
Developer Checkoutβ
Use a full clone when you want to inspect the source, run tests, or edit the code locally:
git clone https://github.com/cnag-biomedical-informatics/convert-pheno.git
cd convert-pheno
Update an existing clone:
git pull
Install dependencies under ~/perl5:
cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
cpanm --notest --installdeps .
bin/convert-pheno --help
If this step fails in Net::SSLeay, IO::Socket::SSL, or JSONLD, make sure
libssl-dev is installed and rerun it.
Persist the local Perl library:
echo 'eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)' >> ~/.bashrc
Athena-OHDSI Databaseβ
OMOP output requires the current ohdsi.db; OMOP input can also use it when a
concept is absent from the supplied CONCEPT table. The database is
approximately 3.2 GB and includes the concept domains, standard-concept status,
and Maps to relationships needed for safe OMOP concept resolution. Older
four-column copies are not compatible.
You can either download it manually in a browser from this Google Drive directory:
or download the file from the command line with gdown:
pip install gdown
import gdown
url = "https://drive.google.com/uc?export=download&id=1zQ26Q1qsqTBPDGrtZbhDP-85NhaOrfBP"
output = "./ohdsi.db"
gdown.download(url, output, quiet=False)
Once downloaded, either:
- Move
ohdsi.dbintoshare/db/v0/, the bundle currently selected byshare/db/manifest.json. - Keep it elsewhere and pass its containing directory with
--path-to-ohdsi-db.