-
Notifications
You must be signed in to change notification settings - Fork 0
Models
This section pretends to define Report_HTML_DB::Models packages, if I don't define models, developers which don't know how to read perl code gonna have some problems. All models have the should be an transfer object, this section list:
- Report_HTML_DB::Models::Services
-
Report_HTML_DB::Models::Application
- Report_HTML_DB::Models::Application::AlienHunterSearch
- Report_HTML_DB::Models::Application::Feature
- Report_HTML_DB::Models::Application::NcRNASearch
- Report_HTML_DB::Models::Application::RBSSearch
- Report_HTML_DB::Models::Application::Subevidence
- Report_HTML_DB::Models::Application::TranscriptionalTerminator
- Report_HTML_DB::Models::Application::TRFSearch
- Report_HTML_DB::Models::Application::TRNASearch
A service application can't have errors when running application, so you have to "try catch" every request from actions using the models that you want, so, every request, can return two possible responses:
This class represents a simple response from Services application, that is, if you're returning a simple object, use this class, if you want a paginated response see Report_HTML_DB::Models::Services::PageResponse.
| Property | Description |
|---|---|
| status_code | a status from response |
| message | message from response |
| elapsed_ms | time in miliseconds from request |
| response | a object response |
Method used to set response
Returns response from Report_HTML_DB::Models::Services::BaseResponse object instance
Method used to get response
Returns response from Report_HTML_DB::Models::Services::BaseResponse object instance
Method used to set status code
Returns status code from Report_HTML_DB::Models::Services::BaseResponse object instance
Method used to get status code
Returns status code from Report_HTML_DB::Models::Services::BaseResponse object instance
Method used to set message
Returns message from Report_HTML_DB::Models::Services::BaseResponse object instance
Method used to get message
Returns message from Report_HTML_DB::Models::Services::BaseResponse object instance
Method used to set elapsed miliseconds from request
Returns elapsed time in ms from Report_HTML_DB::Models::Services::BaseResponse object instance
Method used to get elapsed time from request in miliseconds
Returns elapsed time in ms from Report_HTML_DB::Models::Services::BaseResponse object instance
This class represents a paginated response, something like,
you're running a SQL query, and you've 10000 results
if you return this shit in one shot, you're application section gonna be to busy to receive another request and your website application should send you to hell. So, if you want to do the right thing, separate your response by offsets and limits, in this way, you can process everything faster and in a clean way.
| Property | Description |
|---|---|
| status_code | a status from response |
| message | message from response |
| elapsed_ms | time in miliseconds from request |
| response | a object response |
| total | total number of response objects |
| offset | offset number of responses |
| page_size | page size number |
Method used to set response
Returns response from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to get response
Returns response from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to set status code
Returns status code from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to get status code
Returns status code from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to set message
Returns message from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to get message
Returns message from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to set elapsed miliseconds from request
Returns elapsed time in ms from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to get elapsed time from request in miliseconds
Returns elapsed time in ms from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to set total number of responses
Returns total number of responses from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to get total number of responses
Returns total number of responses from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to set number of offsets Returns offset number of responses from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to get number of offsets Returns offset number of responses from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to set number of page size Returns page size from Report_HTML_DB::Models::Services::PagedResponse object instance
Method used to get number of page size Returns page size from Report_HTML_DB::Models::Services::PagedResponse object instance
This package sets applications objects that can be used to communicate every application related to report_html_db. The following objects compose this package:
- AlienHunterSearch
- Feature
- NcRNASearch
- RBSSearch
- Subevidence
- TranscriptionalTerminator
- TRFSearch
- TRNASearch
This model represents an AlienHunter result
| Property | Description |
|---|---|
| id | ID from object |
| contig | Contig name |
| start | Start of annotation sequence |
| end | End of annotation sequence |
| length | Length of annotation sequence |
| score | Score from alienhunter annoatation |
| threshold | Threshold from alienhunter annotation |
| feature_id | Feature ID from database |
my $sourceObject = Report_HTML_DB::Models::Application::AlienHunterSearch->new(
id => 6058946,
contig => "Contig_1",
start => 538351,
end => 545571,
length => "7221",
score => "35.131",
threshold => "18.501",
feature_id => 6057173,
);This class will be used like a model responsible of result of features
| Property | Description |
|---|---|
| feature_id | Feature ID from database |
| name | contig name |
| uniquename | feature name |
| fstart | Start of annotated sequence |
| fend | End of annotated sequence |
| type | Type of the feature(CDS, rrna_prediction, trna) |
| predictor | Predictor name(Glimmer, etc.) |
my $sourceObject = Report_HTML_DB::Models::Application::Feature->new(
feature_id => 6060362,
uniquename => "3-isopropylmalate dehydratase large subunit ",
name => "Csp_0032",
fstart => 31314,
fend => 32753,
type => "CDS",
predictor => "Glimmer3",
);Class used to represent non coding RNA search result
| Property | Description |
|---|---|
| id | Feature ID |
| contig | Contig name |
| start | Start position |
| end | End position |
| evalue | Evalue from annotation |
| description | Description annotated |
| target_ID | Identifier of match |
| target_name | Target name |
| target_class | Target class |
| target_type | Target type |
my $sourceObject = Report_HTML_DB::Models::Application::NcRNASearch->new(
id => 6058960,
contig => "Contig_1",
description => "transfer-messenger RNA",
start => 95320,
end => 94943,
evalue => "1.4e-39",
target_ID => "RF00023",
target_name => "tmRNA",
target_type => "Gene;",
target_class => "other"
);This class will be used to represent ribosomal binding site results
| Property | Description |
|---|---|
| feature_id | Feature ID |
| contig | Contig name |
| start | Start position |
| end | End position |
| site_pattern | Site pattern |
| old_start | Old start position |
| old_position | Old position |
| position_shift | Position shift |
| new_start | New start position |
my $sourceObject = Report_HTML_DB::Models::Application::RBSSearch->new(
feature_id => 6057173,
contig => "Contig_1",
start => 2094,
end => 2098,
site_pattern => "GGTAG",
old_start => "ATG",
old_position => "2048",
position_shift => "0"
new_start => "ATG",
);Class used to represent subevidence data
| Property | Description |
|---|---|
| id | Feature ID |
| program | Component name |
| program_description | Component description |
| start | Start position |
| end | End position |
| strand | Strand |
| number | Feature number |
| is_obsolete | Is obsolete? |
| type | Type |
my $sourceObject = Report_HTML_DB::Models::Application::Subevidence->new(
id => 6059271,
program => "annotation_tmhmm.pl",
program_description => "TMHMM - Transmembrane domains",
start => 0,
end => 692,
strand => 0,
number => "2723",
is_obsolete => 0,
type => "intervals"
);This class will be used to represent transcriptional terminator results
| Property | Description |
|---|---|
| feature_id | Feature ID |
| contig | Contig |
| start | Start position |
| end | End position |
| confidence | Confidence score |
| hairpin_score | Hairpin score |
| tail_score | Tail score |
my $sourceObject = Report_HTML_DB::Models::Application::TranscriptionalTerminator->new(
start => 243,
confidence => "76",
contig => "Contig_1",
end => 276,
feature_id => 6057173,
hairpin_score => "-19",
tail_score => "-2.52464"
);This class will be used like a model responsible of results from tandem repeats annotation
| Property | Description |
|---|---|
| feature_id | Feature ID |
| contig | Contig |
| start | Start position |
| end | End position |
| length | Sequence length |
| sequence | Sequence |
| copy_number | Copy number |
my $sourceObject = Report_HTML_DB::Models::Application::TRFSearch->new(
contig => "Contig_1",
end => 1827,
length => "6",
start => 1811,
feature_id => 6057173,
sequence => "GCGCCT",
copy_number => "2.8"
);This class will be used like a model responsible of results from tRNA annotations
| Property | Description |
|---|---|
| id | Feature ID |
| codon | Codon |
| amino_acid | Amino acid |
| sequence | Sequence |
my $sourceObject = Report_HTML_DB::Models::Application::TRFSearch->new(
codon => "CTG",
sequence => "TGGGGTATGGTGTAATTGGCAACACAGCGGTTTCTGGTACCGTCGtTCTTGGTTCGAGTCCAGGTACCCCAG",
amino_acid => "Gln",
id => 6058916
);-
Getting started
1.1 Setup
1.2 Running
- Configuration files
2.1 Creating config file
2.2 Creating JSON file for Website pages
-
Developers Documentation
3.1 Services API
3.2 Website
3.3 Report_HTML_DB -
Deploy
4.1 Considerations
4.2 Apache
4.3 Docker
-
Questions and feedback