6 /markers/polymorphisms.mas - a Mason component displaying information about map polymorphisms of marker product lengths
16 $marker - a CXGN::Marker object.
23 Lukas Mueller <lam87@cornell.edu>
34 my $polymorphisms_html='';
35 my $dbh = $marker->{dbh};
37 my $experiments=$marker->experiments();
38 if($experiments and @{$experiments}) {
39 for my $experiment(@{$experiments}) {
40 my $pcr=$experiment->{pcr_experiment};
41 my $rflp=$experiment->{rflp_experiment};
42 if($pcr and !grep {$_==$pcr->pcr_experiment_id()} @displayed_pcr) {
43 my $pcr_bands=$pcr->pcr_bands_hash_of_strings();
44 my $digest_bands=$pcr->pcr_digest_bands_hash_of_strings();
45 my $pcr_bands_html='';
46 my $digest_bands_html='';
47 for my $accession_id(keys(%{$pcr_bands})) {
48 my $accession_name=CXGN::Accession->new($dbh,$accession_id)->verbose_name();
49 $pcr_bands_html.="<b>$accession_name:</b> $pcr_bands->{$accession_id}<br />";
51 for my $accession_id(keys(%{$digest_bands})) {
52 my $accession_name=CXGN::Accession->new($dbh,$accession_id)->verbose_name();
53 $digest_bands_html.="<b>$accession_name:</b> $digest_bands->{$accession_id}<br />";
57 $mg=$pcr->mg_conc().'mM';
61 $temp=$pcr->temp().'°C';
63 $polymorphisms_html.='<tr><td width="100%">';
64 my $fwd=$pcr->fwd_primer();
65 my $rev=$pcr->rev_primer();
67 $fwd='<span class="sequence">'.$fwd.'</span>';
70 $fwd='<span class="ghosted">Unknown</span>';
73 $rev='<span class="sequence">'.$rev.'</span>';
76 $rev='<span class="ghosted">Unknown</span>';
78 my $enz=$pcr->enzyme()||'unknown enzyme';
79 $temp||='<span class="ghosted">Unknown</span>';
80 $mg||='<span class="ghosted">Unknown</span>';
81 my $digest_title="Digested band sizes (using $enz)";
82 unless($digest_bands_html) {
83 $digest_title=' ';
84 $digest_bands_html=' ';
86 $polymorphisms_html.=CXGN::Page::FormattingHelpers::info_table_html
88 '__title'=>"PCR data <span class=\"tinytype\">Exp. ID ".$pcr->pcr_experiment_id."</span>",
89 "Forward primer (5'-3')"=>"<span class=\"sequence\">$fwd</span>",
90 "Reverse primer (5'-3')"=>"<span class=\"sequence\">$rev</span>",
91 'Accessions and product sizes'=>$pcr_bands_html,
92 $digest_title=>$digest_bands_html,
93 'Approximate temperature'=>$temp,
94 'Mg<sup>+2</sup> concentration'=>$mg,
96 '__tableattrs'=>"width=\"100%\"",
98 $polymorphisms_html.='</td></tr>';
102 if($polymorphisms_html) {
103 print info_section_html(title=>'Other PCR data',contents=>'<table width="100%" cellspacing="0" cellpadding="0" border="0">'.$polymorphisms_html.'</table>');