In the DSH Web environment, file previews are rendered as plain text by default. For biological sequence files (such as FASTA and GenBank), this approach makes interactive analysis difficult. The dsh-file-explorer-preview-sequence plugin replaces the native text preview with an interactive view through its built-in SeqViz viewer, making it easier to inspect topologies, annotations, restriction sites, and related information.

Feature Overview

This plugin is maintained by wolfsonliu, built based on the seqviz and seqparse libraries, and supports multiple formats, including FASTA, GenBank, JBEI, SnapGene, and SBOL.

  • Interactive viewing: Provides four topology views: circular, linear, both, and both flipped.
  • Sequence operations: Supports color-coded feature annotations, search highlighting, restriction site display, complement/index switching, and linear scaling.
  • UI integration: The status bar displays the format badge, sequence name, type, and length; the toolbar and status bar support Chinese and English localization; the interface follows DSH’s data-ds-dark-theme changes.
  • Explicit selection: In dsh-file-explorer v0.9.0+, the plugin is registered as a named viewer and appears in the “Open with…” menu for file rows.

Installation and Dependencies

Before use, make sure the core component dsh-file-explorer (v0.1.0+) is installed.

dsh plugin --profile web add github:wolfsonliu/dsh-file-explorer-preview-sequence

After installation is complete, start the DSH Web service to activate the plugin.

Typical Usage

  • Standard preview: Select a .gb or .fasta file in the file explorer. The preview panel will directly render the interactive sequence viewer instead of the raw text.
  • Handling ambiguous file extensions: For files with easily confused extensions (such as .xml or .seq), explicitly select this plugin in the “Open with…” menu for the file row to render them.

Notes

  • Read-only mode: The current preview feature is read-only and does not support sequence editing.
  • Version requirements: SnapGene-format .dna files and files larger than 2 MiB require support from dsh-file-explorer v0.1.0+. Older versions will degrade handling for such files (for example, by displaying an unsupported status).
  • Fallback mechanism: Files with the extension .xml or .seq that do not conform to the SBOL or JBEI format will fall back to the plain text view.