Skip to content

Commit

Permalink
ran pre-commit hooks to fix inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
henninggaertner committed Nov 6, 2023
1 parent 252f8e4 commit 2d81f11
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pandas as pd
import statsmodels.api as sm
from django.contrib import messages
from scipy import stats

from .differential_expression_helper import apply_multiple_testing_correction

Expand Down
1 change: 0 additions & 1 deletion protzilla/data_analysis/dimension_reduction.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import numpy as np
import pandas as pd
from django.contrib import messages
from sklearn.manifold import TSNE
Expand Down
1 change: 0 additions & 1 deletion protzilla/data_analysis/model_evaluation_plots.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.metrics import PrecisionRecallDisplay, RocCurveDisplay

from protzilla.data_analysis.classification_helper import encode_labels
Expand Down
4 changes: 2 additions & 2 deletions protzilla/data_integration/database_download.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import json
import re
from datetime import date
from pathlib import Path

import requests
from requests.adapters import HTTPAdapter, Retry
from tqdm import tqdm
from datetime import date
import json

# cannot be imported form constants as package cannot be found
external_data_path = Path(__file__).parent.parent.parent / "user_data" / "external_data"
Expand Down
28 changes: 15 additions & 13 deletions protzilla/data_preprocessing/imputation.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,41 +221,43 @@ def by_min_per_dataset(
return intensity_df_copy, dict()


def by_knn_plot(df, result_df, current_out, graph_type, graph_type_quantites, group_by):
def by_knn_plot(
df, result_df, current_out, graph_type, graph_type_quantities, group_by
):
return _build_box_hist_plot(
df, result_df, graph_type, graph_type_quantites, group_by
df, result_df, graph_type, graph_type_quantities, group_by
)


def by_simple_imputer_plot(
df, result_df, current_out, graph_type, graph_type_quantites, group_by
df, result_df, current_out, graph_type, graph_type_quantities, group_by
):
return _build_box_hist_plot(
df, result_df, graph_type, graph_type_quantites, group_by
df, result_df, graph_type, graph_type_quantities, group_by
)


def by_min_per_sample_plot(
df, result_df, current_out, graph_type, graph_type_quantites, group_by
df, result_df, current_out, graph_type, graph_type_quantities, group_by
):
return _build_box_hist_plot(
df, result_df, graph_type, graph_type_quantites, group_by
df, result_df, graph_type, graph_type_quantities, group_by
)


def by_min_per_protein_plot(
df, result_df, current_out, graph_type, graph_type_quantites, group_by
df, result_df, current_out, graph_type, graph_type_quantities, group_by
):
return _build_box_hist_plot(
df, result_df, graph_type, graph_type_quantites, group_by
df, result_df, graph_type, graph_type_quantities, group_by
)


def by_min_per_dataset_plot(
df, result_df, current_out, graph_type, graph_type_quantites, group_by
df, result_df, current_out, graph_type, graph_type_quantities, group_by
):
return _build_box_hist_plot(
df, result_df, graph_type, graph_type_quantites, group_by
df, result_df, graph_type, graph_type_quantities, group_by
)


Expand All @@ -264,7 +266,7 @@ def number_of_imputed_values(input_df, result_df):


def _build_box_hist_plot(
df, result_df, graph_type, graph_type_quantites, group_by
df, result_df, graph_type, graph_type_quantities, group_by
) -> list[Figure]:
"""
This function creates two visualisations:
Expand Down Expand Up @@ -300,13 +302,13 @@ def _build_box_hist_plot(
abs(len(df)),
number_of_imputed_values(df, result_df),
]
if graph_type_quantites == "Bar chart":
if graph_type_quantities == "Bar chart":
fig2 = create_bar_plot(
names_of_sectors=["Non-imputed values", "Imputed values"],
values_of_sectors=values_of_sectors,
heading="Number of Imputed Values",
)
elif graph_type_quantites == "Pie chart":
elif graph_type_quantities == "Pie chart":
fig2 = create_pie_plot(
names_of_sectors=["Non-imputed values", "Imputed values"],
values_of_sectors=values_of_sectors,
Expand Down
1 change: 0 additions & 1 deletion protzilla/history.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import os
import shutil
from dataclasses import dataclass
from pathlib import Path
Expand Down
1 change: 0 additions & 1 deletion tests/protzilla/data_analysis/test_dimension_reduction.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import numpy as np
import pandas as pd
import pytest

Expand Down
4 changes: 2 additions & 2 deletions tests/protzilla/importing/test_ms_data_import.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from unittest.mock import patch

import numpy as np
import pandas as pd
import pytest
from unittest.mock import patch


from protzilla.constants.paths import PROJECT_PATH
from protzilla.importing import ms_data_import
Expand Down
2 changes: 1 addition & 1 deletion tests/protzilla/test_run_helper.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import copy
from unittest.mock import MagicMock, Mock, patch
from unittest.mock import MagicMock, Mock

import pandas as pd
import pytest
Expand Down
5 changes: 3 additions & 2 deletions ui/main/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import shutil
import pandas
import json
import shutil
from datetime import date

import pandas
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.shortcuts import redirect, render
Expand Down

0 comments on commit 2d81f11

Please sign in to comment.