CLI¶
Functions used by the SuShiE command-line interface.
cli
¶
parameter_check
¶
parameter_check(
args: Namespace,
) -> tuple[
int,
DataFrame,
list[str],
DataFrame,
list[str],
Callable,
]
The function to process raw phenotype, genotype, covariates data across ancestries for individual-level data fine-mapping.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
Namespace
|
The command line parameter input. |
required |
Returns:
| Type | Description |
|---|---|
tuple[int, DataFrame, list[str], DataFrame, list[str], Callable]
|
|
Source code in sushie/cli.py
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 | |
process_raw
¶
process_raw(
rawData: list[RawData],
keep_subject: list[str],
pi: DataFrame,
keep_ambiguous: bool,
maf: float,
rint: bool,
no_regress: bool,
mega: bool,
cv: bool,
cv_num: int,
seed: int,
chrom: IntOrNone,
start: IntOrNone,
end: IntOrNone,
) -> tuple[
DataFrame,
CleanData,
CleanData | None,
list[CVData] | None,
]
The function to process raw phenotype, genotype, covariates data across ancestries.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rawData
|
list[RawData]
|
Raw data for phenotypes, genotypes, covariates across ancestries. |
required |
keep_subject
|
list[str]
|
The DataFrame that contains subject ID that fine-mapping performs on. |
required |
pi
|
DataFrame
|
The DataFrame that contains prior weights for each SNP to be causal. |
required |
keep_ambiguous
|
bool
|
The indicator whether to keep ambiguous SNPs. |
required |
maf
|
float
|
The minor allele frequency threshold to filter the genotypes. |
required |
rint
|
bool
|
The indicator whether to perform rank inverse normalization on each phenotype data. |
required |
no_regress
|
bool
|
The indicator whether to regress genotypes on covariates. |
required |
mega
|
bool
|
The indicator whether to prepare datasets for mega SuShiE. |
required |
cv
|
bool
|
The indicator whether to prepare datasets for cross-validation. |
required |
cv_num
|
int
|
The number for \(X\)-fold cross-validation. |
required |
seed
|
int
|
The random seed for row-wise shuffling the datasets for cross validation. |
required |
chrom
|
IntOrNone
|
The chromosome to filter SNPs. |
required |
start
|
IntOrNone
|
The start position to filter SNPs. |
required |
end
|
IntOrNone
|
The end position to filter SNPs. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
|
CleanData
|
A tuple of
- SNP information ( |
Source code in sushie/cli.py
894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 | |
sushie_wrapper
¶
sushie_wrapper(
data: CleanData,
cv_data: list[CVData] | None,
args: Namespace,
snps: DataFrame,
meta: bool = False,
mega: bool = False,
) -> None
The wrapper function to run SuShiE in regular, meta, or mega.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
CleanData
|
The clean data for SuShiE inference. |
required |
cv_data
|
list[CVData] | None
|
The cross-validation dataset. |
required |
args
|
Namespace
|
The command line parameter input. |
required |
snps
|
DataFrame
|
The SNP information. |
required |
meta
|
bool
|
The indicator whether to prepare datasets for meta SuShiE. |
False
|
mega
|
bool
|
The indicator whether to prepare datasets for mega SuShiE. |
False
|
Source code in sushie/cli.py
1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 | |
run_finemap
¶
The umbrella function to run SuShiE.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
Namespace
|
The command line parameter input. |
required |
Source code in sushie/cli.py
1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 | |