# CBS Bacteria Catalogue
#
# Version 2004.03.22.01
# Last Updated March 23, 2004
# Author: Domenico Marra & Francesca Piersigilli & Paolo Romano
# (c) CABRI 1999-2023

$CBS_BACT_DB=$Library:[CBS_BACT group:$CABRI_BACT_LIBS
 res:$CBS_BACT_RES
 comment:'CBS Collection of bacteria (Utrecht, The Netherlands)'
 defaultEntryView:$Entries_View
 defaultView:$CABRI_Bacteria_View
 format:$CBS_BACT_FORMAT maxNameLen:60
 files:{$LibFile:cbs_bact}
 links:{ $Link:[$CBS_BACT_DB to:$BCCM_LMG_DB
           fromField:$DF_CABRI_Strain_number toField:$DF_CABRI_Other_collection_numbers]
         $Link:[$CBS_BACT_DB to:$CABI_BACT_DB
           fromField:$DF_CABRI_Strain_number toField:$DF_CABRI_Other_collection_numbers]
         $Link:[$CBS_BACT_DB to:$CBS_BACT_SYNONYMS_DB
           fromField:$DF_CABRI_Name toField:$DF_CABRI_Name]
      }
 ]

$CBS_BACT_FILE=$FileType:[text typeName:'dat' maxline:10000 fieldTokens:fields]
$CBS_BACT_SYNTAX=$Syntax:[file:'SRSSITE:cbs_bact.is' ignore:'\t']

$CBS_BACT_FORMAT=$LibFormat:[fileType:$CBS_BACT_FILE
   syntax:$CBS_BACT_SYNTAX
   printFormat:table3 tableFormat:left
   fields:{
    $Field:[$DF_CABRI_Strain_number code:strain_no index:id
            indexToken:strain_no tableToken:'t_fields|strain_no'
#            sortable:y
            ]  
    $Field:[$DF_CABRI_Other_collection_numbers code:other_nos index:str
            indexToken:'other_nos' tableToken:'t_fields|other_nos']
    $Field:[$DF_CABRI_Name code:name index:str
            indexToken:'name' tableToken:'t_fields|name'
#            sortable:y
            ]  
    $Field:[$DF_CABRI_Infrasubspecific_names code:infra index:str
            indexToken:'strX|infra' tableToken:'t_fields|infra']
    $Field:[$DF_CABRI_Organism_type code:org_type index:str
            indexToken:'strX|org_type' tableToken:'t_fields|org_type']
    $Field:[$DF_CABRI_Restrictions code:restrictions index:str
            indexToken:'strX|restrictions' tableToken:'t_fields|restrictions']
    $Field:[$DF_CABRI_Status code:status index:str
            indexToken:'strX|status' tableToken:'t_fields|status']
    $Field:[$DF_CABRI_History code:history index:str
            indexToken:'strX|history' tableToken:'t_fields|history']
    $Field:[$DF_CABRI_Other_names code:oth_names index:str
            indexToken:oth_names tableToken:'t_fields|oth_names']
    $Field:[$DF_CABRI_Isolated_from code:isol index:str
            indexToken:'strX|isol' tableToken:'t_fields|isol']
    $Field:[$DF_CABRI_Geographic_origin code:origin index:str
            indexToken:'strX|origin' tableToken:'t_fields|origin']
    $Field:[$DF_CABRI_Mutant code:mutant index:str
            indexToken:'strX|mutant' tableToken:'t_fields|mutant']
    $Field:[$DF_CABRI_Enzyme_production code:enzyme index:str
            indexToken:'strX|enzyme' tableToken:'t_fields|enzyme']
    $Field:[$DF_CABRI_Metabolite_production code:metab index:str
            indexToken:'strX|metab' tableToken:'t_fields|metab']
    $Field:[$DF_CABRI_Applications code:applic index:str
            indexToken:'strX|applic' tableToken:'t_fields|applic']
    $Field:[$DF_CABRI_Literature code:literature index:str
            indexToken:'strX|literature' tableToken:'t_fields|literature']
    $Field:[$DF_CABRI_Conditions_for_growth code:cond index:str
            indexToken:'strX|cond' tableToken:'t_fields|cond']
    $Field:[$DF_CABRI_Form_of_supply code:supply index:str
            indexToken:'strX|supply' tableToken:'t_fields|supply']
  
    $Field:[$DF_CABRI_IDE]
    $Field:[$DF_CABRI_NAM]
    $Field:[$DF_CABRI_ALL]
    $Field:[$DF_CABRI_Information code:information index:show
            indexToken:'strX|name' token:'strX|name' tableToken:'t_fields|name']
    }
 ]

$CBS_BACT_RL_DB=$Library:[CBS_BACT_RL group:$CABRI_BACT_HIDDEN_LIBS
 type:hidden 
 defaultView:$CABRI_Bacteria_View
 format:$CBS_BACT_RL_FORMAT maxNameLen:60
 files:{$LibFile:cbs_bact}
 links:{$Link:[$CBS_BACT_RL_DB to:$BCCM_LMG_RL_DB
           fromField:$DF_CABRI_Other_collection_numbers
           toField:$DF_CABRI_Strain_number]
        $Link:[$CBS_BACT_RL_DB to:$CABI_BACT_RL_DB
           fromField:$DF_CABRI_Other_collection_numbers
           toField:$DF_CABRI_Strain_number]
        $Link:[$CBS_BACT_RL_DB to:$CBS_BACT_DB
           fromField:$DF_CABRI_Strain_number toField:$DF_CABRI_Strain_number]
       }
 ]

$CBS_BACT_RL_FORMAT=$LibFormat:[fileType:$CBS_BACT_FILE syntax:$CBS_BACT_SYNTAX
   printFormat:table3 tableFormat:left
   fields:{ $Field:[$DF_CABRI_Strain_number code:strain_no index:id
                    indexToken:strain_no tableToken:'t_fields|strain_no']  
            $Field:[$DF_CABRI_Other_collection_numbers code:other_nos index:str
                    indexToken:'other_nos' tableToken:'t_fields|other_nos']
    }
 ]

$CBS_BACT_EL_DB=$Library:[CBS_BACT_EL group:$CABRI_BACT_HIDDEN_LIBS
 type:hidden 
 defaultView:$CABRI_Bacteria_View
 format:$CBS_BACT_EL_FORMAT maxNameLen:60
 files:{$LibFile:cbs_bact}
 links:{ $Link:[$CBS_BACT_EL_DB to:$BCCM_LMG_EL_DB
           fromField:$DF_CABRI_Other_collection_numbers
           toField:$DF_CABRI_Other_collection_numbers]
         $Link:[$CBS_BACT_EL_DB to:$CABI_BACT_EL_DB
           fromField:$DF_CABRI_Other_collection_numbers
           toField:$DF_CABRI_Other_collection_numbers]
         $Link:[$CBS_BACT_EL_DB to:$CBS_BACT_DB
           fromField:$DF_CABRI_Strain_number toField:$DF_CABRI_Strain_number]
       }
 ]

$CBS_BACT_EL_FORMAT=$LibFormat:[fileType:$CBS_BACT_FILE syntax:$CBS_BACT_SYNTAX
   printFormat:table3 tableFormat:left
   fields:{ $Field:[$DF_CABRI_Strain_number code:strain_no index:id
                    indexToken:strain_no tableToken:'t_fields|strain_no']  
            $Field:[$DF_CABRI_Other_collection_numbers code:other_nos index:str
                    indexToken:'other_nos' tableToken:'t_fields|other_nos']
    }
   ]