Class DerivedBioAssay

    • Field Detail

      • SCAN

        public static final String SCAN
        The id for the DerivedBioAssayType item representing a scanned hybridization.
        See Also:
        Constant Field Values
      • SEQUENCES

        public static final String SEQUENCES
        The id for the DerivedBioAssayType item representing original sequenced data.
        See Also:
        Constant Field Values
      • ARRANGEMENT

        public static final String ARRANGEMENT
        The id for the DerivedBioAssayType item representing sequenced data that has been aligned to a reference database.
        See Also:
        Constant Field Values
      • extractHasBeenSet

        private boolean extractHasBeenSet
      • protocolHasBeenSet

        private boolean protocolHasBeenSet
      • hardwareHasBeenSet

        private boolean hardwareHasBeenSet
      • softwareHasBeenSet

        private boolean softwareHasBeenSet
    • Method Detail

      • getNew

        public static DerivedBioAssay getNew​(DbControl dc,
                                             boolean isRoot,
                                             Job job)
        Create a new parent-less derived bioassay. Parent items can be added by calling addPhysicalBioAssay(PhysicalBioAssay) or addParent(DerivedBioAssay).
        Parameters:
        dc - The DbControl which will be used for permission checking and database access
        isRoot - TRUE if the new item is a root derived bioassay (eg. it have physical bioassays as parent items)
        job - The job that created the new bioassay
        Returns:
        A new DerivedBioAssay item
        Since:
        3.2
      • getNew

        public static DerivedBioAssay getNew​(DbControl dc,
                                             PhysicalBioAssay bioAssay,
                                             Job job)
        Create a new (root) derived bioassay from a physical bioassay.
        Parameters:
        dc - The DbControl which will be used for permission checking and database access
        bioAssay - The parent physical bioassay
        job - The job that created the new bioassay
        Returns:
        A new DerivedBioAssay item
      • getNew

        public static DerivedBioAssay getNew​(DbControl dc,
                                             DerivedBioAssay parent,
                                             Job job)
        Create a new child derived bioassay from a parent derived bioassay.
        Parameters:
        dc - The DbControl which will be used for permission checking and database access
        parent - The parent bioassay
        job - The job that created the new bioassay
        Returns:
        A new DerivedBioAssay item
      • getType

        public Item getType()
        Description copied from interface: Identifiable
        Get the type of item represented by the object. The returned value is one of the values defined in the Item enumeration.
        Specified by:
        getType in interface Identifiable
        Returns:
        A value indicating the type of item
      • isUsed

        public boolean isUsed()
                       throws BaseException
        Description copied from class: BasicItem
        Check if this item is used by some other item. With used we mean that another item is linking to this item in way that prevents this item from beeing deleted. Ie. if we tried to delete an item that is used, we would get a foreign key violation error from the database. If the subclass overrides this method it should propagate the call to the superclass, ie. super.isUsed(), unless it has decided that the item is used by some other means.
        Overrides:
        isUsed in class BasicItem
        Returns:
        TRUE if this item is used, FALSE otherwise
        Throws:
        BaseException - If not able to tell if item is used or not.
        See Also:
        BasicItem.getUsingItems()
      • getEntryDate

        public Date getEntryDate()
        Description copied from interface: Registered
        Get the date that the item was registered in the database.
        Specified by:
        getEntryDate in interface Registered
        Returns:
        A date or null if this is not known
      • setEntryDate

        public void setEntryDate​(Date entryDate)
        Description copied from interface: Registered
        Set the date the entry was registered in the database. Implementations should only allow this property to be set before the item is first stored in the database. The intention of this method is to facilitate export/import of data between server.
        Specified by:
        setEntryDate in interface Registered
        Parameters:
        entryDate - A date or null to use today's date
      • hasFileSet

        public boolean hasFileSet()
        Description copied from interface: FileStoreEnabled
        Check if this item has a file set. Always call this method before FileStoreEnabled.getFileSet() to avoid creating a new file set when there is no need for it.
        Specified by:
        hasFileSet in interface FileStoreEnabled
        Returns:
        TRUE if a file set exists, FALSE if not
      • getPlatform

        public Platform getPlatform()
        Description copied from interface: FileStoreEnabled
        Get the platform the item is related to. The platform is used to limit the DataFileType:s that can be added to the file set.
        Specified by:
        getPlatform in interface FileStoreEnabled
        Returns:
        A platform or null if the items is not related to any platform.
      • getVariant

        public PlatformVariant getVariant()
        Description copied from interface: FileStoreEnabled
        Get the platform variant the item is related to. The platform is used to limit the DataFileType:s that can be added to the file set.
        Specified by:
        getVariant in interface FileStoreEnabled
        Returns:
        A platform or null if the items is not related to any variant.
      • getParentFileSets

        public Collection<FileSet> getParentFileSets()
        Description copied from interface: FileStoreEnabled
        Get the file sets of parent item(s) that are related to the current item. If the item has no parent(s) or if the parent has no file set, null or an empty collection is returned.
        Specified by:
        getParentFileSets in interface FileStoreEnabled
        Returns:
        A collection of FileSet or null
      • testFixChildren

        public void testFixChildren()
      • getPhysicalBioAssays

        public ItemQuery<PhysicalBioAssay> getPhysicalBioAssays()
        Get a query that returns the physical bioassays used to create this derived bioassay.
        Returns:
        An ItemQuery object
        Since:
        3.2
      • getParents

        public ItemQuery<DerivedBioAssay> getParents()
        Get all parent derived bioassays.
        Returns:
        A query returning all parent bioassays
        Since:
        3.2
      • isRoot

        public boolean isRoot()
        Check if this bioassay set is derived from one or more physical bioassays or from derived bioassays. A root derived bioassay can only have physical bioassays as parent items. A non-root derived bioassay can only have other derived bioassays as parents, but the core keep automatically keep track of the physical bioassays.
        Returns:
        TRUE if this is a root bioassay set derived form a physical bioassay
      • getExtract

        public Extract getExtract()
        Get the extract that is the parent of the data in this derived bioassay. The extract should be an extract that is present on the physical bioassay that this bioassay is derived from. But this is not enforced by the core. If no extract is specified this bioassay applies to all extracts that are part of the physical bioassay.
        Returns:
        An extract or null
      • setExtract

        public void setExtract​(Extract extract)
        Set the extract that is the parent of data in this bioassay. The extract should be an extract that is present on the physical bioassay that this bioassay is derived from. But this is not enforced by the core.
        Parameters:
        extract - The extract or null
      • getChildren

        public ItemQuery<DerivedBioAssay> getChildren()
        Get all child derived bioassays.
        Returns:
        A query returning all child bioassays
      • getJob

        public Job getJob()
        Get the job that created this bioassay.
        Returns:
        A job or null if not created by a job
      • setJob

        public void setJob​(Job job)
                    throws PermissionDeniedException
        Set the job on this derived bioassay that was used to create or import data for it.
        Parameters:
        job - The job or null to clear the existing job
        Throws:
        PermissionDeniedException - If the logged in user doesn't have write permission
        Since:
        3.18.1
      • setProtocol

        public void setProtocol​(Protocol protocol)
                         throws PermissionDeniedException
        Set the Protocol that describes the procedure used when creating this bioassay set.
        Parameters:
        protocol - A Protocol item, or null if not known
        Throws:
        PermissionDeniedException - If the logged in user doesn't have write permission on this event or use permission for the protocol
      • setKit

        public void setKit​(Kit kit)
                    throws PermissionDeniedException
        Set the Kit that was used when creating this bioassay.
        Parameters:
        kit - A Kit item, or null if not known
        Throws:
        PermissionDeniedException - If the logged in user doesn't have write permission on this event or use permission for the kit
        Since:
        3.7
      • getHardware

        public Hardware getHardware()
        Get the Hardware that was used when creating this bioassay set.
        Returns:
        A Hardware item, or null if not known
      • setHardware

        public void setHardware​(Hardware hardware)
                         throws PermissionDeniedException
        Set the Hardware that was used when creating this bioassay set.
        Parameters:
        hardware - A Hardware item, or null if not known
        Throws:
        PermissionDeniedException - If the logged in user doesn't have write permission on this event or use permission for the hardware
      • getSoftware

        public Software getSoftware()
        Get the Software that was used when creating this bioassay set.
        Returns:
        A Software item, or null if not known
      • setSoftware

        public void setSoftware​(Software software)
                         throws PermissionDeniedException
        Set the Software that was used when creating this bioassay set.
        Parameters:
        software - A Software item, or null if not known
        Throws:
        PermissionDeniedException - If the logged in user doesn't have write permission on this event or use permission for the software
      • getArrayDesign

        public ArrayDesign getArrayDesign()
                                   throws PermissionDeniedException,
                                          BaseException
        Get the array design connected to this derived bioassay by following the path from the physical bioassay to the array slide to the array batch to the array design. If this derived bioasay has multiple parents that are linked to different array designs, null is returned.
        Returns:
        The array design, or null if no array design is connected
        Throws:
        PermissionDeniedException - If the logged in user doesn't have read permission for the array design
        BaseException - If there is another error.
      • countRawBioAssays

        public long countRawBioAssays()
                               throws BaseException
        Counts all raw bioassays that have been created from this bioassay. The count includes raw bioassays that the logged in user doesn't have access to.
        Returns:
        The number of raw bioassays
        Throws:
        BaseException - If the raw bioassays couldn't be counted.