| 1 | # main topics: |
|---|
| 2 | UP sp_search.hlp |
|---|
| 3 | UP gene_search.hlp |
|---|
| 4 | UP security.hlp |
|---|
| 5 | |
|---|
| 6 | # sub topics: |
|---|
| 7 | SUB tags.hlp |
|---|
| 8 | |
|---|
| 9 | # format described in ../help.readme |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | TITLE Modify fields of listed |
|---|
| 13 | |
|---|
| 14 | OCCURRENCE ARB_NT/Species/Search and Query/More Functions/Modify fields of listed |
|---|
| 15 | ARB_NT/Genome/Search and query/More Functions/Modify fields of listed |
|---|
| 16 | ARB_NT/Genome/Experiment/Search and query/More Functions/Modify fields of listed |
|---|
| 17 | |
|---|
| 18 | DESCRIPTION Finds and replaces substrings within fields/tagged subfields of |
|---|
| 19 | all listed species/genes. The entries within the selected |
|---|
| 20 | fields of all listed species/genes can be modified either |
|---|
| 21 | individually or globally. |
|---|
| 22 | |
|---|
| 23 | SECTION Target field |
|---|
| 24 | |
|---|
| 25 | Select the target field to modify by pressing the button in the upper part of the window. |
|---|
| 26 | |
|---|
| 27 | Target field related options: |
|---|
| 28 | * 'Accept conversion errors': |
|---|
| 29 | - if checked, accepts modifications like writing "hello" to a |
|---|
| 30 | numeric field (which will be written as '0') |
|---|
| 31 | - otherwise arb will abort with an error in such cases (Note |
|---|
| 32 | that writing a string like "4711" to numeric fields will work w/o error) |
|---|
| 33 | * 'Allow overwrite of species ID': |
|---|
| 34 | - normally writing to field 'name' is not permitted, because doing so is |
|---|
| 35 | dangerous and may destroy access to your data. |
|---|
| 36 | - if checked, arb will write the name field. Please make sure the written |
|---|
| 37 | values are unique. If the same value is used for e.g. two species, you |
|---|
| 38 | will loose access to one these species. |
|---|
| 39 | |
|---|
| 40 | SECTION Expert options |
|---|
| 41 | |
|---|
| 42 | * 'Use Tags' allows to tag entries or modify only tagged parts of entries. See LINK{tags.hlp} for details. |
|---|
| 43 | * 'Double Pars' causes the result of the 'Command' to be interpreted and executed as command once again (special; in doubt don't use) |
|---|
| 44 | |
|---|
| 45 | SECTION Command |
|---|
| 46 | |
|---|
| 47 | Three different languages can be used to modify an entry: |
|---|
| 48 | |
|---|
| 49 | SRT: indicated by a leading ':' character |
|---|
| 50 | ACI: indicated by a leading '|' character |
|---|
| 51 | REG: indicated by sourrounding '/' characters |
|---|
| 52 | |
|---|
| 53 | Details: |
|---|
| 54 | |
|---|
| 55 | REG: Simple Regular Expressions (not for beginners) |
|---|
| 56 | |
|---|
| 57 | '/Search RegExpr/Replace String/' or |
|---|
| 58 | '/Search RegExpr/' |
|---|
| 59 | |
|---|
| 60 | (see LINK{reg.hlp} for more details) |
|---|
| 61 | |
|---|
| 62 | SRT: Replaces substrings |
|---|
| 63 | |
|---|
| 64 | Syntax: ':old_string=new_string' (see LINK{srt.hlp} for more details) |
|---|
| 65 | |
|---|
| 66 | Example: remove all spaces with SRT ': =' |
|---|
| 67 | |
|---|
| 68 | Different search/replace commands can be performed |
|---|
| 69 | simultaneously and have to be separated by ':' |
|---|
| 70 | |
|---|
| 71 | ':search1=replace1:search2=replace2: ... :searchn=replacen'. |
|---|
| 72 | |
|---|
| 73 | '*' and '?' are wild cards for multiple and single |
|---|
| 74 | characters, respectively. |
|---|
| 75 | |
|---|
| 76 | ACI: More sophisticated string manipulations |
|---|
| 77 | |
|---|
| 78 | Read LINK{aci.hlp} for more information. |
|---|
| 79 | |
|---|
| 80 | SECTION Predefined commands |
|---|
| 81 | |
|---|
| 82 | Clicking on one of the predefined commands in the list at the bottom |
|---|
| 83 | of the window |
|---|
| 84 | * will set the content of the 'Command' field and |
|---|
| 85 | * may change the selected target field (!!!) |
|---|
| 86 | |
|---|
| 87 | SECTION Defining custom commands |
|---|
| 88 | |
|---|
| 89 | You may add new commands by editing one of the files: |
|---|
| 90 | |
|---|
| 91 | $ARBHOME/lib/sellists/mod_fields.sellst |
|---|
| 92 | |
|---|
| 93 | $ARBHOME/lib/sellists/mod_gene_fields.sellst |
|---|
| 94 | |
|---|
| 95 | You should save this file to another location when |
|---|
| 96 | installing new versions of ARB or it will be overwritten. |
|---|
| 97 | |
|---|
| 98 | A better way is to create your own list(s). All list |
|---|
| 99 | matching 'mod_fields*.sellst' will be loaded, where |
|---|
| 100 | 'mod_fields.sellst' is loaded. |
|---|
| 101 | |
|---|
| 102 | If you have created any scripts which might be useful for |
|---|
| 103 | other ARB users send them to LINK{devel@arb-home.de}. |
|---|
| 104 | |
|---|
| 105 | EXAMPLES ':p?r=p?1w' replaces par to paw |
|---|
| 106 | pbr to pbw |
|---|
| 107 | pcr to pcw ... |
|---|
| 108 | |
|---|
| 109 | ':p??r=p?2?1r' swaps the two letters between p and r |
|---|
| 110 | |
|---|
| 111 | ':a*=b*1' replaces only the first 'a' by 'b' |
|---|
| 112 | |
|---|
| 113 | ':?* *=?1. *2' Replaces the first word by its first |
|---|
| 114 | letter + '.' |
|---|
| 115 | |
|---|
| 116 | ':\:=\n' replaces all ':' by <newline> |
|---|
| 117 | |
|---|
| 118 | ':*=*1 *(key1)' appends the database field <key1> |
|---|
| 119 | |
|---|
| 120 | ':*=*1 *(key1|nothing found)' |
|---|
| 121 | appends the database field <key1> |
|---|
| 122 | if <key1> does not contain entries |
|---|
| 123 | append 'nothing found' |
|---|
| 124 | |
|---|
| 125 | 1. Global modification: Replace 'spec.' by 'sp.' within |
|---|
| 126 | the field full_name of all listed species: |
|---|
| 127 | |
|---|
| 128 | Press: 'MODIFY FIELDS OF LISTED SPECIES' |
|---|
| 129 | Select Field: 'full_name' |
|---|
| 130 | Type Command: ':spec.=sp.' |
|---|
| 131 | Press: 'GO' |
|---|
| 132 | |
|---|
| 133 | 2. Individual modification: Append the particular entries |
|---|
| 134 | of fields 'title' and 'journal' to that of the |
|---|
| 135 | fields 'author' of all listed species if there |
|---|
| 136 | are any entries: |
|---|
| 137 | |
|---|
| 138 | Press: 'MODIFY FIELDS OF LISTED SPECIES' |
|---|
| 139 | Select Field: 'author' |
|---|
| 140 | Type Command: ':*=*1 *(title) *(journal)' |
|---|
| 141 | Press: 'GO' |
|---|
| 142 | |
|---|
| 143 | NOTE Undo does work. |
|---|
| 144 | |
|---|
| 145 | WARNINGS Be careful if search or replace string contains |
|---|
| 146 | special characters (such as ':'). |
|---|
| 147 | |
|---|
| 148 | BUGS No bugs known |
|---|