-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d2c5da
commit b207a66
Showing
7 changed files
with
207 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
from __future__ import annotations | ||
|
||
from pathlib import Path | ||
|
||
import cyclopts | ||
import yaml | ||
|
||
from depiction.persistence import ImzmlReadFile, ImzmlWriteFile, ImzmlModeEnum | ||
from depiction.tools.filter_peaks import FilterPeaksConfig, filter_peaks, FilterNHighestIntensityPartitionedConfig | ||
from depiction.tools.pick_peaks import PickPeaksConfig, pick_peaks | ||
|
||
app = cyclopts.App() | ||
|
||
|
||
@app.command | ||
def run_config( | ||
config: Path, | ||
input_imzml: Path, | ||
output_imzml: Path, | ||
) -> None: | ||
config = PickPeaksConfig.validate(yaml.safe_load(config.read_text())) | ||
pick_peaks( | ||
config=config, | ||
input_file=ImzmlReadFile(input_imzml), | ||
output_file=ImzmlWriteFile(output_imzml, imzml_mode=ImzmlModeEnum.PROCESSED), | ||
) | ||
|
||
|
||
# @app.default | ||
# def run( | ||
# input_imzml: Path, | ||
# output_imzml: Path, | ||
# *, | ||
# n_jobs: int | None = None, | ||
# ) -> None: | ||
# pass | ||
|
||
|
||
if __name__ == "__main__": | ||
app() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.