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
-
-
-
Method Detail
-
getArrayDesignsUsed
public static Map<ArrayDesign,Collection<Long>> getArrayDesignsUsed(Collection<Long> ees, Session session)
- Parameters:
ees
- collection of expression experiments.session
- session- Returns:
- map of array designs to the experiments they were used in.
-
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)
-
getArrayDesignsUsed
public static Collection<ArrayDesign> getArrayDesignsUsed(ExpressionExperiment ee, Session session)
- Parameters:
session
- sessionee
- experiment- Returns:
- list of array designs used in given expression experiment
-
getArrayDesignIdsUsed
public static Collection<Long> getArrayDesignIdsUsed(Long eeId, Session session)
- Parameters:
session
- sessioneeId
- experiment id- Returns:
- list of array designs IDs used in given expression experiment
-
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
-
getCs2GeneIdMap
public static Map<Long,Collection<Long>> getCs2GeneIdMap(Collection<Long> genes, Collection<Long> arrayDesigns, Session session)
- Parameters:
session
- sessiongenes
- genesarrayDesigns
- array design- Returns:
- map of probe IDs to collections of gene IDs.
-
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.
-
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)
-
-