public class DataCube extends ChildItem<DataCubeData>
position
, column
and layer
.
The position coordinate
The column coordinate
The column corresponds to a single bioassay which can have links
to any number of raw bioassays. The combination of position and column
coordinate may be linked to any number of raw data spots.
This means that all analysed data with that column/position coordinate has
been calculated from the specified raw data spots. It is not checked that
the specified raw data spots actually are members of the raw bioassays
that the bioassay is linked to.
The layer coordinate
The layer corresponds more or less to a bioassayset. All analysed data
with a given layer is part of the same bioassayset. However, it is possible
that more than one bioassayset use the same layer. For example, a filtering
bioassayset that doesn't change the data uses the same layer as it's parent
bioassayset.
Modifier and Type | Class and Description |
---|---|
private static class |
DataCube.RawMappingQuery
Select data from Dynamic#RawParents table.
|
Modifier and Type | Field and Description |
---|---|
private long |
addedBytes |
private MappingBatcher |
mappingBatcher |
private PositionBatcher |
positionBatcher |
static Item |
TYPE
The type of item represented by this class.
|
Constructor and Description |
---|
DataCube(DataCubeData data)
Creates a new data cube item from the given data.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
addBytes(long bytes) |
(package private) int |
countSpotMappings()
Count the number of raw data mappings for the spot with the most
mappings.
|
static DataCube |
getById(DbControl dc,
int id)
Get a
VirtualDb item when you know the id. |
long |
getBytes()
Gets the number of bytes the analysed data in this cube occupies on disk.
|
short |
getCubeNo()
Get the number of this data cube.
|
Experiment |
getExperiment()
Get the experiment this data cube belongs to.
|
(package private) MappingBatcher |
getMappingBatcher() |
int |
getMaxRawMappingsForSpot()
Get the number of mappings to raw data spots for the spot with
the most number of mappings.
|
(package private) static DataCube |
getNew(DbControl dc,
VirtualDb virtualDb)
Create a new
DataCube item. |
(package private) short |
getNextColumnNo()
Generate the next available column number.
|
(package private) short |
getNextExtraValueNo()
Generate the next available extra value number.
|
(package private) short |
getNextFilterNo()
Generate the next available filter number.
|
(package private) short |
getNextLayerNo()
Generate the next available layer number.
|
short |
getNumColumns()
Get the number of columns created in this data cube.
|
short |
getNumExtraValues()
Get the number of extra values created for this data cube.
|
short |
getNumFilters()
Get the number of filters created for this data cube.
|
short |
getNumLayers()
Get the number of layers created in this data cube.
|
int |
getNumPositions()
Get the number of positions created in this data cube.
|
(package private) Permission |
getPermissionForWriteDeleteAndCreate()
USE permission is enough to be able to manage data cubes.
|
(package private) PositionBatcher |
getPositionBatcher() |
RawDataType |
getRawDataType()
Get the raw data type this experiment uses for the raw data.
|
(package private) SharedData |
getSharedParent()
Get the experiment.
|
Item |
getType()
Get the type of item represented by the object.
|
(package private) VirtualDb |
getVirtualDb()
Get the virtual database this cube is a part of.
|
(package private) DataCubeColumn |
newColumn()
Create a new column in this database.
|
(package private) DataCubeExtraValue |
newExtraValue(Type valueType,
ExtraValue.CoordinateType coordinateType)
Create a new extra vlaue in this data cube.
|
(package private) DataCubeFilter |
newFilter()
Create a new filter in this datacube.
|
(package private) DataCubeLayer |
newLayer()
Create a new layer in this datacube.
|
(package private) void |
onBeforeCommit(Transactional.Action action)
Delete data and update disk usage information on the
experiment if action == Action.DELETE
|
private void |
setCubeNo(short cubeNo) |
(package private) void |
setNumPositions(int positions)
Set by the
AbstractBatcher.close() method. |
private void |
setVirtualDb(VirtualDb virtualDb)
Set the experiment.
|
getPermissionForUse, getPluginPermissions, initPermissions
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, onAfterCommit, onAfterInsert, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate
public static final Item TYPE
Item.DATACUBE
,
getType()
private long addedBytes
private PositionBatcher positionBatcher
private MappingBatcher mappingBatcher
DataCube(DataCubeData data)
data
- the datastatic DataCube getNew(DbControl dc, VirtualDb virtualDb) throws BaseException
DataCube
item.dc
- The DbControl
which will be used for
permission checking and database access.virtualDb
- The virtual database the cube is located inDataCube
itemBaseException
- If there is an errorpublic static DataCube getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
VirtualDb
item when you know the id.dc
- The DbControl
which will be used for
permission checking and database access.id
- The id of the item to loadVirtualDb
itemItemNotFoundException
- If an item with the specified id
is not foundPermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission to the itemBaseException
- If there is another errorpublic Item getType()
Identifiable
Item
enumeration.void onBeforeCommit(Transactional.Action action) throws BaseException
onBeforeCommit
in class BasicItem<DataCubeData>
BaseException
- If there is an errorTransactional
,
Developer documentation: Transactions,
Developer documentation: Coding rules and guidelines for item classesSharedData getSharedParent()
getSharedParent
in class ChildItem<DataCubeData>
Permission getPermissionForWriteDeleteAndCreate()
getPermissionForWriteDeleteAndCreate
in class ChildItem<DataCubeData>
public RawDataType getRawDataType()
RawDataType
objectpublic Experiment getExperiment() throws PermissionDeniedException, BaseException
Experiment
objectPermissionDeniedException
- If the logged in user doesn't have
read permission to the experimentBaseException
- If there is another errorVirtualDb getVirtualDb() throws PermissionDeniedException, BaseException
VirtualDb
objectPermissionDeniedException
- If the logged in user doesn't have
read permission to the itemBaseException
- If there is another errorprivate void setVirtualDb(VirtualDb virtualDb) throws PermissionDeniedException, InvalidDataException
public short getCubeNo()
private void setCubeNo(short cubeNo)
public short getNumFilters()
short getNextFilterNo() throws BaseException
DataCubeData.getNumFilters()
property by one, unless this item hasn't been saved to the database yet.BaseException
public short getNumExtraValues()
short getNextExtraValueNo() throws BaseException
DataCubeData.getNumExtraValues()
property by one, unless this item hasn't been saved to the database yet.BaseException
public short getNumLayers()
short getNextLayerNo() throws BaseException
DataCubeData.getNumLayers()
property by one, unless this item hasn't been saved to the database yet.BaseException
public short getNumColumns()
short getNextColumnNo() throws BaseException
DataCubeData.getNumColumns()
property by one, unless this item hasn't been saved to the database yet.BaseException
public int getNumPositions()
void setNumPositions(int positions)
AbstractBatcher.close()
method. Cannot be
updated after that.public int getMaxRawMappingsForSpot()
public long getBytes()
void addBytes(long bytes)
DataCubeLayer newLayer()
DataCubeColumn newColumn()
DataCubeFilter newFilter()
DataCubeExtraValue newExtraValue(Type valueType, ExtraValue.CoordinateType coordinateType)
PositionBatcher getPositionBatcher() throws BaseException
BaseException
MappingBatcher getMappingBatcher() throws BaseException
BaseException
int countSpotMappings()