Project

General

Profile

« Previous | Next » 

Revision 1083804e

Added by Andreas Kohlbecker over 10 years ago

showing consensusSequence and adding TODO comments - #3749 (Check if all molecular data is shown correctly in data portal)

View differences:

7.x/modules/cdm_dataportal/includes/occurrences.inc
389 389
  $groups = array();
390 390

  
391 391
  // -- retrieve additional data if neesscary
392
  // TODO bellow call disabled since sequences are not yet supported,
392
  // TODO below call disabled since sequences are not yet supported,
393 393
  //      see  #3347 (services and REST service controller for molecular classes implemented)
394 394
  //
395 395
  // cdm_load_annotations($sequence);
......
400 400
    if (!in_array($field, $exclude_sequence_fields) && ($value && (!is_object($value) || isset($value->class)))) {
401 401
      switch ($field) {
402 402

  
403
        case 'genBankAccession';
403
        case 'geneticAccessionNumber';
404 404
          $dd_elements = array();
405 405
          foreach ($value as $accession) {
406 406
            if (isset($accession->uri) ){
......
412 412
          @_description_list_group_add($groups, cdm_occurrence_field_name_label($field),  $dd_elements, NULL, 1);
413 413
          break;
414 414

  
415
        case 'length':
416
          @_description_list_group_add($groups, t('Sequence length'),  $value , ' ' . t('Nucleotites'), 2);
417
          break;
418 415

  
419
        case 'locus':
416
        case 'locus': // FIXME 3.3 now dnaMarker (DefinedTerm)  if multiple amplifications where used to build this consensus sequence it may be the super set of the markers used in amplification.
420 417
          if (isset($value->name)) {
421 418
            @_description_list_group_add($groups, cdm_occurrence_field_name_label($field),  $value->name, NULL, 3);
422 419
          }
......
425 422
          }
426 423
          break;
427 424

  
428
        case 'sequence':
425
        case 'consensusSequence':
429 426
          // format in genbank style, force linebreaks after each 70 nucleotites
430 427
          // see also http://stackoverflow.com/questions/499137/css-how-can-i-force-a-long-string-without-any-blank-to-be-wrapped-in-xul-and
431 428
          @_description_list_group_add(
......
433 430
            cdm_occurrence_field_name_label($field),
434 431
            array(
435 432
              array(
436
                '#markup' => '<div>' . wordwrap($value, 70, '</br>', TRUE) . '</div>',
433
                '#markup' => '<div class="sequence-length">' . $value->length . ' ' . t('pb'). '</div><div>' . wordwrap($value->string, 70, '</br>', TRUE) . '</div>',
437 434
                '#wrapper_attributes' => array('class'=>'dna-sequence')
438 435
                )
439 436
              ),
440 437
            5);
441 438
          break;
442 439

  
443
        case 'dateSequenced':
440
         case 'dnaSample': // FIXME 3.3 implement
441
            break;
442
        case 'singleReads': // FIXME 3.3 implement
443
          break;
444
        case 'contigFile': // FIXME 3.3 implement - Media
445
            break;
446
        case 'pherograms': // FIXME 3.3 implement - Media
447
          break;
448
        case 'haplotype': // FIXME 3.3 implement
449
            break;
450
        case 'dateSequenced': // FIXME 3.3 now in SingelRead
444 451
          @_description_list_group_add($groups, t('Sequencing date'),  timePeriodToString($value), NULL, 6);
445 452
          break;
446 453

  
447 454
        case 'barcode': // boolean
448 455
          @_description_list_group_add($groups, cdm_occurrence_field_name_label($field), $value ? 'Yes': 'No', NULL, 7);
449 456
          break;
457
        case 'barcodeSequencePart': // FIXME 3.3 implement, compose sequence
458
            break;
450 459

  
451 460
        case 'citation':
452 461
          @_description_list_group_add($groups,
......
515 524

  
516 525
  return $sequence_elements;
517 526
}
527

  
528

  

Also available in: Unified diff