NAME
Convert::Pheno - Convert clinical and phenotypic data between supported models
SYNOPSIS
use Convert::Pheno;
my $pxf = {
"phenopacket" => {
"id" => "P0007500",
"subject" => {
"id" => "P0007500",
"dateOfBirth" => "2000-01-01T00:00:00Z",
"sex" => "FEMALE"
}
}
};
my $converter = Convert::Pheno->new(
{
data => $pxf,
method => 'pxf2bff'
}
);
my $individual = $converter->pxf2bff;
DESCRIPTION
Convert::Pheno is the conversion engine used by the convert-pheno command-line program. It converts supported in-memory data structures and route-specific file inputs between Beacon v2 Models Format (BFF), Phenopackets v2 (PXF), OMOP-CDM, REDCap, CDISC-ODM, CDISC Dataset-JSON, FHIR R4, openEHR, and tabular representations.
Conversion availability and required arguments depend on the selected route. Mapping-file conversions use the Mapping V2 contract and require mappingVersion: 2; pre-V2 mapping files are rejected.
METHODS
new
my $converter = Convert::Pheno->new(\%arguments);
Creates a converter. method identifies the public conversion method. In-memory routes receive decoded input under data; file-based routes use the arguments documented for that conversion.
Conversion methods
my $result = $converter->$method;
In-memory conversions return Perl data structures. Streaming and file-output routes write to their configured destinations and may instead return a completion status. See the module guide for supported methods, arguments, multi-entity results, and Python interoperability.
DOCUMENTATION
- Project documentation
- Module usage
-
https://cnag-biomedical-informatics.github.io/convert-pheno/use-as-a-module
- Command-line interface
-
https://cnag-biomedical-informatics.github.io/convert-pheno/use-as-a-command-line-interface
ERRORS
Invalid input, unsupported routes, and conversion failures raise exceptions. Callers that need recovery should invoke conversion methods inside eval or another exception-handling mechanism.
CITATION
Please cite the following reference in published work that uses Convert-Pheno:
Rueda, M et al., (2024). Convert-Pheno: A software toolkit for the interconversion of standard data models for phenotypic data. Journal of Biomedical Informatics. DOI
AUTHOR
Written by Manuel Rueda, PhD. Info about CNAG can be found at https://www.cnag.eu.
COPYRIGHT AND LICENSE
Copyright 2022-2026 Manuel Rueda and CNAG.
This software is distributed under the Artistic License 2.0. See the LICENSE file included in this distribution.