Skip to content

Commit

Permalink
Merge pull request #33 from PGScatalog/32-fix-issues-in-intersect
Browse files Browse the repository at this point in the history
Fix intersection filters (default: no filtering)
  • Loading branch information
smlmbrt authored Jul 29, 2024
2 parents 4ec2ecc + dbaed0a commit 5beae3f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
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 <[email protected]>", "Samuel Lambert <[email protected]>", "Laurent Gil <[email protected]>"]
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

0 comments on commit 5beae3f

Please sign in to comment.