Skip to content

Commit 65bd2a3

Browse files
committed
chore: remove unused imports
1 parent 179c673 commit 65bd2a3

1 file changed

Lines changed: 23 additions & 10 deletions

File tree

main/como/proteomics_gen.py

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import argparse
2-
import asyncio
1+
from __future__ import annotations
2+
3+
from pathlib import Path
34

45
import numpy as np
56
import pandas as pd
@@ -12,7 +13,7 @@
1213

1314

1415
# Load Proteomics
15-
def load_proteomics_data(datafilename, context_name):
16+
def process_proteomics_data(path: Path) -> pd.DataFrame:
1617
"""Load proteomics data from a given context and filename."""
1718
config = Config()
1819
data_path = config.data_dir / "data_matrices" / context_name / datafilename
@@ -45,7 +46,7 @@ def load_proteomics_data(datafilename, context_name):
4546

4647

4748
# read map to convert to entrez
48-
async def load_gene_symbol_map(gene_symbols: list[str]):
49+
async def load_gene_symbol_map(gene_symbols: list[str], entrez_map: Path | None = None):
4950
"""Add descirption...."""
5051
config = Config()
5152
filepath = config.data_dir / "proteomics_entrez_map.csv"
@@ -62,7 +63,15 @@ async def load_gene_symbol_map(gene_symbols: list[str]):
6263
return df[~df.index.duplicated()]
6364

6465

65-
def abundance_to_bool_group(context_name, group_name, abundance_matrix, rep_ratio, hi_rep_ratio, quantile):
66+
def abundance_to_bool_group(
67+
context_name,
68+
group_name,
69+
abundance_matrix,
70+
replicate_ratio,
71+
high_confidence_replicate_ratio,
72+
quantile,
73+
output_boolean_filepath: Path,
74+
):
6675
"""Descrioption...."""
6776
config = Config()
6877
output_dir = config.result_dir / context_name / "proteomics"
@@ -156,11 +165,15 @@ def load_empty_dict():
156165

157166

158167
async def proteomics_gen(
159-
config_file: str,
160-
rep_ratio: float = 0.5,
161-
group_ratio: float = 0.5,
162-
hi_rep_ratio: float = 0.5,
163-
hi_group_ratio: float = 0.5,
168+
context_name: str,
169+
config_filepath: Path,
170+
matrix_filepath: Path,
171+
output_boolean_filepath: Path,
172+
input_entrez_map: Path | None = None,
173+
replicate_ratio: float = 0.5,
174+
batch_ratio: float = 0.5,
175+
high_confidence_replicate_ratio: float = 0.7,
176+
high_confience_batch_ratio: float = 0.7,
164177
quantile: int = 25,
165178
):
166179
"""Generate proteomics data."""

0 commit comments

Comments
 (0)