Miscellaneous actions that can be performed from within the SeqNinja shell include:

Objective Expression Examples Comments
Separate sequences into multiple files split(sequence expression, argument=value) split(foo.fasta, to='*.fasta')

split(foo.fasta, to='foo_*.fasta')

split(foo.fasta, to='C:/data/foo_*.fasta')

split(foo.fasta, to='*.fasta', limit=2000)
This action separates each sequence into its own file. The asterisk in the filename is replaced by the sequence name.

Allowable arguments:

to – (required) Specifies a filename pattern for the destination file paths. It must be a single-quoted string with an asterisk in the filename. The pattern may have a relative or absolute path. Prefixes and/or suffixes can be included in the filename.

limit – (optional) Limits the number of sequence files that can be generated. Otherwise, accidental specification of a file containing millions of reads could stress some operating systems. The default limit is 1000 sequence files. Note that if !conversion=full is specified, each sequence file may be accompanied by auxiliary files.
Exit an interactive session of SeqNinja exit

quit
exit

quit
Display information in the terminal or command shell print(arguments) print('Sequence=',$myseq, 'length=', %len) Accepts an arbitrary number of arguments, each of which is printed to the standard output stream. An extra space is included between the output of each argument automatically, with the exception of single-quoted string literals.

See Escape Codes for information on how to use character escape codes together with print.
Add a timestamp timestamp(optional arguments) timestamp('Sequence=',$myseq, 'length=',%len)

timestamp
Same as print, but also adds a timestamp. Note that timestamp can also be invoked without any arguments, in which case it simply returns the current time.
Learn how to view help help help Opens the file README.txt, which notes that SeqNinja Command-Line help can be viewed from within the Navigator and the GUI version of SeqNinja.
Write data from sequences to the file specified in the to argument write( sequence expression, to=file, optional arguments ) write( "foo.fasta", to='out.fasta')

write( "foo.fasta", to='out.fasta', append='true' )

write( $S, to='out.vcf', template='in.vcf' )

write( "foo.gb", to='out.starff', sortFeaturesBy='type' )
This extends the functionality provided by the file assignment syntax. It adds the ability to write to feature files and control feature order.

Arguments:

  • to – [required] File into which to write the desired data. Must be a recognized file type.
  • append – True means the data should be appended to the file.
  • template – A file of the same type from which a template can be obtained. For VCF files, for example, this allows re-use of the file header and columns.
  • sortFeaturesBy – [optional] To control the order in which features are written to the destination sequence or features file. If not specified, features will be sorted into a default order. The default order sorts first by position, then by a default order of feature types. (The same default order is also affected by the file-assignment syntax.) The argument value is a comma-separated list of supported sort keys. Any of the sort keys may be preceded by a + or - to indicate ascending or descending order; the default is ascending.

    Values for sortFeaturesBy:

    • ‘’ – Two single-quote characters (denoting an empty string) are used to turn off sorting. This can increase speed when there are many features, and no final sort is required.
    • default – Explicitly specifies the default order.
    • position – Sorts by position.
    • type – Sorts alphabetically by type.
    • /qualifier – Sorts alphabetically by the values of the specified qualifier.
    • position,type – Sorts by position first, then alphabetically by feature type.
    • position,-type – Sorts by position first, then in descending alphabetical order by feature type.

Need more help with this?
Contact DNASTAR

Thanks for your feedback.