Skip to main content

cBioPortal to BFF

The tables describe the built-in mapping. Target paths are relative to one record in the named BFF collection. An optional mapping file can add or replace mapped fields as described below.

Individuals​

One individual is created per PATIENT_ID. If the patient table is absent, patient identifiers are taken from the sample table.

Source fieldBFF targetNotes
Patient PATIENT_IDidRequired; optional mapping cannot change it
Patient SEX, fallback GENDERsexFirst non-empty value; male, female and other use NCIT defaults, otherwise unknown
Patient OS_STATUSinfo.phenopacket.vitalStatus.statusValues containing DECEASED become DECEASED; LIVING or ALIVE become ALIVE; otherwise omitted
Linked samples' ONCOTREE_CODEdiseases[].diseaseCode.idOncoTree: prefix; one entry per distinct code within the patient
Sample CANCER_TYPE_DETAILED, fallback CANCER_TYPE, then OncoTree codediseases[].diseaseCode.labelRequires a usable ONCOTREE_CODE; a cancer label alone does not create a disease
Patient rowinfo.cbioportal.patientOriginal columns, unless --no-source-info
Linked biosamplesinfo.phenopacket.biosamples[]Phenopackets representation retained for subsequent PXF conversion

Biosamples​

Source fieldBFF targetNotes
Sample SAMPLE_IDidRequired and unique
Sample PATIENT_IDindividualIdLinks to the corresponding individual
Sample ONCOTREE_CODEhistologicalDiagnosis.idOncoTree: prefix; omitted when the code is absent or marked unavailable
Sample CANCER_TYPE_DETAILED, fallback CANCER_TYPE, then OncoTree codehistologicalDiagnosis.labelSame label selection as individual diseases
No built-in source mappingbiosampleStatus, sampleOriginTypeBoth default to NCIT:C126101 / Not Available
Sample SAMPLE_TYPEinfo.cbioportal.sample.SAMPLE_TYPESource value only; not automatically converted into an ontology term
Sample rowinfo.cbioportal.sampleOriginal columns, unless --no-source-info

Datasets​

One dataset is emitted for the study when datasets is requested.

Source fieldBFF targetNotes
Study metadata cancer_study_identifieridSource-derived default
Study metadata namenameRequired in the study package
Study metadata descriptiondescriptionFalls back to “cBioPortal study” followed by the study identifier
Number of patients and samplesinfo.individualCount, info.biosampleCountCounts across the study
Study metadatainfo.cbioportal.studyUnless --no-source-info
Patient and sample column definitionsinfo.cbioportal.patientAttributeDefinitions, info.cbioportal.sampleAttributeDefinitionsUnless --no-source-info

Cohorts​

One cohort is emitted per case list when cohorts is requested.

Source fieldBFF targetNotes
Case-list stable_ididPreserved
Case-list case_list_namenamePreserved
Built-in valuecohortTypestudy-defined
Case-list case_list_idsinfo.cbioportal.membership.sampleIdsSample identifiers; unknown samples cause an error
Patients linked to those samplesinfo.cbioportal.membership.individualIdsDistinct patient identifiers
Number of distinct linked patientscohortSizeCounts people, not samples
Case-list metadatainfo.cbioportal.caseListUnless --no-source-info; membership is always retained

Required Defaults​

BFF requires ontology terms for biosampleStatus and sampleOriginType. cBioPortal clinical tables do not guarantee ontology identifiers for either field, so the built-in mapping uses NCIT:C126101 (Not Available). An optional mapping may replace these defaults with curated terms.

The source value SAMPLE_TYPE=Primary is not mapped to the generic NCIT term whose label is also “Primary.” Label equality alone does not establish that a source category represents specimen origin.

Source Provenance​

With the default --source-info, generated records retain:

  • patient attributes under info.cbioportal.patient
  • sample attributes under info.cbioportal.sample
  • study and attribute-definition metadata under dataset info.cbioportal
  • case-list descriptors and resolved membership under cohort info.cbioportal

--no-source-info removes copied source payloads. Resolved cohort membership is retained because it is part of the converted relationship graph.

Optional Mapping​

Use source.profile: cbioportal. Individual rules read patient columns and biosample rules read sample columns. Dataset and cohort defaults can augment the source-derived collection metadata. Patient and sample identifiers and their links cannot be changed. Dataset defaults can override dataset metadata; cohort id, name, and cohortSize remain derived from the case list.

See the cBioPortal format guide for commands and input scope.