of
Creates a new BlastCLI instance of one of the following types from the given input JSON:
This method is intended to be used to construct a BLAST+ configuration instance from a JSON value where the type of the config is not known beforehand.
The BlastCLI.tool property may be used after deserialization to determine the type of the config and cast it correctly.
Example
// input == {
// "tool": "blastn",
// ...
//}
val config = Blast.of(input)
if (config.tool == BlastTool.BlastN)
val blastnConfig = config as BlastNContent copied to clipboard
Return
The parsed BlastCLI subtype.
Parameters
js
JSON object to parse.
Throws
If the input JSON object is missing the "tool" property, or if the value of that property is not a valid BLAST+ tool name.