Example #1
0
 /**
  * Edit Allele Frequencies
  *
  * Display the minor allele frequency edit fields. This function will
  * dynamically generate HTML based on the configuration preferences for
  * minor allele frequencies. It will only display frequencies that the
  * user has configured to be displayed.
  *
  * @author   Sean Ephraim
  * @access   public
  * @param    object   $variation
  *    Database record for the variation
  * @param    boolean  $unlock
  *    Editable fields or not
  * @return   string   HTML of input fields
  */
 function edit_allele_frequencies($variation, $unlock)
 {
     // Which frequencies should be shown?
     $freqs = get_instance()->config->item('frequencies');
     // Build a HTML string of allele frequency fields
     $html = '';
     if (count($freqs) > 0) {
         // Begin collapsable accordion
         $html .= '<div class="accordion" id="accordion-variant-freqs">';
         $html .= '      <div class="accordion-group">';
         $html .= '            <div class="accordion-heading">';
         $html .= '                <a class="accordion-toggle rowlink" data-toggle="collapse" data-parent="#accordion-variant-freqs" href="#edit-variant-freqs">';
         $html .= '                    <i class="icon-plus"></i> Variant Frequencies';
         $html .= '                </a>';
         $html .= '            </div>';
         $html .= '            <div id="edit-variant-freqs" class="accordion-body collapse">';
         $html .= '                <div class="accordion-inner">';
         // EVS
         if (in_array('evs', $freqs)) {
             $html .= variant_form_input('evs_ea_ac', 'EVS European-American Alternate Allele Count', $variation->evs_ea_ac, $unlock);
             $html .= variant_form_input('evs_ea_an', 'EVS European-American Total Allele Count', $variation->evs_ea_an, $unlock);
             $html .= variant_form_input('evs_ea_af', 'EVS European-American Frequency', $variation->evs_ea_af, $unlock);
             $html .= variant_form_input('evs_aa_ac', 'EVS African-American Alternate Allele Count', $variation->evs_aa_ac, $unlock);
             $html .= variant_form_input('evs_aa_an', 'EVS African-American Total Allele Count', $variation->evs_aa_an, $unlock);
             $html .= variant_form_input('evs_aa_af', 'EVS African-American Frequency', $variation->evs_aa_af, $unlock);
             $html .= variant_form_input('evs_all_ac', 'EVS All Populations Alternate Allele Count', $variation->evs_all_ac, $unlock);
             $html .= variant_form_input('evs_all_an', 'EVS All Populations Total Allele Count', $variation->evs_all_an, $unlock);
             $html .= variant_form_input('evs_all_af', 'EVS All Populations Frequency', $variation->evs_all_af, $unlock);
         }
         // OtoSCOPE
         if (in_array('otoscope', $freqs)) {
             $html .= variant_form_input('otoscope_aj_ac', 'OtoSCOPE Ashkenazi Jewish Alternate Allele Count', $variation->otoscope_aj_ac, $unlock);
             $html .= variant_form_input('otoscope_aj_an', 'OtoSCOPE Ashkenazi Jewish Total Allele Count', $variation->otoscope_aj_an, $unlock);
             $html .= variant_form_input('otoscope_aj_af', 'OtoSCOPE Ashkenazi Jewish Allele Frequency', $variation->otoscope_aj_af, $unlock);
             $html .= variant_form_input('otoscope_co_ac', 'OtoSCOPE Colombian Allele Count', $variation->otoscope_co_ac, $unlock);
             $html .= variant_form_input('otoscope_co_an', 'OtoSCOPE Colombian Total Allele Count', $variation->otoscope_co_an, $unlock);
             $html .= variant_form_input('otoscope_co_af', 'OtoSCOPE Colombian Allele Frequency', $variation->otoscope_co_af, $unlock);
             $html .= variant_form_input('otoscope_us_ac', 'OtoSCOPE European-Americans Alternate Allele Count', $variation->otoscope_us_ac, $unlock);
             $html .= variant_form_input('otoscope_us_an', 'OtoSCOPE European-Americans Total Allele Count', $variation->otoscope_us_an, $unlock);
             $html .= variant_form_input('otoscope_us_af', 'OtoSCOPE European-Americans Allele Frequency', $variation->otoscope_us_af, $unlock);
             $html .= variant_form_input('otoscope_jp_ac', 'OtoSCOPE Japanese Alternate Allele Count', $variation->otoscope_jp_ac, $unlock);
             $html .= variant_form_input('otoscope_jp_an', 'OtoSCOPE Japanese Total Allele Count', $variation->otoscope_jp_an, $unlock);
             $html .= variant_form_input('otoscope_jp_af', 'OtoSCOPE Japanese Allele Frequency', $variation->otoscope_jp_af, $unlock);
             $html .= variant_form_input('otoscope_es_ac', 'OtoSCOPE Spanish Alternate Allele Count', $variation->otoscope_es_ac, $unlock);
             $html .= variant_form_input('otoscope_es_an', 'OtoSCOPE Spanish Total Allele Count', $variation->otoscope_es_an, $unlock);
             $html .= variant_form_input('otoscope_es_af', 'OtoSCOPE Spanish Allele Frequency', $variation->otoscope_es_af, $unlock);
             $html .= variant_form_input('otoscope_tr_ac', 'OtoSCOPE Turkish Alternate Allele Count', $variation->otoscope_tr_ac, $unlock);
             $html .= variant_form_input('otoscope_tr_an', 'OtoSCOPE Turkish Total Allele Count', $variation->otoscope_tr_an, $unlock);
             $html .= variant_form_input('otoscope_tr_af', 'OtoSCOPE Turkish Allele Frequency', $variation->otoscope_tr_af, $unlock);
             $html .= variant_form_input('otoscope_all_ac', 'OtoSCOPE All Populations Alternate Allele Count', $variation->otoscope_all_ac, $unlock);
             $html .= variant_form_input('otoscope_all_an', 'OtoSCOPE All Populations Total Allele Count', $variation->otoscope_all_an, $unlock);
             $html .= variant_form_input('otoscope_all_af', 'OtoSCOPE All Populations Allele Frequency', $variation->otoscope_all_af, $unlock);
         }
         // 1000 Genomes
         if (in_array('1000genomes', $freqs)) {
             $html .= variant_form_input('tg_afr_ac', '1000 Genomes African Alternate Allele Count', $variation->tg_afr_ac, $unlock);
             $html .= variant_form_input('tg_afr_an', '1000 Genomes African Total Allele Count', $variation->tg_afr_an, $unlock);
             $html .= variant_form_input('tg_afr_af', '1000 Genomes African Allele Frequency', $variation->tg_afr_af, $unlock);
             $html .= variant_form_input('tg_eur_ac', '1000 Genomes European Alternate Allele Count', $variation->tg_eur_ac, $unlock);
             $html .= variant_form_input('tg_eur_an', '1000 Genomes European Total Allele Count', $variation->tg_eur_an, $unlock);
             $html .= variant_form_input('tg_eur_af', '1000 Genomes European Allele Frequency', $variation->tg_eur_af, $unlock);
             $html .= variant_form_input('tg_amr_ac', '1000 Genomes American Alternate Allele Count', $variation->tg_amr_ac, $unlock);
             $html .= variant_form_input('tg_amr_an', '1000 Genomes American Total Allele Count', $variation->tg_amr_an, $unlock);
             $html .= variant_form_input('tg_amr_af', '1000 Genomes American Allele Frequency', $variation->tg_amr_af, $unlock);
             $html .= variant_form_input('tg_asn_ac', '1000 Genomes Asian Alternate Allele Count', $variation->tg_asn_ac, $unlock);
             $html .= variant_form_input('tg_asn_an', '1000 Genomes Asian Total Allele Count', $variation->tg_asn_an, $unlock);
             $html .= variant_form_input('tg_asn_af', '1000 Genomes Asian Allele Frequency', $variation->tg_asn_af, $unlock);
             $html .= variant_form_input('tg_all_ac', '1000 Genomes All Populations Alternate Allele Count', $variation->tg_all_ac, $unlock);
             $html .= variant_form_input('tg_all_an', '1000 Genomes All Populations Total Allele Count', $variation->tg_all_an, $unlock);
             $html .= variant_form_input('tg_all_af', '1000 Genomes All Populations Allele Frequency', $variation->tg_all_af, $unlock);
         }
         // End collapsable accordion
         $html .= '                </div>';
         $html .= '            </div>';
         $html .= '      </div>';
         $html .= '</div>';
     }
     // End if
     return $html;
 }
Example #2
0
echo variant_form_input('lrt_pred', 'LRT Prediction', $variation->lrt_pred, $unlock);
?>
                        <?php 
echo variant_form_input('mutationtaster_score', 'MutationTaster Score', $variation->mutationtaster_score, $unlock);
?>
                        <?php 
echo variant_form_input('mutationtaster_pred', 'MutationTaster Prediction', $variation->mutationtaster_pred, $unlock);
?>
                        <?php 
echo variant_form_input('gerp_nr', 'GERP++ Neutral Rate', $variation->gerp_nr, $unlock);
?>
                        <?php 
echo variant_form_input('gerp_rs', 'GERP++ Rejected Substitutions (RS) Score', $variation->gerp_rs, $unlock);
?>
                        <?php 
echo variant_form_input('gerp_pred', 'GERP++ Prediction', $variation->gerp_pred, $unlock);
?>
                    </div>
                </div>
          </div>
    </div>
    <?php 
echo edit_allele_frequencies($variation, $unlock);
?>
    <label for="comments">
        Comments <span class="edit-icon-wrapper"><i class="icon-pencil"></i></span>
    </label>
    <textarea id="comments" name="comments" class="input-block-level <?php 
echo highlight_if_changed($variation->id, 'comments');
?>
" rows="3"><?php