- Introduction
- Features
- Software Design and Structure
- Fasta File Parsing
- Sequence Exons Highlighting
- Individual Gene Selection
- Exon Visualization
- User Manual
- Keynotes
- References
Genomics Viewer is a software tool for understanding DNA sequence information. It visualizes exon positions and provides basic statistics such as the average number of genes, longest and shortest gene models, and gene sequence lengths from FASTA files.
- GTF and FASTA file loading: The GTF file is displayed in a table with relevant attributes. The FASTA file is loaded into a text pane and supports large files.
- Basic statistics calculation: Extracts statistics from GTF and FASTA files.
- Gene Exploration: Allows visualization of individual genes, highlighting exon positions.
- Download of Highlighted Gene: Users can download highlighted gene sequences as HTML files.
Genomics Viewer is built using Java Swing. It consists of a combination of panels and a single frame.
- The GTF file is uploaded via JFileChooser.
- Validation is performed on file extension.
- Data is processed using OpenCSV.
- Extracted attributes: Chromosome, Source, Feature, Start, End, Frame, Attributes.
- If an error occurs during parsing, the table remains empty and an error message is displayed.
- The
parseGtfFile
function creates a two-dimensional list of extracted columns. - Column headers are manually set.
- Data is passed to the Java Swing TableModel.
- The table is appended to the TableViewer panel.
- The
TableViewer
panel provides a getter method (getTablePane
) to allow updates.
Statistics extracted from the GTF file include:
- Average Exons Per Gene
- Longest Gene
- Shortest Gene
- Average Gene Length
- Basic Statistics Flow Chart: Outlines how statistics are extracted.
- GTF Parsing Flow Chart: Shows how the file is processed upon upload.
- The FASTA file is uploaded via JFileChooser.
- Validation is performed on file extension.
- The file is processed using BufferedReader and StringBuilder.
- Basic statistics are calculated during file reading to avoid reprocessing.
- Parsing large FASTA files blocks the UI. To prevent this:
- Processing is moved to a new thread using SwingWorker.
- A Loader UI is displayed during processing.
- Exons are mapped using gene names as index keys.
- Mappings are created from the GTF file.
- Drawback: Not all FASTA files have standard gene headers.
- Errors are displayed for:
- Incorrect file formats (non-
.fa
extension). - Corrupt FASTA files.
- Incorrect file formats (non-
- GC Content Percentage
- Sequence Length Calculation
- Flow Chart: Shows how the highlight process is triggered.
highlightExons
method handles the highlighting logic.highlightSequence
method processes individual genes.- Exons are highlighted in red and displayed in the text pane.
- Available in the Explore Genes tab.
- Allows selection of specific genes.
- Automatically visualizes the selected gene.
- Genes are visualized using a rectangular representation.
- Blue stripes denote exon positions.
- Implemented by overriding the paintComponent method of
JPanel
.
To run the Genomics Viewer:
java -version
- If Java is not installed, download it from Oracle Java.
- Locate
GenomicsViewer.jar
, right-click, and open with Java Runtime Environment.
java -version
- If Java is not installed, download it from Oracle Java.
- Double-click
GenomicsViewer.jar
to run.
sudo apt install openjdk-17-jre
cd /path/to/file
java -jar GenomicsViewer.jar
- Click Upload .gtf File button.
- Click Upload .fa File button.
- The FASTA header format must be:
>GeneName|chr:start-end
- Provides tools for uploading and exploring GTF and FASTA files.
- Once uploaded, the GTF file data loads into a table.
- Automatically calculated after successful file uploads:
- Average exons per gene
- Longest/Shortest gene
- Average gene length
- GC content percentage
- Select a gene from the dropdown menu.
- Click Highlight Sequence to view it annotated.
- Click Download Sequence to save the sequence as an HTML file.
- The FASTA file header must follow the required format.
- The GTF file must be valid and contain necessary columns.
- Use Highlight Exons for better visualization.
- Basic statistics require both files to be uploaded.
- OpenCSV. (n.d.). CSVReader (OpenCSV 4.0). Documentation
- Oracle. (n.d.). Creating a GUI with Swing. Oracle Docs