Package ubic.gemma.persistence.util
Class CommonQueries
- java.lang.Object
-
- ubic.gemma.persistence.util.CommonQueries
-
public class CommonQueries extends Object
Contains methods to perform 'common' queries that are needed across DAOs.- Author:
- paul
-
-
Constructor Summary
Constructors Constructor Description CommonQueries()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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)
-
-
-
Method Detail
-
getArrayDesignsUsed
public static Collection<ArrayDesign> getArrayDesignsUsed(BioAssaySet bas, Session session)
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
public static Collection<CompositeSequence> getCompositeSequences(Gene gene, Session session)
Given a gene, get all the composite sequences that map to it.- Parameters:
session
- sessiongene
- gene- 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:
session
- sessionprobes
- probes- 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)
-
-