Skip to content

Commit

Permalink
update(pyproject.toml): version 0.2.0; flake8 all .py files
Browse files Browse the repository at this point in the history
  • Loading branch information
johaGL committed Jan 22, 2024
1 parent e5ba409 commit 2eac14a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name="DIMet"
version="0.1.4"
version="0.2.0"
description="A tool for Differential analysis of Isotope-labeled targeted Metabolomics data"
readme="README.md"
license = "MIT"
Expand Down
1 change: 0 additions & 1 deletion src/dimet/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ def split_datafiles_by_compartment(self) -> None:
frames_dict = set_samples_names(frames_dict, self.metadata_df)
self.compartmentalized_dfs = frames_dict


def get_file_for_label(self, label):
if label == "abundances":
return self.config.abundances
Expand Down
3 changes: 1 addition & 2 deletions src/dimet/method/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def build(self) -> "BivariateAnalysis":
return BivariateAnalysis(config=self)



class Method(BaseModel):
config: MethodConfig

Expand Down Expand Up @@ -939,4 +938,4 @@ def check_expectations(self, cfg: DictConfig, dataset: Dataset) -> None:
sys.exit(1)
except ValueError as e:
logger.error(f"Data inconsistency:{e}")
sys.exit(1)
sys.exit(1)
19 changes: 11 additions & 8 deletions src/dimet/processing/bivariate_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
@author: Johanna Galvis, Macha Nikolski
"""
import logging
import operator
import os

from typing import List, Dict
from typing import Dict, List

import numpy as np
import pandas as pd
import scipy.stats as stats
from dimet.constants import (assert_literal, availtest_methods_type,
from omegaconf import DictConfig

from dimet.constants import (assert_literal,
data_files_keys_type)
from dimet.data import Dataset
from dimet.helpers import (arg_repl_zero2value,
compute_padj,
row_wise_nanstd_reduction)
from omegaconf import DictConfig


logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -305,7 +305,8 @@ def timepoints_to_comparisons(metadata_df: pd.DataFrame) -> List[List[str]]:
for i in range(time_df.shape[0] - 1):
j = i + 1
comparisons.append([
time_df["timepoint"].tolist()[j], time_df["timepoint"].tolist()[i]])
time_df["timepoint"].tolist()[j],
time_df["timepoint"].tolist()[i]])

return comparisons

Expand Down Expand Up @@ -363,9 +364,11 @@ def bivariate_run_and_save_current_comparison(
"""
Runs a bivariate analysis for blocks of values, handling 3 behavior types:
a - conditions_MDV_comparison:
comparison of the MDV arrays between 2 user specified conditions (separately for each time point)
comparison of the MDV arrays between 2 user specified conditions
(separately for each time point)
b - timepoints_MDV_comparison:
comparison of the MDV arrays between 2 consecutive time points (separately for each condition)
comparison of the MDV arrays between 2 consecutive time points
(separately for each condition)
c - conditions_metabolite_time_profiles:
comparison of the time course profiles of the metabolites
total abundances and mean enrichment, between two conditions
Expand Down

0 comments on commit 2eac14a

Please sign in to comment.