Skip to content

Commit 2bf1614

Browse files
committed
🚧 apply auto fixes using "ruff check --fix"
1 parent 590cb6b commit 2bf1614

File tree

9 files changed

+11
-27
lines changed

9 files changed

+11
-27
lines changed

‎docs/source/tutorials/examples/dbg_variants_workflow.ipynb‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
"metadata": {},
100100
"outputs": [],
101101
"source": [
102-
"from pathlib import Path\n",
103102
"\n",
104103
"repo_folder = Path(\"../\")\n",
105104
"\n",

‎docs/source/tutorials/examples/hybrid_workflow_with_figures.ipynb‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"import alignment as align\n",
4040
"import clustering as clus\n",
4141
"import preprocessing as prep\n",
42-
"import compute_statistics as comp_stat\n",
4342
"\n",
4443
"# import model_peptide_selector as selector\n",
4544
"\n",
@@ -50,9 +49,7 @@
5049
"# import joblib\n",
5150
"import json\n",
5251
"import Bio\n",
53-
"import pandas as pd\n",
54-
"import matplotlib.pyplot as plt\n",
55-
"import seaborn as sns"
52+
"import pandas as pd"
5653
]
5754
},
5855
{
@@ -748,7 +745,7 @@
748745
"source": [
749746
"clus.cluster_fasta_files(input_folder=str(scaffolds_folder_out))\n",
750747
"\n",
751-
"fasta_input = scaffolds_folder_out / f\"scaffolds.fasta\"\n",
748+
"fasta_input = scaffolds_folder_out / \"scaffolds.fasta\"\n",
752749
"\n",
753750
"cluster_tsv_folder = clustering_out / run_id\n",
754751
"\n",

‎docs/source/tutorials/examples/hybrid_workflow_with_selector.ipynb‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"import alignment as align\n",
4545
"import clustering as clus\n",
4646
"import preprocessing as prep\n",
47-
"import compute_statistics as comp_stat\n",
4847
"import model_peptide_selector as selector\n",
4948
"\n",
5049
"# import libraries\n",

‎src/instanexus/assembly.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@
2828
from dataclasses import dataclass
2929
from itertools import combinations
3030
from pathlib import Path
31-
from typing import Any, Dict, Iterable, List, Optional, Tuple
31+
from typing import Dict, Iterable, List
3232

3333
import Bio
3434
import networkx as nx
3535
import pandas as pd
36-
from Bio import SeqIO
3736
from tqdm import tqdm
3837

3938
from . import helpers
@@ -696,7 +695,7 @@ def assemble_dbgX(self, sequences):
696695
return extended_contigs
697696

698697
def assemble_fusion(self, sequences):
699-
logger.info(f"[Assembler] Running FUSION (DBG weighted + greedy merge)")
698+
logger.info("[Assembler] Running FUSION (DBG weighted + greedy merge)")
700699

701700
contigs_dbg_weighted = self.assemble_dbg_weighted(sequences)
702701

@@ -749,7 +748,7 @@ def main(
749748

750749
protein_norm = None # None means no reference mode
751750
if reference:
752-
logger.info(f"Reference mode enabled. Loading reference protein...")
751+
logger.info("Reference mode enabled. Loading reference protein...")
753752
if not metadata_json_path:
754753
raise ValueError(
755754
"metadata_json_path is required when reference mode is enabled."

‎src/instanexus/consensus.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@
3535
import pandas as pd
3636
import seaborn as sns
3737
from Bio import SeqIO
38-
from Bio.Seq import Seq
39-
from Bio.SeqRecord import SeqRecord
4038
from tqdm import tqdm
4139

4240
logging.basicConfig(

‎src/instanexus/helpers.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@
2525
from pathlib import Path
2626

2727
# import libraries
28-
import numpy as np
29-
import pandas as pd
30-
import plotly.express as px
31-
import plotly.graph_objects as go
3228

3329
PROJECT_ROOT = Path(__file__).resolve().parents[2]
3430
JSON_DIR = PROJECT_ROOT / "json"

‎src/instanexus/main.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def run_pipeline(args):
192192
logger.info(f"All results will be saved to: {experiment_folder}")
193193

194194
try:
195-
logger.info(f"--- [Step 1/5] Running Preprocessing ---")
195+
logger.info("--- [Step 1/5] Running Preprocessing ---")
196196
preprocessing.main(
197197
input_csv=args.input_csv,
198198
metadata_json=args.metadata_json_path,
@@ -207,7 +207,7 @@ def run_pipeline(args):
207207
return
208208

209209
try:
210-
logger.info(f"--- [Step 2/5] Running Assembly ---")
210+
logger.info("--- [Step 2/5] Running Assembly ---")
211211
assembly.main(
212212
input_csv_path=str(cleaned_csv_path),
213213
output_scaffolds_path=str(scaffolds_fasta_path),
@@ -226,7 +226,7 @@ def run_pipeline(args):
226226
return
227227

228228
try:
229-
logger.info(f"--- [Step 3/5] Running Clustering ---")
229+
logger.info("--- [Step 3/5] Running Clustering ---")
230230
clustering.main(
231231
input_scaffolds_folder=str(scaffolds_folder), # Pass the folder
232232
min_seq_id=args.min_seq_id,
@@ -237,7 +237,7 @@ def run_pipeline(args):
237237
return
238238

239239
try:
240-
logger.info(f"--- [Step 4/5] Running Alignment ---")
240+
logger.info("--- [Step 4/5] Running Alignment ---")
241241
alignment.main(
242242
input_cluster_fasta_folder=str(cluster_fasta_folder),
243243
output_alignment_folder=str(alignment_folder),
@@ -247,7 +247,7 @@ def run_pipeline(args):
247247
return
248248

249249
try:
250-
logger.info(f"--- [Step 5/5] Running Consensus ---")
250+
logger.info("--- [Step 5/5] Running Consensus ---")
251251
consensus.main(
252252
input_alignment_folder=str(alignment_folder),
253253
output_consensus_folder=str(consensus_folder),
@@ -257,7 +257,7 @@ def run_pipeline(args):
257257
logger.error(f"Consensus failed: {e}")
258258
return
259259

260-
logger.info(f"--- InstaNexus Pipeline finished successfully! ---")
260+
logger.info("--- InstaNexus Pipeline finished successfully! ---")
261261
logger.info(f"Final results in: {experiment_folder}")
262262

263263

‎src/instanexus/preprocessing.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@
2424
import logging
2525

2626
# import libraries
27-
import os
2827
import re
2928
from pathlib import Path
3029

3130
import numpy as np
3231
import pandas as pd
33-
import plotly.express as px
34-
import plotly.graph_objects as go
3532
from Bio import SeqIO
3633

3734
# PROJECT_ROOT = Path(__file__).resolve().parents[2]

‎tests/test_preprocessing.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env python3
22

3-
import pytest
43

54
from instanexus.preprocessing import remove_modifications
65

0 commit comments

Comments
 (0)