The below video gives a general introduction to pre-processing in Biologics. The first few videos in our Getting Started series may also be helpful, linked here.
Jump to:
Using Batch Rename
The Batch Rename operation replaces any field with combinations of other fields, new text, and can also perform regular expressions to achieve complex renaming operations.
Existing fields can be replaced with a combination of values from other fields, and fixed text can be added to the beginning or end of existing fields. The advanced options enable the use of regular expressions to replace the entire field or a specific part of one field with another property or text string.
To batch rename multiple documents, select the documents to be renamed and click Batch Rename in the Pre-processing dropdown.
In the Aspect to rename dropdown, Select Fields of Document to rename selected document(s) or Sequences in Sequence List to rename sequences in a sequence list.
To add characters to the document name, select Add, input the characters to be added and select start or end depending on where you would like the characters to be appended.
To remove characters from the document name, select Remove, input the number of character(s) to be removed and select start or end depending on where you would like the characters to be removed.
Note that the document type extension and delimiters will be taken into account for the document name character(s) removal operation.
Advanced Options
- Replace entire field - Replaces the entire contents of the selected field with the new specified content.
- Replace parts matching - Each part of the name which matches the specified text will be replaced with the specified text specified.
- Regex - This uses the Java regular expression engine.
- With - This specifies what the matching text will be replaced with. It accepts a custom notation for specifying a combination of fixed text and values from other fields. Curly braces '{' and '}' are used to mark commands which insert particular text on a per-document basis. Any text outside curly braces is inserted as-is. The only exceptions are when you want an actual curly brace or a back-slash which must have a backslash in front of them (eg. '\{' gives '{', '\}' gives '}' and '\\' gives '\'.
These are some commands that could be used with this Advanced option:
- {$field} - inserts the contents of another field (eg. {$organism} for the Organism field). The field name is case sensitive and is usually different from what is shown in Geneious, click the 'Add Property' button for the list of names.
- {$field[2]} - inserts the second character from the given field (replace 2 with desired position).
- {$field[3:6]} - inserts characters 3 to 6 from the given field (replace 3 and 6 with desired range). Text can be taken from the field which is being replaced. Eg. name can be replaced with a sub-section of the name, essentially removing parts of it.
- {$field[length-1:length]} - "length" is a special keyword which is replaced with the length of the given field. This example will insert the last 2 characters from the given field.
- {@qualifier} - inserts the value from a qualifier on the "source" annotation of a sequence. Accepts positions and ranges also. The name of the qualifier is the same as the name shown in the Sequence View. Eg. {@db_xref}
- {count[2]} - inserts a counter which is increased once for each document. The 2 specifies how long the text should be, padded out with zeros. Eg. 2 will give 01, 02, 03 etc.
- {dup[1]} - same as count command but is inserted only for documents which will have the same value, whereas count is always inserted.
- {match} - inserts the text which is being replaced. Ie. the text which matched your regular expression.
- {match[1]} - inserts part of the matched regex, where the part was surrounded by brackets. The 1 specifies which of the parts (if several are surrounded by brackets). Eg. if the regex is "(ab)cd(ef)" then {match[2]} will give you the part that matches "ef".
- {anno:annoType:qualName:} - inserts the value of the qualifier with the name "qualName" from an annotation of type "annoType". Non-truncated annotations will be preferred over truncated ones, but if there are multiple annotations of the same type and with the same qualifier, the operation will fail.
- {anno:annoType:qualName:[3:6]} - like above but only inserts characters 3 to 6 from the qualifier value.