Class DesignUtils
java.lang.Object
fr.ens.biologie.genomique.eoulsan.design.DesignUtils
Utils methods for Design.
- Since:
- 1.0
- Author:
- Laurent Jourdren, Xavier Bauquet
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckAnnotations(Design design) Check if there is more than one annotation in the designstatic booleancheckGenomes(Design design) Check if there is more than one genome in the designstatic booleancheckSamples(Design design) Check if there are duplicate samples in the design.static booleancontainsReferenceField(Experiment experiment) Test if an experiment contains reference fields.getAllSamplesMetadataKeys(Design design) Get all the sample metadata keys of the samples of a design.static StringgetCondition(Experiment experiment, Sample sample) Get the Condition metadata value for an experimentSample.static StringgetCondition(ExperimentSample experimentSample) Get the Condition metadata value for an experimentSample.getExperimentSampleAllMetadataKeys(Experiment experiment) Get all the experiment metadata keys of the samples of a design.static StringgetMetadata(Experiment experiment, Sample sample, String key) Get a metadata value for an experiment and a sample.static StringgetMetadata(ExperimentSample experimentSample, String key) Get a metadata value for an experimentSample.getModelColumns(Experiment experiment) Get the column names used in DESeq2 model.static StringgetReference(Experiment experiment, Sample sample) Get the reference of a sample.static StringgetReference(ExperimentSample experimentSample) Get the reference of a sample.static StringgetRepTechGroup(Experiment experiment, Sample sample) Get the RepTechGroup metadata value for an experimentSample.static StringgetRepTechGroup(ExperimentSample experimentSample) Get the Condition metadata value for an experimentSample.static booleanisSkipped(Experiment experiment) Test if an experiement is skipped.static voidRemove optional description fields and obfuscate condition field.static DesignRead and Check designstatic intreferenceValueToInt(String value, String experiementReference) Convert a reference value to an integer.static voidreplaceLocalPathBySymlinks(Design design, DataFile symlinksDir) Replace the local paths in the design by paths to symbolic links in a directory.static voidshowDesign(Design design) Show a design
-
Method Details
-
showDesign
Show a design- Parameters:
design- Design to show
-
getAllSamplesMetadataKeys
Get all the sample metadata keys of the samples of a design.- Parameters:
design- the design- Returns:
- a list with the sample metadata keys of the samples of a design
-
getExperimentSampleAllMetadataKeys
Get all the experiment metadata keys of the samples of a design.- Parameters:
experiment- the experiment- Returns:
- a list with the experiment metadata keys of the samples of a design
-
checkSamples
Check if there are duplicate samples in the design.- Parameters:
design- Design to test- Returns:
- if there are no duplicate
-
checkGenomes
Check if there is more than one genome in the design- Parameters:
design- Design to test- Returns:
- true if there is more than one genome in the genome
-
checkAnnotations
Check if there is more than one annotation in the design- Parameters:
design- Design to test- Returns:
- true if there is more than one annotation in the genome
-
readAndCheckDesign
Read and Check design- Parameters:
is- InputStream for the design- Returns:
- a Design object
- Throws:
EoulsanException- if an error occurs while reading the design
-
obfuscate
Remove optional description fields and obfuscate condition field.- Parameters:
design- design object to obfuscateremoveReplicateInformation- if replicate information must be removed
-
replaceLocalPathBySymlinks
public static void replaceLocalPathBySymlinks(Design design, DataFile symlinksDir) throws IOException Replace the local paths in the design by paths to symbolic links in a directory.- Parameters:
design- Design object to modifysymlinksDir- path to the directory where create symbolic links- Throws:
IOException- if an error occurs while creating symbolic links of if a path the design file does not exists
-
getCondition
Get the Condition metadata value for an experimentSample. First look in- Parameters:
experiment- the experimentsample- the sample- Returns:
- the Condition value
-
getCondition
Get the Condition metadata value for an experimentSample. First look in- Parameters:
experimentSample- the experiment sample- Returns:
- the Condition value
-
getRepTechGroup
Get the RepTechGroup metadata value for an experimentSample. First look in- Parameters:
experiment- the experimentsample- the sample- Returns:
- the Condition value
-
getRepTechGroup
Get the Condition metadata value for an experimentSample. First look in- Parameters:
experimentSample- the experiment sample- Returns:
- the Condition value
-
getMetadata
Get a metadata value for an experiment and a sample. First look in- Parameters:
experiment- the experimentsample- the samplekey- the metadata key to get- Returns:
- the Condition value
-
getMetadata
Get a metadata value for an experimentSample. First look in- Parameters:
experimentSample- the experiment samplekey- the metadata key to get- Returns:
- the Condition value
-
isSkipped
Test if an experiement is skipped.- Parameters:
experiment- the experiment- Returns:
- true if the experiment must be skipped
-
containsReferenceField
Test if an experiment contains reference fields.- Parameters:
experiment- the experiment object- Returns:
- true if an experiment contains reference fields
-
getReference
Get the reference of a sample.- Parameters:
experiment- the experimentsample- the sample- Returns:
- the reference of a sample
-
getReference
Get the reference of a sample.- Parameters:
experimentSample- the experiment sample- Returns:
- the reference of a sample
-
referenceValueToInt
Convert a reference value to an integer.- Parameters:
value- the reference valueexperiementReference- experiment reference- Returns:
- an integer
-
getModelColumns
Get the column names used in DESeq2 model.- Parameters:
experiment- the experiment- Returns:
- a set with the column names
-