Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
xin-huang committed Nov 14, 2024
1 parent bd8d5d2 commit 0667a4d
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 23 deletions.
10 changes: 0 additions & 10 deletions sai/parsers/score_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ def _run_score(args: argparse.Namespace) -> None:
Step size for moving the window along the sequence.
- num_src : int
Number of source populations. The length of `args.y` should match `num_src`.
- anc_allele_file : str
Path to the ancestral allele file.
- ploidy : int
Ploidy level of the organism.
- is_phased : bool
Expand Down Expand Up @@ -91,7 +89,6 @@ def _run_score(args: argparse.Namespace) -> None:
win_len=args.win_len,
win_step=args.win_step,
num_src=args.num_src,
anc_allele_file=args.anc_alleles,
ploidy=args.ploidy,
is_phased=args.is_phased,
w=args.w,
Expand Down Expand Up @@ -168,13 +165,6 @@ def add_score_parser(subparsers: argparse.ArgumentParser) -> None:
default=1,
help="number of source populations to include. Default is 1.",
)
parser.add_argument(
"--anc-alleles",
dest="anc_alleles",
type=existed_file,
default=None,
help="path to the BED file with ancestral allele information. Default is None.",
)
parser.add_argument(
"--ploidy",
type=positive_int,
Expand Down
4 changes: 0 additions & 4 deletions sai/sai.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def score(
win_len: int,
win_step: int,
num_src: int,
anc_allele_file: str,
ploidy: int,
is_phased: bool,
w: float,
Expand Down Expand Up @@ -65,8 +64,6 @@ def score(
Step size in base pairs between consecutive windows.
num_src : int
Number of source populations to include in each windowed analysis.
anc_allele_file : str
Path to the file containing ancestral allele information.
ploidy : int
The ploidy level of the genome.
is_phased : bool
Expand All @@ -93,7 +90,6 @@ def score(
win_len=win_len,
win_step=win_step,
num_src=num_src,
anc_allele_file=anc_allele_file,
ploidy=ploidy,
is_phased=is_phased,
)
Expand Down
3 changes: 1 addition & 2 deletions sai/utils/generators/WindowDataGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def __init__(
win_len: int,
win_step: int,
num_src: int = 1,
anc_allele_file: str = None,
ploidy: int = 2,
is_phased: bool = True,
):
Expand Down Expand Up @@ -110,7 +109,7 @@ def __init__(
ref_ind_file=ref_ind_file,
tgt_ind_file=tgt_ind_file,
src_ind_file=src_ind_file,
anc_allele_file=anc_allele_file,
anc_allele_file=None,
is_phased=is_phased,
filter_ref=False,
filter_tgt=False,
Expand Down
3 changes: 0 additions & 3 deletions tests/parsers/test_score_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ def test_add_score_parser(parser):
"10000",
"--num-src",
"2",
"--anc-alleles",
"tests/data/test.anc.allele.bed",
"--ploidy",
"2",
"--phased",
Expand Down Expand Up @@ -84,7 +82,6 @@ def test_add_score_parser(parser):
assert args.win_len == 50000
assert args.win_step == 10000
assert args.num_src == 2
assert args.anc_alleles == "tests/data/test.anc.allele.bed"
assert args.ploidy == 2
assert args.is_phased is True
assert args.w == 0.3
Expand Down
2 changes: 0 additions & 2 deletions tests/test_sai.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def test_score(example_data, capfd):
win_len=6666,
win_step=6666,
num_src=1,
anc_allele_file=None,
ploidy=2,
is_phased=True,
w=0.3,
Expand Down Expand Up @@ -89,7 +88,6 @@ def test_outlier(example_data):
win_len=6666,
win_step=6666,
num_src=1,
anc_allele_file=None,
ploidy=2,
is_phased=True,
w=0.3,
Expand Down
2 changes: 0 additions & 2 deletions tests/utils/generators/test_WindowDataGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def test_generator():
src_ind_file="tests/data/test.src.ind.list",
win_len=1000, # Set window length as appropriate for testing
win_step=500, # Set window step as appropriate for testing
anc_allele_file=None,
ploidy=2,
is_phased=True,
)
Expand Down Expand Up @@ -86,7 +85,6 @@ def test_generator_two_sources():
win_len=1000, # Set window length as appropriate for testing
win_step=500, # Set window step as appropriate for testing
num_src=2, # Set to 2 to test two-source combinations
anc_allele_file=None,
ploidy=2,
is_phased=False,
)
Expand Down

0 comments on commit 0667a4d

Please sign in to comment.