Class CommonQueries
java.lang.Object
ubic.gemma.persistence.util.CommonQueries
Contains methods to perform 'common' queries that are needed across DAOs.
- 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 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<Long, Collection<Long>> getArrayDesignsUsedEEMap(Collection<Long> ees, Session session) 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)
-
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 BioAssaySet> ees, Session session) Retrieve a list of array designs used by the given experiments. -
getArrayDesignsUsedEEMap
public static Map<Long, Collection<Long>> getArrayDesignsUsedEEMap(Collection<Long> ees, Session session) - Parameters:
ees- experimentssession- session- Returns:
- map of experiment to collection of array design ids. If any of the ids given are for subsets, then the key in the return value will be for the subset, not the source experiment (so it is consistent with the input)
-
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)
-