Working in detail with certain region is a typical issue. Extracting regions could be performed using samtools view (http://samtools.sourceforge.net/samtools.shtml).
However, it would be useful to perform such action from GUI as well.
The following idea is recommended: select region, then call a special dialog with path to novel a small subsample OR open dialog and enter region to extract. Additionally an option to open subsample by default in Assembly Browser after it is created should be available.
The feature must be implemented as follows:
- The "Export Assembly Region" dialog appears when:
- The toolbar button is clicked.
- The "Actions > Export assembly region" item in the main menu is selected .The item must be placed under the "Export assembly to SAM format" item.
- The "Export > Assembly region" item in the context menu is selected. The context menu should be restructured as written below.
- In the dialog the following parameters are available:
- "Save to file" with the file path and the browse button.
- "File format" with values "SAM", "BAM" and "UGENE Database". The "UGENE Database" value is selected by default. By default the result file should be placed in the same folder where the source assembly is placed.
- A default filename should include the assembly name and region coordinates. E.g. "chrM_1235_5400.ugenedb".
- "Region" with locations "from" and "to".
- The "Add to project" check box.
- The behavior should be the following:
- If a read intersects the region, then this read will be exported.
- Reads are not truncated.
- If the output format is not "UGENE Database" and the "Add to project" option was not checked, then the result assembly should be created without additional files. If the "Add to project" option was checked, then an additional file in "UGENE Database" format should be saved in the same folder and this file should be added to the project.
The "Export" submenu in the "Reads Area" context menu must be reordered as follows:
- The separator line
- Current read
- Visible reads as sequences
- Assembly region
i.e. the "Visible reads" must be renamed to "Visible reads as sequences".