Package ubic.gemma.core.util.test
Class PersistentDummyObjectHelper
java.lang.Object
ubic.gemma.core.util.test.PersistentDummyObjectHelper
Used to generate test data.
- Author:
- pavlidis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetExperimentalDesign(Collection<FactorValue> allFactorValues) protected Set<FactorValue> getFactorValues(ExperimentalFactor ef, Collection<FactorValue> allFactorValues) protected CharacteristicgetTestCharacteristic(String name, String value) intAdd an expressionExperiment to the database for testing purposes.getTestExpressionExperimentWithAllDependencies(boolean doSequence) Add an expressionExperiment to the database for testing purposes.Create a test EE with analysis results.Note that if you want a 'preferred' qt or other special properties you have to set it yourself.getTestPersistentArrayDesign(int numCompositeSequences, boolean randomNames, boolean doSequence) Convenience method to provide an ArrayDesign that can be used to fill non-nullable associations in test objects.getTestPersistentBasicExpressionExperiment(ArrayDesign arrayDesign) getTestPersistentBasicExpressionExperiment(ArrayDesign arrayDesign, boolean includeRawQts) getTestPersistentBibliographicReference(String accession) Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.getTestPersistentBioSequence2GeneProducts(BioSequence bioSequence) getTestPersistentBlatResult(BioSequence querySequence, Taxon taxon) Convenience method to provide a Contact that can be used to fill non-nullable associations in test objects.getTestPersistentDatabaseEntry(String accession, String databaseName) getTestPersistentDatabaseEntry(String accession, ExternalDatabase ed) Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.Convenience method to provide an ExpressionExperiment that can be used to fill non-nullable associations in test objects.Convenience method to provide an ExpressionExperiment that can be used to fill non-nullable associations in test objects.Convenience method to provide a QuantitationType that can be used to fill non-nullable associations in test objects.protected StatementgetTestStatement(String name, String value) voidReset the seed to the default value.voidvoidsetSeed(long seed) Set the seed to use to generate random data.voidsetTestElementCollectionSize(int testElementCollectionSize) Override the number of elements made in collections.
-
Constructor Details
-
PersistentDummyObjectHelper
public PersistentDummyObjectHelper()
-
-
Method Details
-
setSeed
public void setSeed(long seed) Set the seed to use to generate random data. -
resetSeed
public void resetSeed()Reset the seed to the default value. -
getTestNonPersistentBioSequence
-
getTestNonPersistentGeneProduct
-
getTestNonPersistentQuantitationType
Note that if you want a 'preferred' qt or other special properties you have to set it yourself.- Returns:
- QT
-
addTestAnalyses
-
getExperimentalDesign
- Parameters:
allFactorValues- all factor values- Returns:
- Non-persistent ED
-
getExperimentalFactors
-
getFactorValues
-
getTestElementCollectionSize
public int getTestElementCollectionSize() -
setTestElementCollectionSize
public void setTestElementCollectionSize(int testElementCollectionSize) Override the number of elements made in collections. By default this is quite small, so you can increase it. But please call 'reset' afterwards.- Parameters:
testElementCollectionSize- new size
-
getTestExpressionExperimentWithAllDependencies
Add an expressionExperiment to the database for testing purposes. Includes associations.- Returns:
- EE
-
getTestExpressionExperimentWithAllDependencies
public ExpressionExperiment getTestExpressionExperimentWithAllDependencies(ExpressionExperiment prototype) -
getTestExpressionExperimentWithAllDependencies
Add an expressionExperiment to the database for testing purposes. Includes associations- Parameters:
doSequence- Should the array design get all the sequence information filled in? (true = slower)- Returns:
- EE
-
getTestPersistentSingleCellExpressionExperiment
-
getTestExpressionExperimentWithAnalysisAndResults
Create a test EE with analysis results. The design is simple: two conditions: healthy and sick with 3 replicates Random statistics will be generated for all the probes defined in the providedArrayDesign. -
getTestPersistentGene
- Returns:
- with default taxon
-
getTestPersistentGene
-
getTestPersistentArrayDesign
public ArrayDesign getTestPersistentArrayDesign(int numCompositeSequences, boolean randomNames, boolean doSequence) Convenience method to provide an ArrayDesign that can be used to fill non-nullable associations in test objects. The ArrayDesign is provided with some CompositeSequence DesignElements if desired. If composite sequences are created, they are each associated with a single generated Reporter.- Parameters:
numCompositeSequences- The number of CompositeSequences to populate the ArrayDesign with.randomNames- If true, probe names will be random strings; otherwise they will be 0_probe_at....N_probe_atdoSequence- If true, biosequences and biosequence2GeneProduct associations are filled in (slower).- Returns:
- ArrayDesign
-
getTestPersistentBasicExpressionExperiment
-
getTestPersistentBasicExpressionExperiment
-
getTestPersistentBasicExpressionExperiment
public ExpressionExperiment getTestPersistentBasicExpressionExperiment(@Nullable ArrayDesign arrayDesign, boolean includeRawQts) - Parameters:
arrayDesign- platform to use, if null two random platforms are generatedincludeRawQts- include two raw QTs (one being preferred)- Returns:
- A lighter-weight EE, with no data, and the ADs have no sequences.
-
getTestPersistentBibliographicReference
-
getTestPersistentBioAssay
-
getTestPersistentBioAssay
Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects.- Parameters:
ad- ADbm- BM- Returns:
- BA
-
getTestPersistentBioMaterial
-
getTestPersistentBioMaterial
-
getTestPersistentBioSequence
-
getTestPersistentBioSequence
-
getTestPersistentBioSequence2GeneProducts
public Set<BioSequence2GeneProduct> getTestPersistentBioSequence2GeneProducts(BioSequence bioSequence) - Parameters:
bioSequence- bio sequence- Returns:
- bio sequence to gene products
-
getTestPersistentBlatResult
-
getTestPersistentContact
Convenience method to provide a Contact that can be used to fill non-nullable associations in test objects.- Returns:
- contact
-
getTestPersistentDatabaseEntry
Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects. The accession is set to a random string- Parameters:
ed- ED- Returns:
- db entry
-
getTestPersistentDatabaseEntry
Convenience method to provide a DatabaseEntry that can be used to fill non-nullable associations in test objects. The accession and ExternalDatabase name are set to random strings.- Parameters:
accession- accessioned- ED- Returns:
- db entry
-
getTestPersistentDatabaseEntry
- Parameters:
accession- accessiondatabaseName- GEO or PubMed (others could be supported)- Returns:
- db entry
-
getTestPersistentExpressionExperiment
Convenience method to provide an ExpressionExperiment that can be used to fill non-nullable associations in test objects. This implementation does NOT fill in associations of the created object.- Returns:
- EE
-
getTestPersistentExpressionExperiment
Convenience method to provide an ExpressionExperiment that can be used to fill non-nullable associations in test objects. This implementation does NOT fill in associations of the created object except for the creation of persistent BioMaterials and BioAssays so that database taxon lookups for this experiment will work.- Parameters:
taxon- the experiment will have this taxon- Returns:
- EE
-
getTestPersistentGeneProduct
-
getTestPersistentQuantitationType
Convenience method to provide a QuantitationType that can be used to fill non-nullable associations in test objects.- Returns:
- QT
-
getTestPersistentTaxon
-
resetTestElementCollectionSize
public void resetTestElementCollectionSize() -
getFactorValues
protected Set<FactorValue> getFactorValues(ExperimentalFactor ef, Collection<FactorValue> allFactorValues) -
getTestCharacteristic
-
getTestStatement
-