NCScorer is a tool developed to standardize and automate the assessment of candidate variants in Exome Sequencing (ES) for patients with Chronic Kidney Disease of unknown etiology (CKDu). The tool leverages a scoring system called the Nephro Candidate Score (NCS) to prioritize candidate variants for further investigation, accelerating the discovery of new genetic associations in CKD.
This application is part of a broader research initiative that aims to apply the NCS to large CKD cohorts, such as the GCKD, to identify novel CKD-related genes and understand the genetic underpinnings of this complex disease.
The application has been migrated from Vue CLI to Vite for improved development experience and build performance. This migration brings faster hot module replacement, better dependency optimization, and improved ESM support.
A comprehensive logging system has been added to the application for improved debugging and monitoring. The logging system includes:
- Centralized log management with different log levels (DEBUG, INFO, WARN, ERROR)
- Interactive log viewer with filtering capabilities
- Log export functionality
- Custom log level configuration
To set up the NCScorer for development or deployment, follow these steps:
-
Ensure that you have Node.js and npm installed on your machine.
-
Clone the repository:
git clone https://github.com/halbritter-lab/nc-scorer.git cd nc-scorer
-
Install the dependencies:
npm install
-
To run the application locally:
npm run dev
To expose the application on your network (for accessing from other devices):
npm run dev -- --host
-
To build the application for production:
npm run build
-
To preview the production build locally:
npm run preview
NC-Scorer includes a centralized logging system to capture application events and errors, providing valuable debugging information during development and usage.
- Viewing Logs: Click the log icon in the footer to open the log viewer
- Filtering Logs: Use the filter dropdown to view specific log levels (DEBUG, INFO, WARN, ERROR)
- Searching Logs: Use the search box to find specific log entries
- Exporting Logs: Click the download button to export logs as a JSON file
- Clearing Logs: Click the delete button to clear the current log entries
The logging system can be accessed programmatically:
import { logService } from '@/services/logService';
// Log at different levels
logService.debug('Debug message', { additionalData: 'example' });
logService.info('Info message');
logService.warn('Warning message');
logService.error('Error message', errorObj);
// Configure log level
logService.setLevel(LogLevel.DEBUG); // Show all logs
logService.setLevel(LogLevel.INFO); // Only show INFO and above
// Control console output
logService.setConsoleEcho(true); // Show logs in browser console
For more details, see the Developer Wiki and FAQ.
After starting the application, navigate to http://localhost:5173
(or the URL shown in your terminal) in your web browser to begin using NCScorer. The interface allows users to search and score genetic variants based on predefined criteria.
NC-Scorer includes a batch processing feature to analyze multiple variants at once:
- Click the "Batch" item in the main navigation menu
- Enter variants in the text area (one variant per line), or click "Fill with Examples" to populate with sample variants
- Select your desired output format (CSV, TSV, JSON, or VCF)
- Click "Process & Download" to analyze all variants and download the results
Batch processing supports up to 200 variants at once and provides results in your chosen format for easy integration with other tools or spreadsheet applications.
Contributions to NCScorer are welcome! Please read our Contributing Guidelines for more information on how to report bugs, make feature requests, and submit pull requests.
This project uses ESLint and Prettier to enforce consistent code style and quality standards. The configuration is tailored for Vue 3 development using the Composition API.
-
Run linting check with automatic fixes:
npm run lint
-
Alternative command for targeted linting and fixing:
npm run lint:fix
- Vue Components: Use Vue 3 Composition API (
setup()
function or<script setup>
) for new components - JavaScript: Follow ES6+ standards and practices
- Formatting Rules:
- Single quotes for strings
- Semicolons at the end of statements
- 2 spaces for indentation
- Maximum line length of 100 characters
- Trailing commas in multi-line objects and arrays
components/
: Reusable Vue componentsviews/
: Page-level Vue componentscomposables/
: Shared stateful logic (Vue 3 composition functions)api/
: API service functions for data fetchingutils/
: Utility functions and helpersconfig/
: Application configuration and constantsrouter/
: Vue Router configuration
NC-Scorer uses automated semantic versioning to streamline the release process:
The project follows the Conventional Commits specification for commit messages:
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Common types:
feat
: A new feature (triggers a minor version increment)fix
: A bug fix (triggers a patch version increment)docs
: Documentation changes onlystyle
: Changes that don't affect code functionality (formatting, etc.)refactor
: Code changes that neither fix bugs nor add featuresperf
: Performance improvementstest
: Adding or correcting testsbuild
: Changes to build system or dependenciesci
: Changes to CI configurationchore
: Other changes that don't modify src or test files
Breaking changes are indicated by !
after the type/scope or by BREAKING CHANGE:
in the footer, which triggers a major version increment.
To create properly formatted commits, run:
npm run commit
This will launch an interactive prompt to guide you through creating a compliant commit message.
The project uses semantic-release to automate:
- Version determination based on commit types
- Changelog generation in the CHANGELOG.md file
- Git tag creation
- GitHub release creation
This process occurs automatically when changes are pushed to the main branch, ensuring consistent versioning according to Semantic Versioning principles.
The application includes a robust retry mechanism for API requests, which uses:
- Exponential backoff strategy
- Configurable retry conditions
- Visual feedback for retry attempts
When working with API calls, use the retryWithBackoff
utility from src/utils/retry.js
and consider implementing the retry state tracking provided by useRetryState
composable.
To ensure a welcoming and supportive environment for all contributors, please review and adhere to our Code of Conduct.
The application includes several tools to optimize performance and monitor resource usage:
The optimize-images.js
script automatically optimizes images for web usage:
node scripts/optimize-images.js
What it does:
- Compresses PNG images with optimal settings
- Creates WebP versions for modern browsers
- Generates detailed size reduction metrics
- Use this script when adding or updating images to the project
The analyze-bundle.js
script provides insights into bundle composition and size:
node scripts/analyze-bundle.js
What it does:
- Runs a production build
- Creates a visual representation of your bundle (opens in browser)
- Shows detailed breakdown of JavaScript and CSS sizes
- Use this before releases or when adding new dependencies
The application implements several performance optimizations:
- Code Splitting: Route-level lazy loading
- Resource Hints: Preconnect and DNS prefetch for external APIs
- Font Optimization: Uses
font-display: swap
to prevent FOIT - Caching Strategy: Content hashes for optimal browser caching
NCScorer is made available under the MIT License. See the LICENSE file for more information.
This repository's GitHub Wiki is automatically generated from the Markdown files located in the /docs/wiki
directory.
To update the wiki:
- Edit the relevant
.md
files within the/docs/wiki
directory in themain
branch. - Commit and push your changes to the
main
branch. - The
Publish Wiki
GitHub Action workflow (.github/workflows/publish-wiki.yml
) will automatically run and synchronize the changes to the live GitHub Wiki.