Google
More docs on the ARB website.
See also index of helppages.
Last update on 04. Dec 2013 .
Main topics:
Related topics:

MODIFY FIELDS OF LISTED SPECIES/GENES

OCCURRENCE

ARB_NT/Species/Search/More Functions/Modify fields of listed ARB_NT/Genes/Search/More Functions/Modify fields of listed ARB_NT/Tree/NDS

 

DESCRIPTION

Finds and replaces substrings within fields/tagged subfields of all listed species/genes. The entries within the selected fields of all listed species/genes can be modified either individually or globally.

Three different languages can be used to modify an entry:

SRT:    indicated by a leading ':' character
ACI:    indicated by a leading '|' character
REG:    indicated by sourrounding '/' characters

Details:

  • REG: Simple Regular Expressions (not for beginners)

    '/Search RegExpr/Replace String/'  or
    '/Search RegExpr/'
    (see ´Regular Expressions (REG)´ for more details)
                

  • SRT: Replaces substrings
    • Syntax: ':old_string=new_string' (see ´Search and Replace Tool (SRT)´ for more details)
    • Example: remove all spaces with SRT ': ='
    • Different search/replace commands can be performed simultaneously and have to be separated by ':'

      ':search1=replace1:search2=replace2:  ...  :searchn=replacen'.

    • * and ? are wild cards for multiple and single characters, respectively.

  • ACI: More sophisticated string manipulations

    Read ´ARB Command Interpreter (ACI)´ for more information.


 

NOTES

You may add new commands by editing one of the files:

  • $ARBHOME/lib/sellists/mod_fields.sellst
  • $ARBHOME/lib/sellists/mod_gene_fields.sellst

You should save this file to another location when installing new versions of ARB or it will be overwritten.

A better way is to create your own list(s). All list matching 'mod_fields*.sellst' will be loaded, where 'mod_fields.sellst' is loaded.

If you have created any scripts which might be useful for other ARB users send them to arb@arb-home.de.

 

EXAMPLES

':p?r=p?1w'     replaces        par to paw
                                pbr to pbw
                                pcr to pcw ...
':p??r=p?2?1r'  swaps the two letters between p and r

':a*=b*1'               replaces only the first 'a' by 'b'
':?* *=?1. *2'  Replaces the first word by its first
                letter + '.'
':\:=\n'        replaces all ':' by <newline>
':*=*1 *(key1)' appends the database field <key1>
':*=*1 *(key1|nothing found)'
                appends the database field <key1>
                if <key1> does not contain entries
                append 'nothing  found'
  1. Global modification: Replace 'spec.' by 'sp.' within the field full_name of all listed species:
    • Press:          'MODIFY FIELDS OF LISTED SPECIES'
    • Select Field:   'full_name'
      Type Command:   ':spec.=sp.'
      Press:          'GO'

  2. Individual modification: Append the particular entries of fields 'title' and 'journal' to that of the fields 'author' of all listed species if there are any entries:
    • Press:          'MODIFY FIELDS OF LISTED SPECIES'
    • Select Field:   'author'
      Type Command:   ':*=*1 *(title) *(journal)'
      Press:          'GO'


 

NOTES

Undo does work.

 

WARNINGS

Be careful if search  or replace string contain
special characters (such as ':').

 

BUGS

No bugs known