Interface SingleCellDataLoader
- All Superinterfaces:
AutoCloseable,Closeable,DataLoader,SequencingDataLoader
- All Known Implementing Classes:
AbstractDelegatingSingleCellDataLoader,AnnDataSingleCellDataLoader,GenericMetadataSingleCellDataLoader,MexSingleCellDataLoader,NullSingleCellDataLoader,SequencingMetadataFileSingleCellDataLoader
Common interface for all single-cell data loaders.
- Author:
- poirigui
-
Method Summary
Modifier and TypeMethodDescriptiongetCellTypeAssignments(SingleCellDimension dimension) Load single-cell type assignments present in the data.Load cell-level characteristics that are not cell type assignments present in the data.getSequencingMetadata(SingleCellDimension dimension) getSingleCellDimension(Collection<BioAssay> bioAssays) Load the single-cell dimension present in the data.loadVectors(Collection<CompositeSequence> designElements, SingleCellDimension dimension, QuantitationType quantitationType) Produces a stream of single-cell expression data vectors for the givenQuantitationType.Methods inherited from interface ubic.gemma.core.loader.expression.DataLoader
close, getFactors, getGenes, getQuantitationTypes, getSampleNames, getSamplesCharacteristics, setBioAssayToSampleNameMapper, setDesignElementToGeneMapper, setIgnoreUnmatchedDesignElements, setIgnoreUnmatchedSamplesMethods inherited from interface ubic.gemma.core.loader.expression.sequencing.SequencingDataLoader
getSequencingMetadata
-
Method Details
-
getSingleCellDimension
SingleCellDimension getSingleCellDimension(Collection<BioAssay> bioAssays) throws IOException, IllegalArgumentException Load the single-cell dimension present in the data.Not all samples might be present and thus the returned
SingleCellDimensionwill have a expression data for a subset of the data.- Parameters:
bioAssays- a set of bioassays to use when populating the dimension, not all bioassays may be used- Throws:
IllegalArgumentException- if a sample present in the data cannot be matched to one of the suppliedBioAssay, ignored ifDataLoader.setIgnoreUnmatchedSamples(boolean)is set to true.IOException
-
getCellTypeAssignments
Load single-cell type assignments present in the data.- Throws:
IOException
-
getOtherCellLevelCharacteristics
Set<CellLevelCharacteristics> getOtherCellLevelCharacteristics(SingleCellDimension dimension) throws IOException Load cell-level characteristics that are not cell type assignments present in the data.- Throws:
IOException
-
getSequencingMetadata
Map<BioAssay,SequencingMetadata> getSequencingMetadata(SingleCellDimension dimension) throws IOException - Throws:
IOException
-
loadVectors
Stream<SingleCellExpressionDataVector> loadVectors(Collection<CompositeSequence> designElements, SingleCellDimension dimension, QuantitationType quantitationType) throws IOException, IllegalArgumentException Produces a stream of single-cell expression data vectors for the givenQuantitationType.- Parameters:
designElements- a collection of design elements for mapping of element names used in the dataset toCompositeSequencedimension- a dimension to use for creating vectors, may be loaded from the single-cell data withgetSingleCellDimension(Collection)quantitationType- a quantitation type to extract from the data for, may be loaded from the single-cell data withDataLoader.getQuantitationTypes()- Returns:
- a stream of single-cell expression data vectors that must be closed when done, preferably using a try-with-resource block.
- Throws:
IllegalArgumentException- if a design element present in the data cannot be matched to one of the supplied elements, requires settingDataLoader.setIgnoreUnmatchedDesignElements(boolean)to falseIOException
-