Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ Example — multiple selected metrics:
| `--batch-size` | `10` | Replicates per thread-pool batch |
| `--sim-threshold` | `0.7` | Mean similarity threshold for cosine/modcosine/spec2vec graphs |
| `--sim-threshold-ms2dp` | `0.8` | Mean similarity threshold for MS2DeepScore graphs |
| `--spec2vec-allowed-missing-percentage` | `5.0` | Maximum percentage of missing peaks allowed in spec2vec similarity calculation |
| `--support-threshold` | `0.5` | Minimum edge support for threshold graph |
| `--max-component-size` | `100` | Maximum connected-component size |
| `--max-links` | `None` | Maximum edges per node; each node keeps only its top-N neighbours by mean similarity. `None` disables the filter |
Expand Down
11 changes: 10 additions & 1 deletion specreboot/run_workflow_matchms.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,15 @@ def build_parser(p: argparse.ArgumentParser):
"MS2DeepScore often uses a higher cutoff than cosine-based scores."
),
)
p.add_argument(
"--spec2vec-allowed-missing-percentage",
type=float,
default=5.0,
help=(
"Maximum percentage of missing peaks allowed in spec2vec similarity calculation. "
"Prevents failed similarity calculations due to vocabulary gaps, particularly in specific cases involving self-trained models."
),
)
p.add_argument(
"--tolerance",
type=float,
Expand Down Expand Up @@ -358,7 +367,7 @@ def run(args):
similarity_objs["Spec2Vec"] = Spec2Vec(
model=w2v,
intensity_weighting_power=0.5,
allowed_missing_percentage=5.0,
allowed_missing_percentage=args.spec2vec_allowed_missing_percentage,
)

if "ms2deepscore" in sim_keys:
Expand Down