Package fr.ens.biologie.genomique.aozan
Class RunData
- java.lang.Object
-
- fr.ens.biologie.genomique.aozan.RunData
-
public class RunData extends Object
This class define a RunData object that contains all information generated by collectors.- Since:
- 0.8
- Author:
- Laurent Jourdren
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RunData.PooledSampleComparator
This class define a comparator to order pooled samples.static class
RunData.ProjectComparator
This class define a comparator to order projects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDataFileInRundata(File file)
Add the data file in the rundata.void
addDataFileInRundata(String fileName)
Add the data file in the rundata.boolean
contains(String key)
Test if the RunData contains a key.void
createRunDataFile(File fileName)
Create the data file.void
createRunDataFile(String fileName)
Create the data file.String
get(String key)
Get a key.String
get(String key, String defaultValue)
Get a key.List<Integer>
getAllPooledSamples()
Get all samples ids (with undetermined samples) of the run.List<Integer>
getAllSamples()
Get all samples identifiers (with undetermined samples) of the run.List<Integer>
getAllSamplesInLane(int lane)
Get all samples names related to the lane as a list.String
getBcl2FastqVersion()
Gets the bcl2fastq version.boolean
getBoolean(String key)
Get a boolean key.boolean
getBoolean(String key, boolean defaultValue)
Get a boolean key.List<String>
getCollectorNames()
Get the list of collector names.double
getDouble(String key)
Get a double key.double
getDouble(String key, double defaultValue)
Get a double key.float
getFloat(String key)
Get a float key.float
getFloat(String key, float defaultValue)
Get a float key.String
getFlowcellId()
Gets the flowcell id.int
getIndexedReadCount()
Get the indexed read count in run.String
getIndexSample(int sampleId)
Get the sequence index related to a sample.int
getInt(String key)
Get an integer key.int
getInt(String key, int defaultValue)
Get an integer key.int
getLaneCount()
Get the lane count in run.int
getLanePFClusterRecoveryCount(int lane)
Get the passing filter cluster recovery count for a lane.int
getLaneRawClusterRecoveryCount(int lane)
Get the raw cluster recovery count for a lane.long
getLong(String key)
Get a long key.long
getLong(String key, long defaultValue)
Get a long key.long[]
getLongArray(String key)
Get an longTable key.long[]
getLongArray(String key, long[] defaultValue)
Get a long array key.Map<String,String>
getMap()
Gets the map.String
getNormalizedSampleGenome(int sampleId)
Gets the normalized sample genome.double
getPercentMappedReadOnContaminationSample(int sampleId, int read)
Get the percent mapped read on dataset contaminants.int
getPooledSampleCount()
Get the pooled sample count.String
getPooledSampleDemuxName(int pooledSampleId)
Get the demultiplexing name of a pooled sample.String
getPooledSampleDescription(int pooledSampleId)
Get the description of a pooled sample.String
getPooledSampleIndex(int pooledSampleId)
Get the index of a pooled sample.int
getPooledSampleProject(int pooledSampleId)
Get the project id of a pooled sample.String
getPooledSampleProjectName(int pooledSampleId)
Get the project name of a pooled sample.List<Integer>
getPooledSamples()
Get all samples ids (without undetermined samples) of the run.int
getProjectCount()
Get the project count.int
getProjectId(String projectName)
Get the id of a project from its name.String
getProjectName(int projectId)
Get the name of a project.List<Integer>
getProjects()
Get all project identifiers of the run.String
getProjectSample(int sampleId)
Get the project related to a sample.int
getReadCount()
Get the read count in run.int
getReadCyclesCount(int read)
Get the cycles count in the read.long
getReadPFClusterCount(int lane, int read)
Get the passing filter cluster count related to a lane and a read.double
getReadPrcAlign(int lane, int read)
Get the percent align Phix related to the lane and the read.long
getReadRawClusterCount(int lane, int read)
Get the raw cluster count related to a lane and a read.String
getRunMode()
Get the run mode.int
getRunTilesPerLane()
Gets the run tiles per lane.int
getSampleCount()
Get the sample count.String
getSampleDemuxName(int sampleId)
Get the demultiplexing name of a sample.String
getSampleDescription(int sampleId)
Get the description of a sample.String
getSampleGenome(int sampleId)
Gets the sample genome.int
getSampleId(int lane, String demuxName)
Get the identifier of sample from its lane and demuxmultiplexing name.String
getSampleIdentifier(int sampleId)
Get the sample identifier string.String
getSampleIndex(int sampleId)
Get the index of a sample.String
getSampleIndex2(int sampleId)
Get the index of a sample.int
getSampleLane(int sampleId)
Get the lane of a sample.String
getSampleName(int sampleId)
Get the name of a sample.int
getSamplePFClusterCount(int sampleId, int read)
Get the passing filter cluster count for a sample.int
getSamplePFClusterRecoveryCount(int sampleId)
Get the passing filter cluster recovery count for a sample.int
getSampleRawClusterCount(int sampleId, int read)
Get the raw cluster count for a sample.int
getSampleRawClusterRecoveryCount(int sampleId)
Get the raw cluster recovery count for a sample.List<Integer>
getSamples()
Get all samples identifiers (without undetermined samples) of the run.List<Integer>
getSamplesInLane(int lane)
Get all samples identifiers (without undetermined samples) related to the lane as a list.List<Integer>
getSamplesInPooledSample(int pooledSampleId)
Get the list of sample identifiers in a pooled sample.List<Integer>
getSamplesInProject(int projectId)
Get the list of the samples of a project.String
getSequencerApplicationName()
Gets the sequencer application name.String
getSequencerApplicationVersion()
Gets the sequencer application version.String
getSequencerFamily()
Gets the sequencer family.String
getSequencerName()
Gets the sequencer name.String
getSequencerRTAVersion()
Gets the RTA version.int
getTilesCount()
Get the tiles count.boolean
isCollectorEnabled(String collectorName)
Test if a collector is enabled.boolean
isIndexedSample(int sampleId)
Test if the sample is an indexed sample.boolean
isLaneControl(int sampleId)
Check if the lane related to the sample name is a control lane.boolean
isLaneIndexed(int lane)
Checks if is lane indexed.boolean
isReadIndexed(int read)
Check if the read is indexed.boolean
isUndeterminedInLane(int lane)
Check if undetermined FASTQ file exist for a lane.boolean
isUndeterminedPooledSample(int pooledSampleId)
Test if the sample is an undetermined sample.boolean
isUndeterminedSample(int sampleId)
Test if the sample is an undetermined sample.void
print()
Print the content of the object on standard output.void
put(RunData data)
Set the key and values of a RunData object in the current RunData.void
put(String key, boolean boolValue)
Set a key with a boolean value.void
put(String key, double doubleValue)
Set a key with a double value.void
put(String key, float floatValue)
Set a key with a float value.void
put(String key, int intValue)
Set a key with an integer value.void
put(String key, long longValue)
Set a key with a long value.void
put(String key, long... longs)
Set a key with an array of longs as value.void
put(String key, String value)
Set a key.void
put(String key, String... strings)
Set a key with an array of strings as value.void
put(String key, Collection<String> strings)
Set a key with a collection of strings as value.void
remove(String key)
Remove a key from the Rundata.void
removeIfExists(String key)
Remove a key from the Rundata if the key exists.int
size()
Get the number of entries in RunData.String
toString()
-
-
-
Constructor Detail
-
RunData
public RunData()
Public constructor.
-
RunData
public RunData(RunData data)
Public constructor.- Parameters:
data
- Data to add
-
RunData
public RunData(File file) throws IOException
Public constructor.- Parameters:
file
- file to read- Throws:
IOException
- if an error occurs while reading the data file
-
-
Method Detail
-
getCollectorNames
public List<String> getCollectorNames()
Get the list of collector names.- Returns:
- a list with the names of the collectors
-
isCollectorEnabled
public boolean isCollectorEnabled(String collectorName)
Test if a collector is enabled.- Parameters:
collectorName
- name of the collector to test- Returns:
- true if the collector is enabled
-
getAllSamplesInLane
public List<Integer> getAllSamplesInLane(int lane)
Get all samples names related to the lane as a list.- Parameters:
lane
- the lane number- Returns:
- all samples related to the lane
-
getSamplesInLane
public List<Integer> getSamplesInLane(int lane)
Get all samples identifiers (without undetermined samples) related to the lane as a list.- Parameters:
lane
- the lane number- Returns:
- all samples related to the lane
-
getAllSamples
public List<Integer> getAllSamples()
Get all samples identifiers (with undetermined samples) of the run.- Returns:
- all samples related to the lane
-
getSamples
public List<Integer> getSamples()
Get all samples identifiers (without undetermined samples) of the run.- Returns:
- all samples related to the lane
-
getSampleCount
public int getSampleCount()
Get the sample count.- Returns:
- the sample count
-
isUndeterminedInLane
public boolean isUndeterminedInLane(int lane)
Check if undetermined FASTQ file exist for a lane.- Parameters:
lane
- the lane- Returns:
- true if if undetermined FASTQ file exist for a lane
-
getIndexSample
public String getIndexSample(int sampleId)
Get the sequence index related to a sample.- Parameters:
sampleId
- the sample id- Returns:
- sequence index related to sample
-
getSampleIdentifier
public String getSampleIdentifier(int sampleId)
Get the sample identifier string.- Parameters:
sampleId
- the sample id- Returns:
- sequence index related to the lane and sample name
-
getSampleName
public String getSampleName(int sampleId)
Get the name of a sample.- Parameters:
sampleId
- the sample id- Returns:
- sequence index related to the lane and sample name
-
getSampleDemuxName
public String getSampleDemuxName(int sampleId)
Get the demultiplexing name of a sample.- Parameters:
sampleId
- the sample id- Returns:
- sequence index related to the lane and sample name
-
getSampleLane
public int getSampleLane(int sampleId)
Get the lane of a sample.- Parameters:
sampleId
- the sample id- Returns:
- sequence index related to the lane and sample name
-
isUndeterminedSample
public boolean isUndeterminedSample(int sampleId)
Test if the sample is an undetermined sample.- Parameters:
sampleId
- the sample id- Returns:
- sequence index related to the lane and sample name
-
isIndexedSample
public boolean isIndexedSample(int sampleId)
Test if the sample is an indexed sample.- Parameters:
sampleId
- the sample id- Returns:
- sequence index related to the lane and sample name
-
getProjectSample
public String getProjectSample(int sampleId)
Get the project related to a sample.- Parameters:
sampleId
- the sample id- Returns:
- the project related to the sample
-
getSampleDescription
public String getSampleDescription(int sampleId)
Get the description of a sample.- Parameters:
sampleId
- the sample id- Returns:
- the description of the sample
-
getSampleGenome
public String getSampleGenome(int sampleId)
Gets the sample genome.- Parameters:
sampleId
- the sample id- Returns:
- the sample genome
-
getNormalizedSampleGenome
public String getNormalizedSampleGenome(int sampleId)
Gets the normalized sample genome.- Parameters:
sampleId
- the sample id- Returns:
- the normalized sample genome
-
getSampleIndex
public String getSampleIndex(int sampleId)
Get the index of a sample.- Parameters:
sampleId
- the sample id- Returns:
- the index of the sample
-
getSampleIndex2
public String getSampleIndex2(int sampleId)
Get the index of a sample.- Parameters:
sampleId
- the sample id- Returns:
- the index of the sample
-
isLaneIndexed
public boolean isLaneIndexed(int lane)
Checks if is lane indexed.- Parameters:
lane
- the lane- Returns:
- true, if is lane indexed
-
isLaneControl
public boolean isLaneControl(int sampleId)
Check if the lane related to the sample name is a control lane.- Parameters:
sampleId
- the sample Id- Returns:
- true if the lane is a control otherwise false
-
getSampleId
public int getSampleId(int lane, String demuxName)
Get the identifier of sample from its lane and demuxmultiplexing name.- Parameters:
lane
- the lanedemuxName
- the demultiplexing name- Returns:
- the id of the sample or -1 if not found
-
getPooledSampleCount
public int getPooledSampleCount()
Get the pooled sample count.- Returns:
- the pooled sample count
-
getPooledSampleDemuxName
public String getPooledSampleDemuxName(int pooledSampleId)
Get the demultiplexing name of a pooled sample.- Parameters:
pooledSampleId
- the id of the pooled sample- Returns:
- the demultiplexing name of a pooled sample
-
getPooledSampleProjectName
public String getPooledSampleProjectName(int pooledSampleId)
Get the project name of a pooled sample.- Parameters:
pooledSampleId
- the id of the pooled sample- Returns:
- the project name of a pooled sample
-
getPooledSampleProject
public int getPooledSampleProject(int pooledSampleId)
Get the project id of a pooled sample.- Parameters:
pooledSampleId
- the id of the pooled sample- Returns:
- the project id of a pooled sample
-
getPooledSampleIndex
public String getPooledSampleIndex(int pooledSampleId)
Get the index of a pooled sample.- Parameters:
pooledSampleId
- the id of the pooled sample- Returns:
- the index of a pooled sample
-
getPooledSampleDescription
public String getPooledSampleDescription(int pooledSampleId)
Get the description of a pooled sample.- Parameters:
pooledSampleId
- the id of the pooled sample- Returns:
- the description of a pooled sample
-
getSamplesInPooledSample
public List<Integer> getSamplesInPooledSample(int pooledSampleId)
Get the list of sample identifiers in a pooled sample.- Parameters:
pooledSampleId
- the id of the pooled sample- Returns:
- a list of sample identifiers
-
getAllPooledSamples
public List<Integer> getAllPooledSamples()
Get all samples ids (with undetermined samples) of the run.- Returns:
- all samples related to the lane
-
getPooledSamples
public List<Integer> getPooledSamples()
Get all samples ids (without undetermined samples) of the run.- Returns:
- all samples related to the lane
-
isUndeterminedPooledSample
public boolean isUndeterminedPooledSample(int pooledSampleId)
Test if the sample is an undetermined sample.- Parameters:
pooledSampleId
- the pooled sample id- Returns:
- sequence index related to the lane and sample name
-
getProjectCount
public int getProjectCount()
Get the project count.- Returns:
- the project count
-
getProjects
public List<Integer> getProjects()
Get all project identifiers of the run.- Returns:
- all project identifiers of the run
-
getProjectName
public String getProjectName(int projectId)
Get the name of a project.- Parameters:
projectId
- the id of the project- Returns:
- the name of a project
-
getProjectId
public int getProjectId(String projectName)
Get the id of a project from its name.- Parameters:
projectName
- the name of the project- Returns:
- the id of the projet or -1 if not found
-
getSamplesInProject
public List<Integer> getSamplesInProject(int projectId)
Get the list of the samples of a project.- Parameters:
projectId
- the project id- Returns:
- a list with the sample identifiers of the project
-
getReadCount
public int getReadCount()
Get the read count in run.- Returns:
- read count.
-
getIndexedReadCount
public int getIndexedReadCount()
Get the indexed read count in run.- Returns:
- indexed read count.
-
getLaneCount
public int getLaneCount()
Get the lane count in run.- Returns:
- lane count
-
isReadIndexed
public boolean isReadIndexed(int read)
Check if the read is indexed.- Parameters:
read
- the read number- Returns:
- true if the read is indexed,otherwise false
-
getRunTilesPerLane
public int getRunTilesPerLane()
Gets the run tiles per lane.- Returns:
- the run tiles per lane
-
getRunMode
public String getRunMode()
Get the run mode.- Returns:
- run mode
-
getSequencerName
public String getSequencerName()
Gets the sequencer name.- Returns:
- the sequencer name
-
getSequencerFamily
public String getSequencerFamily()
Gets the sequencer family.- Returns:
- the sequencer name
-
getSequencerApplicationName
public String getSequencerApplicationName()
Gets the sequencer application name.- Returns:
- the sequencer application name
-
getSequencerApplicationVersion
public String getSequencerApplicationVersion()
Gets the sequencer application version.- Returns:
- the sequencer application version
-
getSequencerRTAVersion
public String getSequencerRTAVersion()
Gets the RTA version.- Returns:
- the RTA version
-
getBcl2FastqVersion
public String getBcl2FastqVersion()
Gets the bcl2fastq version.- Returns:
- the bcl2fastq version
-
getReadCyclesCount
public int getReadCyclesCount(int read)
Get the cycles count in the read.- Parameters:
read
- the read number- Returns:
- cycles count in the read
-
getFlowcellId
public String getFlowcellId()
Gets the flowcell id.- Returns:
- the flowcell id
-
getSampleRawClusterCount
public int getSampleRawClusterCount(int sampleId, int read)
Get the raw cluster count for a sample.- Parameters:
sampleId
- the sampleIdread
- the read- Returns:
- the raw cluster count of the sample
-
getSamplePFClusterCount
public int getSamplePFClusterCount(int sampleId, int read)
Get the passing filter cluster count for a sample.- Parameters:
sampleId
- the sample idread
- the read- Returns:
- the passing filter cluster count of the sample
-
getTilesCount
public int getTilesCount()
Get the tiles count.- Returns:
- tiles count
-
getReadPrcAlign
public double getReadPrcAlign(int lane, int read)
Get the percent align Phix related to the lane and the read.- Parameters:
lane
- the lane numberread
- the read number- Returns:
- percent align Phix related to the lane and the read
-
getReadRawClusterCount
public long getReadRawClusterCount(int lane, int read)
Get the raw cluster count related to a lane and a read.- Parameters:
lane
- the lane numberread
- the read number- Returns:
- the raw cluster count related to a lane and a read
-
getReadPFClusterCount
public long getReadPFClusterCount(int lane, int read)
Get the passing filter cluster count related to a lane and a read.- Parameters:
lane
- the lane numberread
- the read number- Returns:
- the passing filter cluster count related to a lane and a read
-
getSampleRawClusterRecoveryCount
public int getSampleRawClusterRecoveryCount(int sampleId)
Get the raw cluster recovery count for a sample.- Parameters:
sampleId
- the sample id- Returns:
- the raw cluster recovery count of the sample
-
getSamplePFClusterRecoveryCount
public int getSamplePFClusterRecoveryCount(int sampleId)
Get the passing filter cluster recovery count for a sample.- Parameters:
sampleId
- the sample id- Returns:
- the passing filter cluster recovery count of the sample
-
getLaneRawClusterRecoveryCount
public int getLaneRawClusterRecoveryCount(int lane)
Get the raw cluster recovery count for a lane.- Parameters:
lane
- the lane- Returns:
- the raw cluster recovery count of the lane
-
getLanePFClusterRecoveryCount
public int getLanePFClusterRecoveryCount(int lane)
Get the passing filter cluster recovery count for a lane.- Parameters:
lane
- the lane- Returns:
- the passing filter cluster recovery count of the lane
-
getPercentMappedReadOnContaminationSample
public double getPercentMappedReadOnContaminationSample(int sampleId, int read)
Get the percent mapped read on dataset contaminants.- Parameters:
sampleId
- the sample Idread
- the read number- Returns:
- the percent mapped read on dataset contaminants.
-
get
public String get(String key)
Get a key.- Parameters:
key
- key name- Returns:
- the value of the data for the key
-
get
public String get(String key, String defaultValue)
Get a key.- Parameters:
key
- key namedefaultValue
- value to use if the key does not exist- Returns:
- the value of the data for the key
-
getBoolean
public boolean getBoolean(String key)
Get a boolean key.- Parameters:
key
- key name- Returns:
- the value of the data for the key
-
getBoolean
public boolean getBoolean(String key, boolean defaultValue)
Get a boolean key.- Parameters:
key
- key namedefaultValue
- value to use if the key does not exist- Returns:
- the value of the data for the key
-
getInt
public int getInt(String key)
Get an integer key.- Parameters:
key
- key name- Returns:
- the value of the data for the key
-
getInt
public int getInt(String key, int defaultValue)
Get an integer key.- Parameters:
key
- key namedefaultValue
- value to use if the key does not exist- Returns:
- the value of the data for the key
-
getLongArray
public long[] getLongArray(String key)
Get an longTable key.- Parameters:
key
- key name- Returns:
- the table of values of the data for the key
-
getLongArray
public long[] getLongArray(String key, long[] defaultValue)
Get a long array key.- Parameters:
key
- key namedefaultValue
- value to use if the key does not exist- Returns:
- the value of the data for the key
-
getLong
public long getLong(String key)
Get a long key.- Parameters:
key
- key name- Returns:
- the value of the data for the key
-
getLong
public long getLong(String key, long defaultValue)
Get a long key.- Parameters:
key
- key namedefaultValue
- value to use if the key does not exist- Returns:
- the value of the data for the key
-
getFloat
public float getFloat(String key)
Get a float key.- Parameters:
key
- key name- Returns:
- the value of the data for the key
-
getFloat
public float getFloat(String key, float defaultValue)
Get a float key.- Parameters:
key
- key namedefaultValue
- value to use if the key does not exist- Returns:
- the value of the data for the key
-
getDouble
public double getDouble(String key)
Get a double key.- Parameters:
key
- key name- Returns:
- the value of the data for the key
-
getDouble
public double getDouble(String key, double defaultValue)
Get a double key.- Parameters:
key
- key namedefaultValue
- value to use if the key does not exist- Returns:
- the value of the data for the key
-
put
public void put(String key, String value)
Set a key.- Parameters:
key
- key to setvalue
- value of the key
-
put
public void put(String key, boolean boolValue)
Set a key with a boolean value.- Parameters:
key
- key to setboolValue
- value of the key
-
put
public void put(String key, int intValue)
Set a key with an integer value.- Parameters:
key
- key to setintValue
- value of the key
-
put
public void put(String key, long longValue)
Set a key with a long value.- Parameters:
key
- key to setlongValue
- value of the key
-
put
public void put(String key, float floatValue)
Set a key with a float value.- Parameters:
key
- key to setfloatValue
- value of the key
-
put
public void put(String key, double doubleValue)
Set a key with a double value.- Parameters:
key
- key to setdoubleValue
- value of the key
-
put
public void put(String key, String... strings)
Set a key with an array of strings as value.- Parameters:
key
- key to setstrings
- list of the key
-
put
public void put(String key, long... longs)
Set a key with an array of longs as value.- Parameters:
key
- key to setlongs
- list of the key
-
put
public void put(String key, Collection<String> strings)
Set a key with a collection of strings as value.- Parameters:
key
- key to setstrings
- set of the key
-
put
public void put(RunData data)
Set the key and values of a RunData object in the current RunData.- Parameters:
data
- Data to add
-
contains
public boolean contains(String key)
Test if the RunData contains a key.- Parameters:
key
- key name- Returns:
- true if the RunData object contains the key
-
remove
public void remove(String key)
Remove a key from the Rundata.- Parameters:
key
- key name
-
removeIfExists
public void removeIfExists(String key)
Remove a key from the Rundata if the key exists.- Parameters:
key
- key name
-
size
public int size()
Get the number of entries in RunData.- Returns:
- the number of entries
-
createRunDataFile
public void createRunDataFile(String fileName) throws IOException
Create the data file.- Parameters:
fileName
- path destination- Throws:
IOException
- Signals that an I/O exception has occurred.
-
createRunDataFile
public void createRunDataFile(File fileName) throws IOException
Create the data file.- Parameters:
fileName
- file destination- Throws:
IOException
- Signals that an I/O exception has occurred.
-
addDataFileInRundata
public void addDataFileInRundata(String fileName) throws IOException
Add the data file in the rundata.- Parameters:
fileName
- file source- Throws:
IOException
- if an error occurs while reading the data file
-
addDataFileInRundata
public void addDataFileInRundata(File file) throws IOException
Add the data file in the rundata.- Parameters:
file
- file source- Throws:
IOException
- if an error occurs while reading the data file
-
print
public void print()
Print the content of the object on standard output.
-
-