Command-line interface
Convert-Pheno includes a command-line utility for file-based conversions. This is the primary way most users work with the project.
See common usage Read the tutorial Check installation
Basic pattern¶
The command is organized around one input format and one output format:
Both CLI styles are supported:
- Generic form:
-i pxf ... -o bff ... - Compact form:
-ipxf ... -obff ...
The compact flags are still the ones most users rely on:
-ipxf,-ibff,-iomop,-iredcap,-icdisc,-icsv-obff,-opxf,-oomop,-ocsv,-ojsonf,-ojsonld
You can always check the current built-in help with:
Common examples¶
Convert Phenopackets to BFF individuals output:
The same conversion with the generic form:
Convert Phenopackets biosamples when the input contains them:
Convert both individuals and biosamples, while overriding the biosample filename:
convert-pheno -ipxf pxf.json --entities individuals biosamples --out-dir out/ --out-entity biosamples=samples.json
Convert a large OMOP SQL dump incrementally:
Convert BFF individuals to Phenopackets:
Notes¶
-obffkeeps the legacyBFFbehavior. By default this meansindividuals.- When
PXFinput containsbiosamples, the legacy-obff FILEpath still writes onlyindividuals. In that mode,convert-phenowarns and preserves the biosamples underinfo.phenopacket.biosamples. --entitiescan be used withBFFoutput. The current extra entity exposed by the CLI isbiosamplesfrom-ipxfinput when biosample data is present.--entitiesis an entity-output mode. Use it together with--out-dir, not with-obff FILE.--out-entity entity=filelets you override the filename of one requested entity and requires--entities.--streamis mainly relevant for large OMOP inputs.
More help¶
- Usage for more examples
- Download & Installation for setup
- Google Colab tutorial if you want a disposable environment