Skip to content

Feature/differential expression experiments#87

Merged
Genarito merged 54 commits intov5.0.0from
feature/differential-expression-experiments
Jan 22, 2026
Merged

Feature/differential expression experiments#87
Genarito merged 54 commits intov5.0.0from
feature/differential-expression-experiments

Conversation

@juanNH
Copy link
Contributor

@juanNH juanNH commented Jan 5, 2026

Add Differential expression feature.
Add modules of R
Add library for volcano plot
New page Differential expression
New folders in Django for differential_expression

juanNH and others added 30 commits August 1, 2025 13:24
Introduces the DifferentialExpressionExperiment model, serializer, and API endpoints for listing and submitting experiments. Adds initial migration, model definition, serializer, and views for experiment management. Integrates the new app's URLs into the main project routing.
Introduces new service and task modules for differential expression, adds related Django migrations, and updates models, views, and URLs to support new experiment features. Also adds a regression example notebook and updates feature selection tasks.
Introduces a results_json JSONField to DifferentialExpressionExperiment for efficient storage of full differential expression results. Adds model methods for saving, retrieving, and filtering results, updates the serializer to expose results metadata, and modifies the service and task logic to save and handle results as JSON. Also updates .gitignore and improves mRNA data processing in the service.
Major refactor of differential expression models to use dedicated Source and ClinicalSource models, and store experiment results in a normalized table instead of JSON. Updated admin, serializers, views, and service logic to support new data model and endpoints for results and significant genes. Removed obsolete migrations and added new migration for timestamp fields. Improved mRNA/clinical data processing and result handling.
Introduces a 'top' field to DifferentialExpressionExperiment to control the number of significant results returned (max 1000). Updates model, admin, serializer, view, and service logic to support this parameter, adds validation, and improves error handling for cases with no samples or features. Also updates frontend template metadata and page title.
Dockerfile and Dockerfile-celery now install R 4.4.2 and Bioconductor limma for differential expression analysis. Updated README to list R as a requirement and document the new Celery worker queue. docker-compose_dist.yml adds a differential-expression-worker service and includes it in the backend dependencies.
Introduces DifferentialExpressionStop API view and URL to allow authenticated users to stop a running differential expression experiment. Includes permission checks, state validation, and integration with abortable Celery tasks.
+ Lot of formatting and refactoring
Introduces DifferentialExpressionExperimentListSerializer to provide a lightweight representation for listing experiments, exposing only selected fields. Updates the DifferentialExpressionList view to use this new serializer for improved efficiency and clarity in API responses.
Introduces a websocket command and backend logic to notify the frontend when DifferentialExpressionExperiment instances are created, updated, or deleted. Refactors serializers to use shared ExperimentSource serializers for compatibility and updates the frontend to listen for the new websocket event key.
Removed the DifferentialExpressionSignificantGenes endpoint and integrated its filtering logic into the DifferentialExpressionResults view. The results endpoint now supports filtering by p-value and fold-change thresholds via query parameters, simplifying the API and reducing redundancy.
Introduces a 'tool' field to DifferentialExpressionExperiment for specifying the analysis tool (DESEQ or LIMMA). Updates admin, model, serializer, and adds migration to support this new field. Removes significant genes count from admin display.
Added comprehensive test coverage for differential expression experiment models, utilities, and views. Introduced API endpoints for updating and deleting experiments, including permission and state checks. Updated URL patterns to include new endpoints and added test data files for mRNA and clinical data.
Genarito and others added 6 commits November 10, 2025 10:10
Added logic to normalize mRNA dataset column names by extracting their base names, ensuring they match the normalized SAMPLE_IDs from clinical metadata. This improves consistency and accuracy when filtering and renaming columns for downstream analysis.
Introduces a new API endpoint to retrieve all differential expression results formatted for volcano plot visualization, and another endpoint to download all experiment results as a TSV file. Updates URL patterns to include these endpoints and implements permission checks to ensure only authorized users can access the data.
Introduced DifferentialExpressionVolcanoPlotSerializer for minimal volcano plot data. Refactored DifferentialExpressionVolcanoData view to use ListAPIView, leverage the new serializer, and remove manual response formatting and permission handling.
Add results table of experiment.
Add Volcano plot and csv donwload
pThreshold?: number; // umbral of p-value
}

const VolcanoPlot: React.FC<VolcanoPlotProps> = ({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sacar este tipo de tipado y usar el que usamos en el otro 99.9% de los componentes: const VolcanoPlot = (props: VolcanoPlotProps) => {


/**
* Django Model api_service.ExperimentSource
* Django Model api_service.ExperimentSource todo agregar opcional update_differential_expression_experiments
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. No se entiende qué es lo que se tiene que hacer con update_differential_expression_experiments, es un campo? Suena a método
  2. Si se quiere dejar un TODO, poner en inglés y como TODO: ... que todos los IDEs te los muestran resaltado con colores. Si no sigue aplicando esto de update_differential_expression_experiments, eliminar

TheSinnerAR and others added 8 commits January 8, 2026 20:47
Dockerfile and Dockerfile-celery comments were translated from Spanish to English for clarity. In views.py, replaced direct model get with get_object_or_404 for better error handling when retrieving CGDSStudy. Minor cleanup in admin.py by removing a redundant comment.
Removed DifferentialExpressionSource and DifferentialExpressionClinicalSource models in favor of using ExperimentSource and ExperimentClinicalSource from api_service. Updated related admin, views, tests, and model references. Added migrations to remove old models and update foreign keys. Improved download endpoint to support p-value filtering and filename suffix. Frontend SourcePopup now handles missing sources gracefully.
* Differential Expression Panel component
* @returns JSX.Element
*/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hdp.... Sacar líneas blancas entre los componentes, si no no toma la documentación

juanNH and others added 6 commits January 20, 2026 11:39
Updated test CSV files to use realistic TCGA sample IDs and clinical attributes. Refactored test cases and utility functions to match new data format and attribute names. Changed API endpoint patterns for delete and update actions to '/delete/{pk}/' and '/update/{pk}/', and updated tests accordingly. Adjusted permission handling in tests to expect 403 Forbidden for unauthenticated requests. Added a new DifferentialExpressionRetrieve view for retrieving experiments with proper permission checks. Cleaned up and improved code style in models and serializers.
Introduces integration tests for the differential expression analysis pipeline, including Celery task execution and result validation. Updates clinical and mRNA test CSV files to include 6 samples and expanded attributes, and adjusts related unit tests to match new test data structure. Fixes a typo in a test method name and sets the default clinical attribute to 'SEX' in test utilities.
Deleted the unused utils.py file. In views.py, removed redundant experiment_id type validation and updated comments to English for clarity.
Genarito
Genarito previously approved these changes Jan 22, 2026
Refactor DifferentialExpressionExperiment and related classes to improve code structure and maintainability.
Added JSDoc comment to the DifferentialExpressionInputClinicalAttribute component.
Added prop types and documentation for the Volcano plot component.
@Genarito Genarito merged commit cb24472 into v5.0.0 Jan 22, 2026
1 check passed
@Genarito Genarito deleted the feature/differential-expression-experiments branch January 22, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants