The models defined here relate uniquely to tables in the database. For a more in depth explanation on how models work please consult the official documentation on Models.
- class cpipilot.repository.models.Experiment(*args, **kwargs)¶
Holds the meta-data pertaining to a single high throughput experiment. (see Experiment defn).
Attributes:
- name - Pre-published or published title of the experiment.
- compressedName - Short name containing no spaces that can be used as a folder name for experimental data.
- description - Variable length description of the experiment including any data not otherwise available in this class design.
- url - Link to the web page or journal article page of the experiment.
- datapath - Path extension to settings.DATA_ROOT that, when combined, gives the location of the compressed or view data used on the website display for efficiency.
- rawdatapath - Path extension to settings.DATA_ROOT that, when combined, gives the location of the raw experimental data.
- rawdatasize - Total size of the raw data so any potential downloaded has some idea of download time. this is calculated by a script called update_raw_folder_size.py that runs from settings.DATA_ROOT/scripts/
- zipdata - Path extension to settings.DATA_ROOT that, when combined, gives the location of the initial .zip download. See Downloading Experimental Data
Relationships:
- mapping - Foreign key relationship to the Mapping model. Each experiment has one mapping which describes how it’s reagents relate to various targets.
- people - Many-to-many relationship to the People model. Many people can be part of a single experiment and the same person may be involved many different experiments.
Name of DB table: experiment
- class cpipilot.repository.models.ExperimentRelPerson(*args, **kwargs)¶
Connects an experiment with the people involved in the experiment. This may be extended later to hold information about the specific roles of the people in the experiment.
Name of DB table: experiment_rel_person
- class cpipilot.repository.models.Person(*args, **kwargs)¶
Holds information about a single individual.
Attributes:
- nameFirst - Person’s first name.
- nameMidInitials - Person’s middle initials.
- nameLast - Person’s surname.
- email - Person’s email address.
- phone - Person’s contact phone number.
- fax - Person’s contact fax number.
Implicit relationships:
- experiments - Experiments that this person is involved in. This many-to-many relationship is defined in the Experiment model and goes through the ExperimentRelPerson model.
Name of DB table: person
- class cpipilot.repository.models.Vendor(*args, **kwargs)¶
Holds information about a reagent vendor. (see Vendor defn).
Attributes:
- name - Vendor’s name.
- description - A description of what type of reagents the vendor sells and any other useful information.
- url - Link to the vendor’s website.
Implicit relationships:
- reagents - The reagents sold buy this vendor.
Name of DB table: vendor
- class cpipilot.repository.models.Gene(*args, **kwargs)¶
Holds information about an annotated gene. A gene is uniquely identified by its HGNC symbol only. (see Gene defn).
Attributes:
- submissionID - ID given to this gene by the experimenter. Soon to be removed as genes aren’t experiment specific.
- symbol - HGNC symbol of the gene.
- externalID - The first ensembl gene ID given to the gene by the first experimental submitter. This needs to be changed so that the ensembl gene ID is obtained automatically through biomart.
Implicit relationships:
- targets - Target sequences related to this gene e.g gene transcripts.
Name of DB table: gene
- class cpipilot.repository.models.Image(*args, **kwargs)¶
Holds information about an image/movie located on disk. One image will point to one file on the harddisk. (see Image defn).
Attributes:
- submissionID - ID given to this image/movie by the experimenter.
- filename - Path extension to this image’s imageSet’s experiment’s datapath. Gives the location of the compressed or view image when combined with settings.DATA_ROOT and experiment.datapath.
- filetype - The file extension of the view data so that the template knows how to display it. Should be replaced by an enumeration at some point.
- rawfilename - Path extension to this image’s imageSet’s experiment’s datapath. Gives the location of the raw experimental data when combined with settings.DATA_ROOT and experiment.rawdatapath.
- rawfiletype - The file extension of the raw data. Should be replaced by an enumeration at some point.
- reporters - The markers (e.g. histone-GFP) that corresponds to one channel/color in the image. Color images may have more markers.
- comments - Free text available to decribe any abnomalities or specific conditions to this data capture.
- display_order - Legacy column currently unused in the software but may be incorporated in future. Indicates the position of this images in a list of all images contained within this image’s imageSet. Start index is 0.
Relationships:
- imageSet - Foreign key relationship to the ImageSet model. ImageSets can be made up of more than one image.
Name of DB table: image
- class cpipilot.repository.models.Reagent(*args, **kwargs)¶
- Holds information about a reagent (e.g. dsRNA, siRNA, chemical compound). A reagent is uniquely defined by it’s vendor prescribed
- externalID and it’s vendor together (some vendors may prescribe the same external ID). (see Reagent defn).
Attributes:
- submissionID - ID given to this reagent by the experimenter. Soon to be rwmoved as reagents aren’t experiment specific.
- forwardSequence - The nucleotide forward sequence.
- reverseSequence - The complementary nucleotide reverse sequence.
- externalID - The ID given to the reagent by the reagent vendor.
- type - The type of reagent (e.g. siRNA, dsRNA, chemical compound). Should be replaced by an enumeration at some point.
- targets - Many-to-many relationship to the Target model. A reagent can have multiple targets and a single target can be targeted by more than one reagent. This relationship is achieved through a table that Django automatically creates.
Relationships:
- phenotypes - Many-to-many relationship to the Phenotype model. Reagents can have multiple phenotypic hits and a single phenotype can have multiple causative reagents. This many-to-many relationship is achived through the ReagentRelPhenotype model which defines extra attributes explaining the nature of the relationship i.e. number of replicates, reproducibility and hits.
- experiments - Many-to-many relationship to the Experiment model. Reagents can be used in many experiments and experiments use many reagents. This many-to-many relationship is achived through the ReagentRelExperiment model which currently contains no extra attributes explaining the nature of the relationship.
Name of DB table: reagent
- class cpipilot.repository.models.ReagentRelExperiment(*args, **kwargs)¶
Forms the many-to-many relationship between reagents and experiments. This is a complicated relationship since reagents can be considered as belonging to an experiment IF they are used on an imageSet of the experiment OR if they couse a certain phenotype the experiment defines OR if the experiment contains a target-reagent relationship for the reagent. This table is updated using the experiments_list function of the Reagent model defined above. This duplication of information within the database is necessary to increase access speeds.
Name of DB table: reagent_rel_experiment
- class cpipilot.repository.models.ReagentRelPhenotype(*args, **kwargs)¶
Forms the many-to-many relationship between reagents and experiments. Defines extra attributes to further describe each relationship.
Attributes:
- reproducibility - A string field showing the number of hits over the number of replicates tested (“hits/replicates”).
- replicates - The number of times this reagent was used in the experiment.
- hits - The number of times that this phenotype was found through the use of this reagent. The number of replicates showing this phenotype.
Relationships:
- reagent - The reagent in the relationship.
- phenotype - The phenotype in the relationship.
Name of DB table: reagent_rel_phenotype
- class cpipilot.repository.models.RtLink(*args, **kwargs)¶
Forms the many-to-many relationship between reagents and targets. Reagents can have many different targets and the targeted entities may have many reagents targeting them. Attributes may be added in the future to provide more description on the nature of the reagent/target relationship (e.g. number of nucleotide mismatches).
Relationships:
- reagent - The reagent in the relationship.
- target - The target in the relationship.
- mappings - Many-to-many relationship to the Mapping model (see RtLinkRelMapping).
Name of DB table: rtLink
- class cpipilot.repository.models.RtLinkRelMapping(*args, **kwargs)¶
Each reagent/target link (rtLink), contains a many-to-many relationship to the Mapping model (see RtLink). A mapping is a set of reagent/target links and a reagent/target link can be contained within many mappings.
Relationships:
- rtLink - The rtLink in the relationship.
- mapping - The mapping in the relationship.
Name of DB table: rtLink_rel_mapping
- class cpipilot.repository.models.Mapping(*args, **kwargs)¶
A mapping holds the information about which reagent/target links belong to which experiments. (see Mapping defn).
Attributes:
- description - Free-text description of the origins or purpose of this mapping.
Implicit relationships:
- experiments - The experiments that use this reagent/target mapping.
Name of DB table: mapping
- class cpipilot.repository.models.Target(*args, **kwargs)¶
Holds information about an annotated target. A gene is uniquely identified by its externalID only. (see Target defn).
Attributes:
- submissionID - ID given to this target by the experimenter. Soon to be removed as targets aren’t experiment specific.
- externalID - The first ensembl transcript ID or NCBI refseq ID given to the gene by the first experimental submitter.
Relationships:
- gene - The gene that this target is associated with. Genes may have several transcripts. Transcript targets only have one related gene.
Implicit relationships:
- reagents - Targeting reagents.
Name of DB table: target
- class cpipilot.repository.models.ImageSet(*args, **kwargs)¶
This model links serves to contain multiple images/movies about a single well that were captured during the experiment. (see ImageSet defn).
Attributes:
- location - A string describing the location of the well in the experiment. May contain plate identifier as well as well location in plate.
- controlID - The experiment that this set of images/movies belongs to.
- filetype - The file extension of the view data so that the template knows how to display it. Should be replaced by an enumeration at some point.
Relationships:
- reagent - The reagent used in the well.
- experiment - The experiment that this set of images/movies belongs to.
Name of DB table: imageSet
- class cpipilot.repository.models.Phenotype(*args, **kwargs)¶
Holds information about an experiment specific phenotype. A phenotype is uniquely identified by its submissionID and the experiment that defined it. (see Phenotype defn).
Attributes:
- submissionID - ID given to the phenotype by the experimenter.
- description - Free-text description of the phenotype.
- annotationType - The method by which this phenotype is assesed on a per well basis. This is limited to manual and automatic at the moment and might need to be changed to an enumeration.
Relationships:
- experiment - The experiment the defined the phenotype.
Implicit relationships:
- reagents - The reagents that cause this phenotype.
Name of DB table: phenotype
- class cpipilot.repository.models.DB(*args, **kwargs)¶
Holds information about a database that a particular identifier might be related to. Holds two databases at the moment (Ensembl and NCBI).
Attributes:
- name - The name of the database.
- description - Free-text description of the database.
- url - The webpage of the database.
Implicit relationships:
- targets - A database can contain extra information about many different target entities.
Name of DB table: db