2 creates all the web forms for the qtl data submission
3 and sends the data to qtl_load.pl for processing
4 and loading it to the database.
7 Isaak Y Tecle (iyt2@cornell.edu)
14 my $qtl_form_detail_page = CXGN
::Phenome
::QtlFormDetailPage
->new();
16 package CXGN
::Phenome
::QtlFormDetailPage
;
24 use CXGN
::Scrap
::AjaxPage
;
25 use CXGN
::Page
::FormattingHelpers qw
/info_section_html
33 use CXGN
::DB
::Connection
;
34 use CXGN
::Phenome
::Qtl
;
35 use CXGN
::Phenome
::Qtl
::Tools
;
36 use CXGN
::Phenome
::Population
;
42 my $self = bless {}, $class;
51 my $dbh = CXGN
::DB
::Connection
->new();
52 my $login = CXGN
::Login
->new($dbh);
54 my $sp_person_id = $login->verify_session();
58 my $page = CXGN
::Page
->new("SGN", "isaak");
59 $page->jsan_use("CXGN.Phenome.Tools");
60 $page->jsan_use("CXGN.Phenome.Qtl");
61 $page->jsan_use("MochiKit.DOM");
62 $page->jsan_use("MochiKit.Async");
63 $page->jsan_use("Prototype");
64 $page->jsan_use("jquery");
66 %args = $page->get_all_encoded_arguments();
67 my $type = $args{type
};
69 my $pop_id = $args{pop_id
};
71 my $intro = $self->intro();
72 my ($org_submit, $pop_submit) = $self->org_pop_form();
73 my $traits_submit = $self->traits_form($pop_id);
74 my $pheno_submit = $self->pheno_form($pop_id);
75 my $geno_submit = $self->geno_form($pop_id);
76 my $stat_submit = $self->stat_form($pop_id);
77 my $conf_submit = $self->conf_form($pop_id);
81 $page->header("QTL Data Submission Page");
82 print page_title_html
("Step 0: Introduction");
87 elsif($type eq 'pop_form') {
88 $page->header("QTL Data Submission Page");
89 print page_title_html
("Step 1: Submit Population Details");
95 elsif ($type eq 'trait_form') {
96 $page->header("QTL Data Submission Page");
97 print page_title_html
("Step 2: Submit the List of Traits");
103 elsif ($type eq 'pheno_form') {
104 $page->header("QTL Data Submission Page");
105 print page_title_html
("Step 3: Submit the Phenotype Data");
110 elsif ($type eq 'geno_form') {
111 $page->header("QTL Data Submission Page");
112 print page_title_html
("Step 4: Submit the Genotype Data");
118 elsif ($type eq 'stat_form') {
119 $page->header("QTL Data Submission Page");
121 print page_title_html
("Step 5: Set the Statistical Parameters
122 for the QTL Analysis"
128 elsif ($type eq 'confirm') {
129 $page->header("Confirmation page");
130 print page_title_html
("Step 6: Confirmation");
140 print "To access the QTL data submission form and analysis, please login first.
141 <br/>If you don't have an account with SGN, you can create
142 one using this <a href= /solpeople/new-account.pl>form</a>.";
156 my $taxon_subtitle = qq| <a href
="javascript:Qtl.toggleAssociateTaxon()">[Select Organism
]</a
> |;
157 my $required = qq | <font color
="red"><sup
>*</sup></font
>|;
158 my $organism_form = $self->associate_organism();
160 my $guide = $self->guideline();
162 my $org_sec = CXGN
::Page
::FormattingHelpers
::info_section_html
(
163 title
=>"Select Organism",
164 subtitle
=>$taxon_subtitle . " | " . $guide ,
165 contents
=> $organism_form,
166 id
=>"organism_search",
168 my $pop_sec = CXGN
::Page
::FormattingHelpers
::info_section_html
(
169 title
=>'Population Details',
170 contents
=>"$required <i>must be filled.</i> ",
173 my $qtltools = CXGN
::Phenome
::Qtl
::Tools
->new();
174 my %cross_types = $qtltools->cross_types();
178 foreach my $key (keys %cross_types) {
179 $cross_options .= qq |<option value
="$key">$cross_types{$key} |;
183 my $parent_m = tooltipped_text
('Male parent', 'format eg. Solanum lycopersicum cv moneymaker');
185 my $parent_f = tooltipped_text
('Female parent', 'format eg. Solanum lycopersicum cv micro tom');
188 <form action
="qtl_load.pl" method
="POST" enctype
="MULTIPART/FORM-DATA">
192 <td
>Cross type
$required</td
>
193 <td
> <select name
="pop_type">
199 <td
>Population name
$required</td
>
200 <td
><input type
="text" name
="pop_name" size
=42></td
>
203 <td
>Population description
$required</td
>
204 <td
><textarea name
="pop_desc" rows
= 5 cols
=44></textarea></td
>
207 <td
>$parent_f$required</td
>
208 <td
><input type
="text" name
="pop_female_parent" size
=24></td
>
209 <td
>$parent_m$required</td
>
210 <td
><input type
="text" name
="pop_male_parent" size
=24></td
>
213 <td
>Recurrent parent
</td
>
214 <td
><input type
="text" name
="pop_recurrent_parent" size
=24></td
>
215 <td
>Donor parent
</td
>
216 <td
><input type
="text" name
="pop_donor_parent" size
=24></td
>
219 <td
>Do you want to make the data public?
</td
>
220 <td
><input type
="radio" name
="pop_is_public" value
="true" checked
/>Yes</td
>
221 <td
><input type
="radio" name
="pop_is_public" value
="false" />No</td
>
224 <td
> 
;</td><td> </td
>
225 <td
><input type
="hidden" name
="type" value
="pop_form"></td
>
226 <td
><input type
="submit" value
="Submit"></td
>
233 return $org_sec, $pop_form;
236 #########################
245 my $guide = $self->guideline();
246 my $trait = tooltipped_text
('Traits list', 'in tab delimited format');
248 my $traits_sec = CXGN
::Page
::FormattingHelpers
::info_section_html
(
249 title
=> 'Traits list',
254 my $traits_form = qq^
255 <form action
="qtl_load.pl" method
="POST" enctype
="MULTIPART/FORM-DATA">
257 <table cellspacing
=20>
260 <td
><input type
="file" name
="trait_file" size
=40>
261 <td
> <input type
="hidden" name
="type" value
="trait_form"></td
>
262 <td
> <input type
="hidden" name
="pop_id" value
= $pop_id></td
>
263 <td
><input type
="submit" value
="Submit"> </td
>
276 my $guide= $self->guideline();
278 my $phenotype = tooltipped_text
('Phenotype dataset', 'in tab delimited format');
280 my $pheno_sec = CXGN
::Page
::FormattingHelpers
::info_section_html
(
281 title
=> 'Phenotype dataset',
282 subtitle
=> "$guide",
287 <form action
="qtl_load.pl" method
="POST" enctype
="MULTIPART/FORM-DATA">
289 <table cellspacing
=20>
292 <td
><input type
="file" name
="pheno_file" size
=40>
293 <td
> <input type
="hidden" name
="type" value
="pheno_form"></td
>
294 <td
> <input type
="hidden" name
="pop_id" value
= $pop_id></td
>
295 <td
><input type
="submit" value
="Submit"> </td
>
309 my $guide= $self->guideline();
311 my $genotype = tooltipped_text
('Genotype dataset', 'in tab delimited format');
312 my $geno_sec = CXGN
::Page
::FormattingHelpers
::info_section_html
(
313 title
=> 'Genotype dataset',
318 <form action
="qtl_load.pl" method
="POST" enctype
="MULTIPART/FORM-DATA">
320 <table cellspacing
=20>
323 <td
><input type
="file" name
="geno_file" size
=40>
324 <td
> <input type
="hidden" name
="type" value
="geno_form"></td
>
325 <td
> <input type
="hidden" name
="pop_id" value
=$pop_id></td
>
326 <td
><input type
="submit" value
="Submit"> </td
>
340 my $guide = $self->guideline();
341 my $no_draws = tooltipped_text
('No. of imputations', 'required only if the
342 Simulate method is selected for the
343 calculation of QTL genotype probability method and Multiple Imputation');
344 my $permu_level = tooltipped_text
('Significance level of permutation test',
345 'required only if permutation analysis
346 (LOD threshold) is run');
347 my $genome_scan = tooltipped_text
('Genome scan size (cM):', 'not required for Marker Regression'
349 my $qtl_prob = tooltipped_text
('QTL genotype probablity method:', 'not required for Marker Regression'
352 my $stat_sec =CXGN
::Page
::FormattingHelpers
::info_section_html
(
353 title
=> 'Statistical Parameters',
360 <form action
="qtl_load.pl" method
="POST" enctype
="MULTIPART/FORM-DATA">
364 <table cellspacing
=20>
365 <tr
><td
>QTL model
: </td
>
366 <td
> <select name
="stat_qtl_model">
368 <option
>Single
-QTL Scan
369 <option style
="color: #FF0000;text-decoration: line-through">Two
-QTL Scan
--currently
not available
372 <td
>QTL mapping method
:</td
>
373 <td
><select name
="stat_qtl_method">
375 <option
>Marker Regression
376 <option
>Maximum Likelihood
377 <option
>Haley
-Knott Regression
378 <option
>Multiple Imputation
382 <tr
><td
>$qtl_prob</td
>
383 <td
><select name
="stat_prob_method">
389 <td
>QTL genotype probability significance level
:</td
>
390 <td
><select name
="stat_prob_level">
399 <td
>$genome_scan</td
>
400 <td
><select name
="stat_step_size">
410 <td
><select name
="stat_no_draws">
420 <td
>No
. of permutations
:</td
>
421 <td
><select name
="stat_permu_test">
428 <td
>$permu_level:</td
>
429 <td
> <select name
="stat_permu_level">
438 <td
> <input type
="hidden" name
="type" value
="stat_form"></td
>
439 <td
> <input type
="hidden" name
="pop_id" value
= $pop_id ></td
>
443 <td
><input type
="submit" value
="Submit"> </td
>
445 <td
> <input type
="reset" value
="Reset"></td
>
457 sub associate_organism
{
461 <div id
= 'associateTaxonForm' style
="display: none">
462 <div id
= "organism_search">
467 onkeyup
="Qtl.getTaxons(this.value)">
469 id
="associate_taxon_button"
470 value
="associate organism"
472 onclick
="Qtl.associateTaxon();this.disabled=false;">
473 <select id
="taxon_select"
475 onchange
="Tools.enableButton('associate_taxon_button');"
491 my $guide = $self->guideline();
492 my $dbh = CXGN
::DB
::Connection
->new();
494 my $conf_sec =CXGN
::Page
::FormattingHelpers
::info_section_html
(
496 subtitle
=> "$guide",
500 my ($pop_link, $pop_name);
503 my $pop = CXGN
::Phenome
::Population
->new($dbh, $pop_id);
504 $pop_name = $pop->get_name();
505 $pop_link = qq | <a href
="/phenome/population.pl?population_id=$pop_id"><b
>$pop_name</b></a> |;
509 <form action
=" " method
="POST" enctype
="MULTIPART/FORM-DATA">
511 <table cellspacing
=20>
513 <td
><b
><p
>You have successfully uploaded your QTL data
.</p
>
514 <p
>On the
next page you will see the population data summary
.
515 The qtl analysis is performed on
-the
-fly
and you need to click the
516 graph icon corresponding to the trait of your interest to proceed
517 with the QTL mapping analysis
. The QTL analysis takes a few minutes
,
518 so please be patient
. </p
>
519 <p
>To
continue to the QTL analysis page
, follow the
link below
:</p
>
535 my $guide = $self->guideline();
536 my $intro_sec =CXGN
::Page
::FormattingHelpers
::info_section_html
(
537 title
=> 'Introduction',
544 <form action
="qtl_load.pl" method
="POST" enctype
="MULTIPART/FORM-DATA">
546 <table cellspacing
=20>
549 <p
>The uploading of QTL data needs to be done
in one session
.
550 Therefore
, have ready your data files before starting the
554 <p
>The data you need are
:</p
>
557 <li
>Some basic information about the population
558 <li
>Traits file
(tab delimited
): List of traits
,
559 definition
, units of measurement
.
560 <li
>Phenotype data file
(tab delimited
):
561 <li
>Genotype data file
(tab delimited
):
562 <li
>Statistical parameters
.
565 <p
>The QTL data uploading software is at Beta stage
. If you have any problems
566 uploading your data
or remarks
, please
send us your feedback
.
571 <td
> <input type
="hidden" name
= "type" value
="begin"> </td
>
572 <td
> <input type
="submit" value
="Begin Uploading"> </td
>
585 return my $guideline = qq |<a href
="http://docs.google.com/View?id=dgvczrcd_1c479cgfb">Guidelines
</a
> |;