Skip to content
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

Implemented Time Series Analysis #526

Open
wants to merge 56 commits into
base: dev
Choose a base branch
from
Open

Conversation

RogerAK
Copy link
Collaborator

@RogerAK RogerAK commented Jul 10, 2024

Description

This pull request introduces a new feature for performing linear regression analysis on protein quantification data over time, incorporating metadata with day and time information. The analysis includes the visualization of both actual and predicted intensities over time for a selected protein group.
Key Features:

Data Preparation:

  • Merges input data with metadata to include day and time information.
  • Converts time into hours.
  • Handles missing values with linear interpolation.

Linear Regression Analysis:

  • Splits data into training and testing sets.
  • Trains a linear regression model on the training data.
  • Predicts intensities on both training and testing data.
  • Calculates performance metrics: RMSE and R² scores for both training and testing sets.

Visualization:

  • Plots actual and predicted intensities over time.
  • Differentiates between training and testing data in the plot.
  • Visualizes the intensity of the selected protein group, highlighting the difference between actual and predicted values.

Changes

  • Added time_series_linear_regression function to perform the analysis.
  • Added utility function convert_time_to_datetime to handle day and time conversion.
  • Integrated Plotly for interactive visualization of regression results.

@RogerAK RogerAK changed the title WIP: Implemented Protquantplot with retention time WIP: Implemented Timequantplot Jul 11, 2024
@RogerAK RogerAK changed the title WIP: Implemented Timequantplot WIP: Implemented Time Series Plot Jul 11, 2024
Copy link

github-actions bot commented Jul 11, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  protzilla
  run.py
  run_helper.py
  runner.py
  steps.py 315, 321, 325, 327, 331-334
  protzilla/data_analysis
  differential_expression_mann_whitney.py 263
  differential_expression_t_test.py
  protein_graphs.py
  ptm_analysis.py 115-116, 134-136
  time_series_plots.py 61, 79, 106, 115-117, 134, 185
  time_series_regression_analysis.py 80, 83, 88, 112, 148-149, 157, 175, 280, 295, 302-304, 320-321, 333-397, 422, 429, 452-454, 527-534, 562, 586, 645, 647-733, 744-745, 763-765, 800-809, 930-969, 1008-1123
  protzilla/data_integration
  di_plots.py
  protzilla/data_preprocessing
  outlier_detection.py
  peptide_filter.py 70-94, 103-113
  transformation.py
  protzilla/importing
  ms_data_import.py 122, 148-197, 203-213, 221, 243, 338-343, 374
  protzilla/methods
  data_analysis.py 36, 783-784, 786, 798, 800-804, 809-811, 831-832, 840-843, 859, 868-874, 904-905, 908-911, 926, 935-936, 939-942, 963, 972-973
  data_preprocessing.py
  protzilla/utilities
  transform_dfs.py 29, 54-58, 96-99
  ui/main
  settings.py
  ui/runs
  fields.py
  views.py 124-128
  views_helper.py
  ui/runs/forms
  custom_fields.py 138-139, 142-143, 150-153, 156-158
  data_analysis.py 157, 161-162, 1188-1231, 1247, 1271-1287, 1300, 1341-1362, 1387-1399, 1445-1462, 1546-1593
  importing.py 102
Project Total  

The report is truncated to 25 files out of 81. To see the full report, please visit the workflow summary page.

This report was generated by python-coverage-comment-action

@RogerAK RogerAK changed the title WIP: Implemented Time Series Plot Implemented Time Series Analysis - Linear Regression Jul 19, 2024
@RogerAK RogerAK changed the title Implemented Time Series Analysis - Linear Regression Implemented Time Series Analysis Aug 15, 2024
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