|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.core.BasicItem<D>
net.sf.basedb.core.OwnedItem<D>
net.sf.basedb.core.SharedItem<D>
net.sf.basedb.core.CommonItem<D>
net.sf.basedb.core.AnnotatedItem<RawBioAssayData>
net.sf.basedb.core.RawBioAssay
public class RawBioAssay
A rawbioassay represents the raw data generated from a single
DerivedBioAssay. A raw bioassay must have a RawDataType
which specifies the data columns generated by the Software.
Raw data is added by a RawDataBatcher object. You can get a
batcher for this raw bioassay by calling the getRawDataBatcher(FeatureIdentificationMethod, Job) method.
| Field Summary | |
|---|---|
private boolean |
arrayDesignHasBeenSet
|
static int |
MAX_HEADER_NAME_LENGTH
The maximum length of the name of a header that can be stored in the database. |
static int |
MAX_HEADER_VALUE_LENGTH
The maximum length of the value of a header that can be stored in the database. |
private boolean |
protocolHasBeenSet
|
private RawDataBatcher |
rawDataBatcher
|
private boolean |
softwareHasBeenSet
|
static Item |
TYPE
The type of item represented by this class. |
| Fields inherited from interface net.sf.basedb.core.Nameable |
|---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
| Constructor Summary | |
|---|---|
RawBioAssay(RawBioAssayData data)
|
|
| Method Summary | |
|---|---|
void |
deleteRawData()
Delete the raw data that has been added to the database for this raw bioassay. |
Set<Annotatable> |
getAnnotatableParents()
Get the parent derived bioassay and extract, if any. |
ArrayDesign |
getArrayDesign()
Get the ArrayDesign this raw data uses. |
static RawBioAssay |
getById(DbControl dc,
int id)
Get a RawBioAssay object when you know the id. |
long |
getBytes()
Get the absolute number of bytes this item uses. |
long |
getDifference()
Always 0. |
DynamicRawDataQuery |
getDynamicRawData()
Get a dynamic query that returns the raw data of this raw bioassay. |
Date |
getEntryDate()
Get the date that the item was registered in the database. |
ItemQuery<Experiment> |
getExperiments()
Get a query that returns all experiments where this raw bioassay is used. |
FileSet |
getFileSet()
Get the file set that collects all files that holds data for this item. |
String |
getHeader(String name)
Get the value for the raw data header with the specified name. |
Set<String> |
getHeaderNames()
Get the names of all raw data headers. |
Job |
getJob()
Get the job that imported data to this raw bioassay. |
Location |
getLocation()
Always Location.PRIMARY. |
static RawBioAssay |
getNew(DbControl dc,
Platform platform,
RawDataType rawDataType)
Create a new raw bioassay for a specific platform and/or raw data type. |
static RawBioAssay |
getNew(DbControl dc,
PlatformVariant variant,
RawDataType rawDataType)
Create a new raw bioassay for a specific platform variant. |
int |
getNumDbSpots()
Get the number of spots on this raw bioassay that are stored in the database. |
int |
getNumFileSpots()
Get the number of spots on this raw bioassay that are stored inside files. |
DerivedBioAssay |
getParentBioAssay()
Get the DerivedBioAssay this raw bioassay is created from. |
Extract |
getParentExtract()
Get the Extract this raw bioassay is created from. |
Collection<FileSet> |
getParentFileSets()
Get the file set from the array design, if it exists. |
Platform |
getPlatform()
Get the platform the item is related to. |
Protocol |
getProtocol()
Get the Protocol used while analysing the scanned images. |
static ItemQuery<RawBioAssay> |
getQuery()
Get a query configured to retrieve raw bioassays. |
String |
getQuotaTypeSystemId()
Always QuotaType.RAW_DATA. |
DataQuery<RawData> |
getRawData()
Get a query that returns the raw data of this raw bioassay. |
RawDataBatcher |
getRawDataBatcher(FeatureIdentificationMethod fiMethod,
Job job)
Get a raw data batcher object which can be used to add raw data to the raw bioassay. |
RawData |
getRawDataById(int id)
Get a raw data spot when you know the id. |
RawData |
getRawDataById(int id,
boolean forceInitialization)
Get a raw data spot when you know the id. |
RawDataType |
getRawDataType()
Get the raw data type this raw bioassay uses for the raw data. |
DataQuery<ReporterData> |
getReporters()
Get a query that returns the reporters on this raw bioassay. |
Software |
getSoftware()
Get the Software used while analysing the scanned images. |
SpotImages |
getSpotImages()
Get the SpotImages item used to generate spot images
for this raw bioassay. |
int |
getSpots()
Utility method that either returns the number of db spots or the number of file spots. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get all: Experiment:s using this raw bioassay
Transformation:s using this raw bioassay
|
PlatformVariant |
getVariant()
Get the platform variant the item is related to. |
boolean |
hasArrayDesign()
Check if this raw bioassay is connected to an array design or not. |
boolean |
hasData()
If raw data has been added to this raw bioassay or not. |
boolean |
hasFileSet()
Check if this item has a file set. |
boolean |
hasSpotImages()
Check if spot images exists for this raw bioassay or not. |
boolean |
isFileOnlyPlatform()
Check if this raw bioassay uses a file-only platform or variant. |
boolean |
isPlatform(String externalId)
Check if the platform/variant of this raw bioassay has the given external ID. |
boolean |
isSameArrayDesign(ArrayDesign design)
Checks if the given array design is the same as already set on this raw bioassay. |
boolean |
isUsed()
Check if: An Experiment is using this raw bioassay
A Transformation is using this raw bio raw data type will also be updated. |
(package private) void |
onBeforeCommit(Transactional.Action action)
Delete raw data if it exists. |
void |
removeHeader(String name)
Remove a specific header from the raw bioassay. |
void |
removeHeaders()
Remove all headers from the raw bioassay. |
void |
setArrayDesign(ArrayDesign arrayDesign)
Set the ArrayDesign this raw data uses. |
void |
setHeader(String name,
String value)
Set the value for a raw data header. |
void |
setNumFileSpots(int numSpots)
Set the number of spots that are stored in files. |
void |
setParentBioAssay(DerivedBioAssay parent)
Set the DerivedBioAssay this raw bioassay is created from. |
void |
setParentExtract(Extract extract)
Set the Extract this raw bioassay is created from. |
void |
setPlatform(Platform platform,
RawDataType rawDataType)
Set the platform and raw data type of the raw bioassay. |
(package private) void |
setProjectDefaults(Project activeProject)
Set software, protocol and array design from project default settings. |
void |
setProtocol(Protocol protocol)
Set the Protocol used while analysing the scanned images. |
void |
setSoftware(Software software)
Set the Software used while analysing the scanned images. |
void |
setVariant(PlatformVariant variant,
RawDataType rawDataType)
Set the platform and variant of the raw bioassay. |
RawBioAssayInfo |
toTransferable(RawBioAssayInfo info)
Transfer the internal state to a transferable object. |
void |
updateArrayDesign(ArrayDesign arrayDesign,
FeatureIdentificationMethod fiMethod,
ProgressReporter progress)
Set the ArrayDesign this raw data uses. |
boolean |
useDifference()
Always FALSE. |
private void |
validateFeatures(DbControl dc,
ArrayDesign design,
FeatureIdentificationMethod fiMethod,
boolean update,
ProgressReporter progress)
Validate that the features/reporters of the raw data matches the features/reporter on the array design. |
| Methods inherited from class net.sf.basedb.core.AnnotatedItem |
|---|
getAnnotationSet, isAnnotated, removeAnnotations, toTransferable |
| Methods inherited from class net.sf.basedb.core.CommonItem |
|---|
getDescription, getName, isRemoved, setDescription, setName, setRemoved, toTransferable |
| Methods inherited from class net.sf.basedb.core.SharedItem |
|---|
getItemKey, getProjectKey, initPermissions, isShared, setItemKey, setProjectKey, toTransferable |
| Methods inherited from class net.sf.basedb.core.OwnedItem |
|---|
getOwner, isOwner, setOwner, takeOwnership, toTransferable |
| Methods inherited from class net.sf.basedb.core.BasicItem |
|---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onRollback, setDbControl, toString, toTransferable, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.basedb.core.Ownable |
|---|
getOwner, isOwner, setOwner, takeOwnership |
| Methods inherited from interface net.sf.basedb.core.Identifiable |
|---|
getId, getVersion |
| Methods inherited from interface net.sf.basedb.core.AccessControlled |
|---|
checkPermission, getPermissions, hasPermission |
| Field Detail |
|---|
public static final Item TYPE
Item.RAWBIOASSAY,
getType()public static final int MAX_HEADER_NAME_LENGTH
setHeader(String, String)
to avoid exceptions.
public static final int MAX_HEADER_VALUE_LENGTH
setHeader(String, String)
to avoid exceptions.
private RawDataBatcher rawDataBatcher
private boolean softwareHasBeenSet
private boolean protocolHasBeenSet
private boolean arrayDesignHasBeenSet
| Constructor Detail |
|---|
RawBioAssay(RawBioAssayData data)
| Method Detail |
|---|
public static RawBioAssay getNew(DbControl dc,
Platform platform,
RawDataType rawDataType)
rawDataType
parameter is ignored. If the platform isn't locked the raw data type
is required and must be a database-based raw data type. Ie.
RawDataType.isStoredInDb() must return true.
dc - The DbControl which will be used for
permission checking and database accessplatform - The platform of the new raw bioassay, null is not allowedrawDataType - The raw data type of the raw bioassay (required if
the platform isn't locked to a specific raw data type)
RawBioAssay item
public static RawBioAssay getNew(DbControl dc,
PlatformVariant variant,
RawDataType rawDataType)
rawDataType
parameter is ignored. If the variant isn't locked the raw data type
is required and must be a database-based raw data type. Ie.
RawDataType.isStoredInDb() must return true.
dc - The DbControl which will be used for
permission checking and database accessvariant - The platform variant of the new raw bioassay, null is not allowedrawDataType - The raw data type of the raw bioassay (required if
the platform isn't locked to a specific raw data type)
RawBioAssay item
public static RawBioAssay getById(DbControl dc,
int id)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
RawBioAssay object 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 load
RawBioAssay item
ItemNotFoundException - If an item with the specified id is
not found
PermissionDeniedException - If the logged in user doesn't
have read permission to the item
BaseException - If there is another errorpublic static ItemQuery<RawBioAssay> getQuery()
ItemQuery objectpublic Item getType()
IdentifiableItem enumeration.
getType in interface Identifiablepublic boolean useDifference()
useDifference in interface DiskConsumableDiskConsumable.getBytes(),
DiskConsumable.getDifference()public long getBytes()
DiskConsumable
getBytes in interface DiskConsumableDiskConsumable.useDifference(),
DiskConsumable.getDifference()public long getDifference()
getDifference in interface DiskConsumablepublic String getQuotaTypeSystemId()
QuotaType.RAW_DATA.
getQuotaTypeSystemId in interface DiskConsumablepublic Location getLocation()
Location.PRIMARY.
getLocation in interface DiskConsumable
public Set<Annotatable> getAnnotatableParents()
throws BaseException
getAnnotatableParents in interface AnnotatableBaseException - If there is an errorpublic FileSet getFileSet()
FileStoreEnabledDbControl.commit()
is called. To check if an item has files without creating a new
file set use the FileStoreEnabled.hasFileSet() method.
getFileSet in interface FileStoreEnabledpublic boolean hasFileSet()
FileStoreEnabledFileStoreEnabled.getFileSet() to avoid creating a new file set when there is
no need for it.
hasFileSet in interface FileStoreEnabledpublic Platform getPlatform()
FileStoreEnabledDataFileType:s that can be added to the file set.
getPlatform in interface FileStoreEnabledpublic PlatformVariant getVariant()
FileStoreEnabledDataFileType:s that can be added to the file set.
getVariant in interface FileStoreEnabledpublic Collection<FileSet> getParentFileSets()
getParentFileSets in interface FileStoreEnabledFileSet or nullpublic Date getEntryDate()
Registered
getEntryDate in interface Registered
public boolean isUsed()
throws BaseException
Experiment is using this raw bioassay
Transformation is using this raw bio raw data type will also be updated. The platform can't be changed
if raw data has been imported to the database.assay
isUsed in class BasicItem<RawBioAssayData>BaseException - If not able to tell if item is used or not.BasicItem.getUsingItems()public Set<ItemProxy> getUsingItems()
Experiment:s using this raw bioassay
Transformation:s using this raw bioassay
getUsingItems in class BasicItem<RawBioAssayData>BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
void onBeforeCommit(Transactional.Action action)
throws BaseException
onBeforeCommit in class SharedItem<RawBioAssayData>BaseException - If there is another errorTransactional,
Developer documentation: Transactions,
Developer documentation: Coding rules and guidelines for item classes
void setProjectDefaults(Project activeProject)
throws BaseException
setProjectDefaults in class BasicItem<RawBioAssayData>activeProject - The currently active project
BaseExceptionpublic RawBioAssayInfo toTransferable(RawBioAssayInfo info)
ToTransferable
toTransferable in interface ToTransferable<RawBioAssayInfo>info - The transferable object to use
public void setPlatform(Platform platform,
RawDataType rawDataType)
setVariant(PlatformVariant, RawDataType) if you
want to set a specific variant. If the platform is locked to a raw data type,
the rawDataType parameter is ignored. If the platform isn't
locked the raw data type must be a database-based raw data type. Ie.
RawDataType.isStoredInDb() must return true.
platform - The new platform, null is not allowesrawDataType - The raw data type, required if the platform
doesn't specify a raw data type
PermissionDeniedException - If the logged in user doesn't have
write permission
InvalidDataException - If platform is null or if the raw data
type is not properly specified
public void setVariant(PlatformVariant variant,
RawDataType rawDataType)
PlatformVariant.getPlatform().
If the platform variant is locked to a raw data type, the raw data
type is also updated. The platform variant can't be changed
if raw data has been imported to the database.
variant - The new platform variantrawDataType - The rawdata type for this platform variant.
Null is allowed if rawDataType already has been set.
PermissionDeniedException - If the logged in user doesn't have
write permission
InvalidDataException - If variant is nullpublic boolean isPlatform(String externalId)
externalId - The external ID to match
public boolean isFileOnlyPlatform()
public RawDataType getRawDataType()
RawDataType object
public Job getJob()
throws PermissionDeniedException,
BaseException
Job object, ot null if this information is
not available
PermissionDeniedException - If the logged in user doesn't have
read permission to the job
BaseException - If there is another error
public DerivedBioAssay getParentBioAssay()
throws PermissionDeniedException,
BaseException
DerivedBioAssay this raw bioassay is created from.
DerivedBioAssay item or null if not known
PermissionDeniedException - If the logged in user doesn't have
read permission for the scanner
BaseException - If there is another error.
public void setParentBioAssay(DerivedBioAssay parent)
throws PermissionDeniedException
DerivedBioAssay this raw bioassay is created from.
parent - The parent bioassay or null if not known
PermissionDeniedException - If the logged in user doesn't have
write permission for the raw bioassay use permission for the scan
BaseException - If there is another error
public Extract getParentExtract()
throws PermissionDeniedException,
BaseException
Extract this raw bioassay is created from.
Extract item or null if not known
PermissionDeniedException - If the logged in user doesn't have
read permission for the extract
BaseException - If there is another error.
public void setParentExtract(Extract extract)
throws PermissionDeniedException
Extract this raw bioassay is created from.
extract - The parent extract or null if not known
PermissionDeniedException - If the logged in user doesn't have
write permission for the raw bioassay use permission for the scan
BaseException - If there is another error
public Software getSoftware()
throws PermissionDeniedException,
BaseException
Software used while analysing the scanned images.
Software item or null if not known
PermissionDeniedException - If the logged in user doesn't have
read permission for the software
BaseException - If there is another error.
public void setSoftware(Software software)
throws PermissionDeniedException
Software used while analysing the scanned images.
software - The software or null if not known
PermissionDeniedException - If the logged in user doesn't have
write permission for the raw bioassay use permission for the scanner
BaseException - If there is another error
public Protocol getProtocol()
throws PermissionDeniedException,
BaseException
Protocol used while analysing the scanned images.
getProtocol in interface AnnotatablegetProtocol in class AnnotatedItem<RawBioAssayData>Protocol item or null if not known
PermissionDeniedException - If the logged in user doesn't have
read permission for the protocol
BaseException - If there is another error.
public void setProtocol(Protocol protocol)
throws PermissionDeniedException
Protocol used while analysing the scanned images.
protocol - The protocol or null if not known
PermissionDeniedException - If the logged in user doesn't have
write permission for the raw bioassay use permission for the protocol
BaseException - If there is another error
public ArrayDesign getArrayDesign()
throws PermissionDeniedException,
BaseException
ArrayDesign this raw data uses. This should normally
be the same as the array design reached via the hybridization, but
doesn't have to be.
ArrayDesign item or null if not known
PermissionDeniedException - If the logged in user doesn't have
read permission for the array design
BaseException - If there is another error.
public void setArrayDesign(ArrayDesign arrayDesign)
throws PermissionDeniedException
ArrayDesign this raw data uses. The array design can't be
changed with this method once raw data spots has been added. Use
the updateArrayDesign(ArrayDesign, FeatureIdentificationMethod, ProgressReporter) to
do that.
arrayDesign - The ArrayDesign item or null if not known
PermissionDeniedException - If the logged in user doesn't have
write permission for the raw bioassay use permission for the array design
or spots has already been added
BaseException - If there is another errorpublic boolean isSameArrayDesign(ArrayDesign design)
public void updateArrayDesign(ArrayDesign arrayDesign,
FeatureIdentificationMethod fiMethod,
ProgressReporter progress)
throws PermissionDeniedException,
InvalidDataException
ArrayDesign this raw data uses. If data has already been
imported to the raw bioassay, the reporters for each position on the
new array design must match the positions of reporters already present in
the raw bioassay.
arrayDesign - The ArrayDesign item or null if not knownfiMethod - The method to use for identifying features on the
new array design. Use null to use the method choosen by the new array design.
The FeatureIdentificationMethod.FEATURE_ID will not work unless the
raw bioassay is already connected to an array design which has features with
external ID:sprogress - An optional progress reporter
PermissionDeniedException - If the logged in user doesn't have
write permission for the raw bioassay use permission for the array design
InvalidDataException - If the features of the new array design doesn't
match the raw data
BaseException - If there is another errorpublic boolean hasArrayDesign()
public int getSpots()
public int getNumDbSpots()
public int getNumFileSpots()
public void setNumFileSpots(int numSpots)
numSpots - The number of spotspublic boolean hasData()
public SpotImages getSpotImages()
throws PermissionDeniedException,
BaseException
SpotImages item used to generate spot images
for this raw bioassay. If no SpotImages exists
a new one is created, and is automatically saved to the database (if
commit is called).
SpotImages item
PermissionDeniedException - If logged in user doesn't have read permission to the spot images.
BaseException - If there is some kind of error.hasSpotImages()public boolean hasSpotImages()
getSpotImages()public String getHeader(String name)
name - The name of the header
public void setHeader(String name,
String value)
throws PermissionDeniedException,
InvalidDataException
name - The name of the headervalue - The value of the header
PermissionDeniedException - If the logged in user doesn't
have write permission or if spots already has been added to the
raw bioassay
InvalidDataException - If the name or value is null or too longpublic void removeHeaders()
public void removeHeader(String name)
name - The name of the headerpublic Set<String> getHeaderNames()
public ItemQuery<Experiment> getExperiments()
ItemQuery object
public RawDataBatcher getRawDataBatcher(FeatureIdentificationMethod fiMethod,
Job job)
throws PermissionDeniedException,
BaseException
fiMethod - The method to use for identifying features, or null to
use the method choosen by the array design. This parameter has no meaning
if the raw bioassay is not connected to an array design or if the array
design has no features.job - The job that is currently running, or null if the raw data import
is not running as a job
RawDataBatcher object. If this method is called multiple
times the fiMethod and job parameter is ignored
and the same batcher as before is returned
PermissionDeniedException - If raw data has already been added
or the logged in user doesn't have write permission
BaseException - If there is another error
public void deleteRawData()
throws PermissionDeniedException,
BaseException
getRawDataBatcher(FeatureIdentificationMethod, Job).
PermissionDeniedException - If the logged in user doesn't have
write permission or a RawDataBatcher has been fetched
using the getRawDataBatcher(FeatureIdentificationMethod, Job)
method or the raw bioassay is used by some experiment
BaseException - If there is another error
public RawData getRawDataById(int id)
throws ItemNotFoundException,
BaseException
getRawDataById(int, boolean)
instead.
id - The id of the spot
RawData object
ItemNotFoundException - If no raw data item was found for the given id.
BaseException - If there some other error.
public RawData getRawDataById(int id,
boolean forceInitialization)
throws ItemNotFoundException,
BaseException
id - The id of the spotforceInitialization - If TRUE the raw data and associated feature and
reporter are sure to be initialized
RawData object
ItemNotFoundException - If no raw data item was found for the given id.
BaseException - If there some other error.public DataQuery<RawData> getRawData()
DataQuery objectpublic DataQuery<ReporterData> getReporters()
getRawData() can be
used without modifications on this query.
DataQuery objectpublic DynamicRawDataQuery getDynamicRawData()
DynamicRawDataQuery object
private void validateFeatures(DbControl dc,
ArrayDesign design,
FeatureIdentificationMethod fiMethod,
boolean update,
ProgressReporter progress)
dc - The DbControl to use for database accessdesign - The array design to validate againstfiMethod - The method to use for identifying features, or null
to use the method choosen by the array designupdate - If the raw data should be linked to the new feature or notprogress - An optional progress reporter
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||