Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix intersection filters (default: no filtering) #33

Merged
merged 5 commits into from
Jul 29, 2024
Merged
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
2 changes: 1 addition & 1 deletion pgscatalog.match/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pgscatalog.match"
version = "0.2.2"
version = "0.2.3"
description = "Tools for matching variants in PGS scoring files and target variant information files"
authors = ["Benjamin Wingfield <bwingfield@ebi.ac.uk>", "Samuel Lambert <sl925@medschl.cam.ac.uk>", "Laurent Gil <lg10@sanger.ac.uk>"]
readme = "README.md"
Expand Down
13 changes: 7 additions & 6 deletions pgscatalog.match/src/pgscatalog/match/cli/intersect_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ def run_intersect():

PCA_ELIGIBLE = (
PCA_ELIGIBLE
and (aaf2maf(float(vmatch["AAF"])) > args.maf_filter)
and (float(vmatch["F_MISS_DOSAGE"]) < args.vmiss_filter)
and (aaf2maf(float(vmatch["AAF"])) >= args.maf_filter)
and (float(vmatch["F_MISS_DOSAGE"]) <= args.vmiss_filter)
)
vmatch["PCA_ELIGIBLE"] = PCA_ELIGIBLE
if PCA_ELIGIBLE is True:
Expand Down Expand Up @@ -374,15 +374,15 @@ def parse_args(args=None):
parser.add_argument(
"--maf_target",
dest="maf_filter",
default=0.05,
default=0,
type=float,
required=False,
help="Filter: Minimum minor Allele Frequency for PCA eligibility",
)
parser.add_argument(
"--geno_miss",
dest="vmiss_filter",
default=0.1,
default=1,
type=float,
required=False,
help="Filter: Maximum Genotype missingness for PCA eligibility",
Expand All @@ -404,8 +404,9 @@ def _description_text() -> str:
return textwrap.dedent(
"""\
Program to find matched variants (same strand) between a set of reference and target data .pvar/bim files. This
also uses the .afreq and .vmiss files to evaluate whether the variants in the TARGET are suitable for inclusion in
a PCA analysis, while also filtering on strand ambiguity and multi-allelic/INDEL status.
also evaluate whether the variants in the TARGET are suitable for inclusion in a PCA analysis (excludes strand
ambiguous and multi-allelic/INDEL variants), and can also uses the .afreq and .vmiss files exclude variants with
missingness and MAF filters.
"""
)

Expand Down
Loading