Skip to main content

PXF to BFF

Required Beacon fields

Beacon v2 requires some fields that may be absent from a Phenopacket. The mapping tables identify the documented defaults used in those cases.

Version 0.34​

Output model: BFF

Entities: individuals, biosamples

Field names

Field names in the tables use the canonical camelCase JSON form used by Beacon and Phenopackets examples. The parser may still accept some protobuf-style snake_case aliases on input for compatibility, but those aliases are not documented as the primary form here.

Individuals​

diseases​

Source fieldTarget fieldNotes
diseases.termdiseases.diseaseCodeRenamed ontology term
diseases.onsetdiseases.ageOfOnsetSupported Phenopackets time elements are unwrapped
diseases.excluded / diseases.negateddiseases.excluded / diseases.negatedPreserved when present; no fallback is added

ethnicity​

NA

exposures​

Source fieldTarget fieldNotes
exposures.typeexposures.exposureCodeLegacy PXF field; renamed
exposures.occurrence.timestampexposures.dateDate only
exposures.occurrence.ageexposures.ageAtExposureUnwrapped when present
exposures.occurrenceexposures.info.phenopacket.occurrencePreserved when not directly representable
exposures.valueexposures.valuePreserved when present
exposures.unitexposures.unitPreserved when present; defaulted when absent
DEFAULTexposures.durationAdded for Beacon validation
missing exposures.ageAtExposureexposures.ageAtExposureDefaults to P999Y
missing exposures.unitexposures.unitDefaults to NCIT:C126101 / Not Available
missing exposures.durationexposures.durationDefaults to P999Y

geographicOrigin​

NA

id​

Source fieldTarget fieldNotes
subject.ididDirect
missing subject.ididOmitted; no surrogate id is generated in this direction

info​

Source fieldTarget fieldNotes
subject.dateOfBirthinfo.phenopacket.dateOfBirthPreserved; top-level alias is also accepted
subject.vitalStatusinfo.phenopacket.vitalStatusPreserved for round-trip restoration
genesinfo.phenopacket.genesPreserved
interpretationsinfo.phenopacket.interpretationsPreserved
metaDatainfo.phenopacket.metaDataPreserved
variantsinfo.phenopacket.variantsPreserved
filesinfo.phenopacket.filesPreserved
pedigreeinfo.phenopacket.pedigreePreserved
biosamplesinfo.phenopacket.biosamplesPreserved in the individuals-only output path
cohortinfo.cohortPreserved when present at the top level
familyinfo.familyPreserved when present at the top level

interventionsOrProcedures​

Source fieldTarget fieldNotes
medicalActions.procedure.codeinterventionsOrProcedures.procedureCodeRenamed
medicalActions.procedure.performed.ageinterventionsOrProcedures.ageAtProcedureUnwrapped age form
medicalActions.procedure.performed.ageRangeinterventionsOrProcedures.ageAtProcedureUnwrapped age-range form
medicalActions.procedure.performed.gestationalAgeinterventionsOrProcedures.ageAtProcedureUnwrapped gestational-age form
medicalActions.procedure.performed.intervalinterventionsOrProcedures.ageAtProcedureUnwrapped interval form
medicalActions.procedure.performed.ontologyClassinterventionsOrProcedures.ageAtProcedureUnwrapped ontology-term form
medicalActions.procedure.performed.timestampinterventionsOrProcedures.dateOfProcedureDate only
medicalActions.procedure.performedinterventionsOrProcedures.info.phenopacket.performedPreserved when not mapped directly
missing directly mappable medicalActions.procedure.performedinterventionsOrProcedures.info.phenopacket.performedPreserved instead of defaulting a date or age

karyotypicSex​

Source fieldTarget fieldNotes
subject.karyotypicSexkaryotypicSexDirect

measures​

Source fieldTarget fieldNotes
measurements.assaymeasures.assayCodeRenamed
measurements.valuemeasures.measurementValueDirect value
measurements.complexValuemeasures.measurementValueUsed when value is absent
measurements.complexValue.typedQuantities.typemeasures.measurementValue.typedQuantities.quantityTypeInner key renamed
measurements.timeObservedmeasures.observationMomentSupported Phenopackets time elements are unwrapped
measurements.proceduremeasures.procedureNested procedure is remapped with the same rules
missing measurements.value and measurements.complexValuemeasures.measurementValueDefaults to -1

pedigrees​

NA

phenotypicFeatures​

Source fieldTarget fieldNotes
phenotypicFeatures.typephenotypicFeatures.featureTypeRenamed
phenotypicFeatures.negatedphenotypicFeatures.excludedRenamed to the Beacon field
phenotypicFeatures.onsetphenotypicFeatures.onsetSupported Phenopackets time elements are unwrapped
phenotypicFeatures.evidence[0]phenotypicFeatures.evidenceBeacon individuals expects one object
phenotypicFeatures.evidence[]phenotypicFeatures.evidence.info.phenopacket.evidenceFull source array is preserved
missing phenotypicFeatures.excluded / negatedphenotypicFeatures.excludedOmitted; no boolean default is added in this direction

sex​

Source fieldTarget fieldNotes
subject.sexsexNormalized through ontology lookup
missing or empty subject.sexsexOmitted; no fallback sex is generated

treatments​

Source fieldTarget fieldNotes
medicalActions.treatment.agenttreatments.treatmentCodeRenamed
medicalActions.treatment.routeOfAdministrationtreatments.routeOfAdministrationPreserved
medicalActions.treatment.doseIntervalstreatments.doseIntervalsPreserved; nested defaults may be added for validation
missing medicalActions.treatment.doseIntervalstreatments.doseIntervalsOmitted; no empty list is forced in this direction

Biosamples​

These rows apply when PXF biosamples are emitted as a first-class Beacon biosamples entity.

biosamples​

Source fieldTarget fieldNotes
biosamples.idbiosamples.idDirect
biosamples.individualIdbiosamples.individualIdDirect
missing biosamples.individualIdbiosamples.individualIdDefaults to the enclosing phenopacket subject.id
biosamples.materialSamplebiosamples.biosampleStatusRenamed; defaulted when absent
biosamples.sampleTypebiosamples.sampleOriginTypeRenamed; defaulted when absent
biosamples.sampledTissuebiosamples.sampleOriginDetailRenamed
biosamples.timeOfCollection.timestampbiosamples.collectionDateDate only
biosamples.timeOfCollection.interval.startbiosamples.collectionDateStart date only
biosamples.timeOfCollection.age.iso8601durationbiosamples.collectionMomentAge at collection
biosamples.descriptionbiosamples.notesRenamed free text
biosamples.diagnosticMarkersbiosamples.diagnosticMarkersDirect
biosamples.histologicalDiagnosisbiosamples.histologicalDiagnosisDirect
biosamples.pathologicalStagebiosamples.pathologicalStageDirect
biosamples.pathologicalTnmFindingbiosamples.pathologicalTnmFindingDirect
biosamples.tumorGradebiosamples.tumorGradeDirect
biosamples.tumorProgressionbiosamples.tumorProgressionDirect
biosamples.sampleProcessingbiosamples.sampleProcessingDirect
biosamples.sampleStoragebiosamples.sampleStorageDirect
missing biosamples.materialSamplebiosamples.biosampleStatusDefaults to NCIT:C126101 / Not Available
missing biosamples.sampleTypebiosamples.sampleOriginTypeDefaults to NCIT:C126101 / Not Available
biosamples.phenotypicFeatures.typebiosamples.phenotypicFeatures.featureTypeRenamed
biosamples.phenotypicFeatures.evidence[].reference.descriptionbiosamples.phenotypicFeatures.evidence[].reference.notesRenamed
biosamples.measurements.assaybiosamples.measurements.assayCodeRenamed
biosamples.measurements.valuebiosamples.measurements.measurementValueDirect value
biosamples.measurements.complexValuebiosamples.measurements.measurementValueUsed when value is absent
biosamples.measurements.timeObservedbiosamples.measurements.observationMomentRenamed
biosamples.procedure.codebiosamples.obtentionProcedure.procedureCodeRenamed
biosamples.procedure.performed.agebiosamples.obtentionProcedure.ageAtProcedureUnwrapped age form
biosamples.procedure.performed.timestampbiosamples.obtentionProcedure.dateOfProcedureDate only
biosamples.derivedFromIdbiosamples.info.phenopacket.derivedFromIdPreserved
biosamples.filesbiosamples.info.phenopacket.filesPreserved
biosamples.taxonomybiosamples.info.phenopacket.taxonomyPreserved
biosamples.timeOfCollectionbiosamples.info.phenopacket.timeOfCollectionRaw source payload is preserved
biosamples.procedurebiosamples.info.phenopacket.procedureRaw source payload is preserved
biosamples.measurementsbiosamples.info.phenopacket.measurementsRaw source payload is preserved