-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/differential expression experiments #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v5.0.0
Are you sure you want to change the base?
Conversation
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
…/github.com/omics-datascience/multiomix into feature/differential-expression-experiments
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.
+ Refactoring
…DifferentialExpression experiment
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
| const [fcThreshold, setFcThreshold] = useState<number>(1) | ||
| const [pThreshold, setPThreshold] = useState<number>(0.05) | ||
|
|
||
| const getVolcanoPlotData = (signal: AbortSignal) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poner el contenido de esta función dentro del useEffect, porque esto al no estar dentro de un useCallback va a terminar generando warnings del Linter o, aún peor, loops infinitos ya que la referencia cambia en cada render
| } | ||
| } | ||
|
|
||
| export const DiferentialExpressionPanel = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Es un panel grande, agregar documentación a este componente
| pThreshold?: number; // umbral of p-value | ||
| } | ||
|
|
||
| const VolcanoPlot: React.FC<VolcanoPlotProps> = ({ |
There was a problem hiding this comment.
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) => {
| is_public: boolean; | ||
| } | ||
|
|
||
| export interface DiffExpExperimentDetail { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agregar documentación a esta y a todos los nuevos tipos que se introdujeron. En 1 semana no sabemos para qué era cada cosa
|
|
||
| /** | ||
| * Django Model api_service.ExperimentSource | ||
| * Django Model api_service.ExperimentSource todo agregar opcional update_differential_expression_experiments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- No se entiende qué es lo que se tiene que hacer con
update_differential_expression_experiments, es un campo? Suena a método - 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 deupdate_differential_expression_experiments, eliminar
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.
…/github.com/omics-datascience/multiomix into feature/differential-expression-experiments
…/github.com/omics-datascience/multiomix into feature/differential-expression-experiments
Add Differential expression feature.
Add modules of R
Add library for volcano plot
New page Differential expression
New folders in Django for differential_expression