Generic Assays#

The module generic_assays provides functions related to Generic Assays section of cBioPortal Web Public API.

pybioportal.generic_assays.fetch_generic_assay_meta(generic_assay_stable_ids=None, molecular_profile_ids=None, projection='SUMMARY')#

Fetch meta data for generic assays based on a filter.

Parameters:
  • generic_assay_stable_ids (list of str) – List of Stable IDs (e.g., [“TULP4_pS563”, “TEP1_pS397”, “ALAD_214_215_1_1_S215”]).

  • molecular_profile_ids (list of str) – List of Molecular Profile IDs (e.g., [“brca_tcga_phosphoprotein_quantification”,”brain_cptac_2020_phosphoprotein”]).

  • projection (str) –

    Level of detail of the response.

    Possible values:

    • ”DETAILED”: Detailed information.

    • ”ID”: Information with only IDs.

    • ”META”: Metadata information.

    • ”SUMMARY”: Summary information (default).

Returns:

A DataFrame containing meta data for the generic assays matching the filter criteria.

Return type:

pandas.DataFrame

pybioportal.generic_assays.get_generic_assay_meta_by_id(generic_assay_stable_id, projection='SUMMARY')#

Fetch meta data for a generic assay by its ID.

Parameters:
  • generic_assay_stable_id (str) – The stable ID of the generic assay.

  • projection (str) –

    Level of detail of the response.

    Possible values:

    • ”DETAILED”: Detailed information.

    • ”ID”: Information with only IDs.

    • ”META”: Metadata information.

    • ”SUMMARY”: Summary information (default).

Returns:

A DataFrame containing the fetched meta data for the generic assay.

Return type:

pandas.DataFrame

pybioportal.generic_assays.get_generic_assay_meta_by_molecular_profile_id(molecular_profile_id, projection='SUMMARY')#

Fetch meta data for a generic assay by molecular profile ID.

Parameters:
  • molecular_profile_id (str) – Molecular Profile ID.

  • projection (str) –

    Level of detail of the response.

    Possible values:

    • ”DETAILED”: Detailed information.

    • ”ID”: Information with only IDs.

    • ”META”: Metadata information.

    • ”SUMMARY”: Summary information (default).

Returns:

A DataFrame containing the fetched meta data for the generic assay in the specified molecular profile.

Return type:

pandas.DataFrame


Examples#

from pybioportal import generic_assays as ga
df1a = ga.fetch_generic_assay_meta(generic_assay_stable_ids=["TULP4_pS563", "TEP1_pS397", "ALAD_214_215_1_1_S215"])
df1a
stableId entityType genericEntityMetaProperties_GENE_SYMBOL genericEntityMetaProperties_PHOSPHOSITE genericEntityMetaProperties_DESCRIPTION genericEntityMetaProperties_NAME
0 TEP1_pS397 GENERIC_ASSAY TEP1 pS397 NaN NaN
1 TULP4_pS563 GENERIC_ASSAY TULP4 pS563 NaN NaN
2 ALAD_214_215_1_1_S215 GENERIC_ASSAY NaN NaN NP_000022.3 ALAD S215 214-215 1_1
df1b = ga.fetch_generic_assay_meta(molecular_profile_ids=["brca_tcga_phosphoprotein_quantification",
                                                          "brain_cptac_2020_phosphoprotein"])
df1b
stableId entityType genericEntityMetaProperties_GENE_SYMBOL genericEntityMetaProperties_PHOSPHOSITE genericEntityMetaProperties_DESCRIPTION genericEntityMetaProperties_NAME
0 FSCN1_pS328 GENERIC_ASSAY FSCN1 pS328 NaN NaN
1 YWHAZ_pS230 GENERIC_ASSAY YWHAZ pS230 NaN NaN
2 GMPPB_pS246 GENERIC_ASSAY GMPPB pS246 NaN NaN
3 EPN3_pS503 GENERIC_ASSAY EPN3 pS503 NaN NaN
4 C19orf47_pS395 GENERIC_ASSAY C19orf47 pS395 NaN NaN
... ... ... ... ... ... ...
76663 DIS3L2_133_154_1_1_S139 GENERIC_ASSAY NaN NaN NP_689596.4 DIS3L2 S139 133-154 1_1
76664 CRYBG3_442_457_1_1_S457 GENERIC_ASSAY NaN NaN NP_705833.3 CRYBG3 S457 442-457 1_1
76665 RASAL2_1005_1006_1_1_S1005 GENERIC_ASSAY NaN NaN NP_733793.2 RASAL2 S1005 1005-1006 1_1
76666 CAMK2B_338_343_1_1_T342 GENERIC_ASSAY NaN NaN NP_742078.1 CAMK2B T342 338-343 1_1
76667 EXOC1_453_458_1_1_S455 GENERIC_ASSAY NaN NaN NP_839955.1 EXOC1 S455 453-458 1_1

76668 rows × 6 columns

df2 = ga.get_generic_assay_meta_by_molecular_profile_id("brca_tcga_phosphoprotein_quantification")
df2
stableId entityType genericEntityMetaProperties_GENE_SYMBOL genericEntityMetaProperties_PHOSPHOSITE
0 FSCN1_pS328 GENERIC_ASSAY FSCN1 pS328
1 YWHAZ_pS230 GENERIC_ASSAY YWHAZ pS230
2 GMPPB_pS246 GENERIC_ASSAY GMPPB pS246
3 EPN3_pS503 GENERIC_ASSAY EPN3 pS503
4 C19orf47_pS395 GENERIC_ASSAY C19orf47 pS395
... ... ... ... ...
72115 CIC_pS902_S904 GENERIC_ASSAY CIC pS902_S904
72116 MAGI1_pT1336 GENERIC_ASSAY MAGI1 pT1336
72117 PRKD2_pT211_S214 GENERIC_ASSAY PRKD2 pT211_S214
72118 PDCD11_pT1012 GENERIC_ASSAY PDCD11 pT1012
72119 PKN2_pT958 GENERIC_ASSAY PKN2 pT958

72120 rows × 4 columns

df3 = ga.get_generic_assay_meta_by_id("TULP4_pS563")
df3
stableId entityType genericEntityMetaProperties_GENE_SYMBOL genericEntityMetaProperties_PHOSPHOSITE
0 TULP4_pS563 GENERIC_ASSAY TULP4 pS563