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