Class CommonQueries
- Author:
- paul
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<Long> filterProbesByPlatform(Collection<Long> probes, Collection<Long> arrayDesignIds, Session session) static Collection<ArrayDesign> getArrayDesignsUsed(Collection<? extends @MayBeUninitialized BioAssaySet> ees, Session session) Retrieve a list of array designs used by the given experiments.static Collection<ArrayDesign> getArrayDesignsUsed(BioAssaySet bas, Session session) Retrieve a list of array designs used in given expression experimentstatic Map<ExpressionExperiment, Collection<ArrayDesign>> getArrayDesignsUsedByExperiment(Collection<? extends @MayBeUninitialized BioAssaySet> ees, Session session) Retrieve, in one query, a per-experiment map of array designs used.static Collection<CompositeSequence> getCompositeSequences(Gene gene, Session session) Given a gene, get all the composite sequences that map to it.static Map<Long, Collection<Long>> getCs2GeneIdMapForGenes(Collection<Long> genes, Collection<Long> arrayDesigns, Session session) Obtain a mapping of probe to gene IDs for the given gene IDs and platforms IDs.static Map<CompositeSequence, Collection<Gene>> getCs2GeneMap(Collection<Gene> genes, Collection<ArrayDesign> arrayDesigns, Session session) static Map<CompositeSequence, Collection<Gene>> getCs2GeneMap(Collection<Gene> genes, Session session) static Map<Long, Collection<Long>> getCs2GeneMapForProbes(Collection<Long> probes, Session session) static ExpressionExperimentResolve aBioAssaySetto theExpressionExperimentthat owns its data: itself if it is one, its source experiment if it is a subset.
-
Constructor Details
-
CommonQueries
public CommonQueries()
-
-
Method Details
-
getArrayDesignsUsed
Retrieve a list of array designs used in given expression experiment -
getArrayDesignsUsed
public static Collection<ArrayDesign> getArrayDesignsUsed(Collection<? extends @MayBeUninitialized BioAssaySet> ees, Session session) Retrieve a list of array designs used by the given experiments. -
getArrayDesignsUsedByExperiment
public static Map<ExpressionExperiment, Collection<ArrayDesign>> getArrayDesignsUsedByExperiment(Collection<? extends @MayBeUninitialized BioAssaySet> ees, Session session) Retrieve, in one query, a per-experiment map of array designs used.Use this when you need to know which platform belongs to which EE (e.g. bulk pipeline-status assembly): the flat
getArrayDesignsUsed(Collection, Session)loses that mapping. EEs with no resolved bio-assays are absent from the map. -
getExperiment
Resolve aBioAssaySetto theExpressionExperimentthat owns its data: itself if it is one, its source experiment if it is a subset.The argument is unproxied first. An association mapped against the abstract
BioAssaySet--SingleExperimentAnalysis.experimentAnalyzedis the common one -- hands back aBioAssaySet$HibernateProxy, which is an instance of neither concrete subclass and used to fall through to the throw below. Same remedy asExpressionDataFileUtils .formatExperimentAnalyzedFilenameandDifferentialExpressionAnalysisDaoImpl .getSourceExperiment.Public because
CachedProcessedExpressionDataVectorServiceImplcarried a byte-identical copy of this method; it now delegates here so the unproxy cannot be forgotten in one of the two.- Throws:
UnsupportedOperationException- ifbasis neither an experiment nor a subset
-
getCompositeSequences
Given a gene, get all the composite sequences that map to it.- Parameters:
gene- genesession- session- Returns:
- composite sequences
-
getCs2GeneMap
public static Map<CompositeSequence, Collection<Gene>> getCs2GeneMap(Collection<Gene> genes, Collection<ArrayDesign> arrayDesigns, Session session) -
getCs2GeneMap
public static Map<CompositeSequence, Collection<Gene>> getCs2GeneMap(Collection<Gene> genes, Session session) - Parameters:
genes- genessession- session- Returns:
- map of probes to input genes they map to. Other genes those probes might detect are not included.
-
getCs2GeneIdMapForGenes
public static Map<Long, Collection<Long>> getCs2GeneIdMapForGenes(Collection<Long> genes, Collection<Long> arrayDesigns, Session session) Obtain a mapping of probe to gene IDs for the given gene IDs and platforms IDs. -
getCs2GeneMapForProbes
public static Map<Long, Collection<Long>> getCs2GeneMapForProbes(Collection<Long> probes, Session session) - Parameters:
probes- probessession- session- Returns:
- map of probes to all the genes 'detected' by those probes. Probes that don't map to genes will have an empty gene collection.
-
filterProbesByPlatform
public static Collection<Long> filterProbesByPlatform(Collection<Long> probes, Collection<Long> arrayDesignIds, Session session)
-