#Please insert up references in the next lines (line starts with keyword UP) UP sp_search.hlp UP gene_search.hlp UP security.hlp UP tags.hlp #Please insert subtopic references (line starts with keyword SUB) #SUB parser.hlp #SUB commands.hlp #SUB regexpr.hlp # Hypertext links in helptext can be added like this: LINK{ref.hlp|http://add|bla@domain} #************* Title of helpfile !! and start of real helpfile ******** TITLE 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 LINK{regexpr.hlp} for more details) SRT: Replaces substrings Syntax: ':old_string=new_string' (see LINK{parser.hlp} 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 LINK{commands.hlp} 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 LINK{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 ':*=*1 *(key1)' appends the database field ':*=*1 *(key1|nothing found)' appends the database field if 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' NOTE Undo does work. WARNINGS Be careful if search or replace string contain special characters (such as ':'). BUGS No bugs known