Skip to content

Commit

Permalink
Added nonredundant command to find non-redundant list of centromeres …
Browse files Browse the repository at this point in the history
…from AS-HOR array lengths. Refactored integration function to allow multiple expected outputs to check.
  • Loading branch information
Keisuke Oshima committed Aug 19, 2024
1 parent 27a6d09 commit 6f07d37
Show file tree
Hide file tree
Showing 17 changed files with 540 additions and 13 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,12 @@ test/status/input/chr9_cens_partials.fa.out filter=lfs diff=lfs merge=lfs -text
test/status/input/chm13_chm1_cens_v21.trimmed.fa.noheader.out filter=lfs diff=lfs merge=lfs -text
test/status/input/chm13_chm1_cens_v21.trimmed.fa.noheader.out.png filter=lfs diff=lfs merge=lfs -text
test/status/input/chr21_cens.png filter=lfs diff=lfs merge=lfs -text
test/nonredundant/expected/unaccounted_left.tsv filter=lfs diff=lfs merge=lfs -text
test/nonredundant/expected/uniq_left.tsv filter=lfs diff=lfs merge=lfs -text
test/nonredundant/expected/uniq_right.tsv filter=lfs diff=lfs merge=lfs -text
test/nonredundant/input/hifiasm_all_AS-HOR_lengths.tsv filter=lfs diff=lfs merge=lfs -text
test/nonredundant/expected/both.tsv filter=lfs diff=lfs merge=lfs -text
test/nonredundant/expected/dupes_right.tsv filter=lfs diff=lfs merge=lfs -text
test/nonredundant/input/verkko_all_AS-HOR_lengths.tsv filter=lfs diff=lfs merge=lfs -text
test/nonredundant/expected/dupes_left.tsv filter=lfs diff=lfs merge=lfs -text
test/nonredundant/expected/unaccounted_right.tsv filter=lfs diff=lfs merge=lfs -text
14 changes: 14 additions & 0 deletions censtats/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from .status.cli import add_status_cli, check_cens_status
from .length.cli import add_hor_length_cli, calculate_hor_length
from .nonredundant.cli import add_nonredundant_cli, get_nonredundant_cens

if TYPE_CHECKING:
SubArgumentParser = argparse._SubParsersAction[argparse.ArgumentParser]
Expand All @@ -15,6 +16,7 @@ def main() -> int:
sub_ap = ap.add_subparsers(dest="cmd")
add_status_cli(sub_ap)
add_hor_length_cli(sub_ap)
add_nonredundant_cli(sub_ap)

args = ap.parse_args()

Expand All @@ -35,6 +37,18 @@ def main() -> int:
return calculate_hor_length(
args.input, args.bp_jump_thr, args.arr_len_thr, args.output
)
elif args.cmd == "nonredundant":
return get_nonredundant_cens(
args.infile_left,
args.infile_right,
args.outfile_left,
args.outfile_right,
args.outfile_both,
args.unaccounted_left,
args.unaccounted_right,
args.duplicates_left,
args.duplicates_right,
)
else:
raise ValueError(f"Unknown command: {args.cmd}")

Expand Down
Empty file.
Loading

0 comments on commit 6f07d37

Please sign in to comment.