Class CellXGeneUtils
java.lang.Object
ubic.gemma.core.loader.expression.cellxgene.CellXGeneUtils
- Author:
- poirigui
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<OntologyTerm> List of all known gene expression assays from CELLxGENE. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetCollectionUri(String collectionId) static DatasetMetadatagetDatasetMetadata(CollectionMetadata cm, DatasetVersion datasetVersion) Select the metadata of a resolved dataset from a collection.static StringgetDatasetUri(String datasetId) FIXME: CELLxGENE does not have a landing page for datasets.Extract GEO accessions from the given collection metadata.static StringgetTermUri(String termId) Convert a CELLxGENE ontology term ID into a URI.static StringgetTermUri(OntologyTerm term) Convert a CELLxGENE ontology term into a URI.static booleanCheck if the given dataset asset is in AnnData format.static booleanDetermine if the given assay corresponds to a single cell assay producing gene expression data.static DatasetVersionresolveDataset(String collectionId, List<DatasetVersion> datasets, String identifier) Resolve a dataset in a collection from a user-supplied identifier.
-
Field Details
-
GENE_EXPRESSION_ASSAYS
List of all known gene expression assays from CELLxGENE.TODO: we should keep a list of supported assays in a shared location
-
-
Constructor Details
-
CellXGeneUtils
public CellXGeneUtils()
-
-
Method Details
-
getCollectionUri
-
getDatasetUri
FIXME: CELLxGENE does not have a landing page for datasets. The workaround is to fill in theDatabaseEntry.getUri()with a link to the collection obtained bygetCollectionUri(String). -
resolveDataset
public static DatasetVersion resolveDataset(String collectionId, List<DatasetVersion> datasets, String identifier) Resolve a dataset in a collection from a user-supplied identifier.The identifier is matched, in order, against the permanent dataset ID, the dataset version ID and the dataset title. Titles are compared exactly first, then ignoring case and surrounding whitespace. Titles are not unique across CELLxGENE, which is why resolution is always scoped to a collection.
- Parameters:
collectionId- used in error messages onlydatasets- the datasets of the collection, as reported by the curation APIidentifier- a permanent dataset ID, a dataset version ID or a dataset title- Throws:
IllegalArgumentException- if no dataset or more than one dataset matches
-
getDatasetMetadata
public static DatasetMetadata getDatasetMetadata(CollectionMetadata cm, DatasetVersion datasetVersion) Select the metadata of a resolved dataset from a collection.- Throws:
IllegalStateException- if the collection metadata does not list the dataset's current version, which happens if the dataset was revised between the two requests
-
getGeoAccessions
Extract GEO accessions from the given collection metadata. -
isGeneExpressionAssay
Determine if the given assay corresponds to a single cell assay producing gene expression data. -
isAnnData
Check if the given dataset asset is in AnnData format.TODO: handle
FileType.RAW_H5AD -
getTermUri
Convert a CELLxGENE ontology term into a URI. -
getTermUri
-