1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 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 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 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 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 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 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 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 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141
// This file is @generated by prost-build.
/// A single CIGAR operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CigarUnit {
#[prost(enumeration = "cigar_unit::Operation", tag = "1")]
pub operation: i32,
/// The number of genomic bases that the operation runs for. Required.
#[prost(int64, tag = "2")]
pub operation_length: i64,
/// `referenceSequence` is only used at mismatches
/// (`SEQUENCE_MISMATCH`) and deletions (`DELETE`).
/// Filling this field replaces SAM's MD tag. If the relevant information is
/// not available, this field is unset.
#[prost(string, tag = "3")]
pub reference_sequence: ::prost::alloc::string::String,
}
/// Nested message and enum types in `CigarUnit`.
pub mod cigar_unit {
/// Describes the different types of CIGAR alignment operations that exist.
/// Used wherever CIGAR alignments are used.
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Operation {
Unspecified = 0,
/// An alignment match indicates that a sequence can be aligned to the
/// reference without evidence of an INDEL. Unlike the
/// `SEQUENCE_MATCH` and `SEQUENCE_MISMATCH` operators,
/// the `ALIGNMENT_MATCH` operator does not indicate whether the
/// reference and read sequences are an exact match. This operator is
/// equivalent to SAM's `M`.
AlignmentMatch = 1,
/// The insert operator indicates that the read contains evidence of bases
/// being inserted into the reference. This operator is equivalent to SAM's
/// `I`.
Insert = 2,
/// The delete operator indicates that the read contains evidence of bases
/// being deleted from the reference. This operator is equivalent to SAM's
/// `D`.
Delete = 3,
/// The skip operator indicates that this read skips a long segment of the
/// reference, but the bases have not been deleted. This operator is commonly
/// used when working with RNA-seq data, where reads may skip long segments
/// of the reference between exons. This operator is equivalent to SAM's
/// `N`.
Skip = 4,
/// The soft clip operator indicates that bases at the start/end of a read
/// have not been considered during alignment. This may occur if the majority
/// of a read maps, except for low quality bases at the start/end of a read.
/// This operator is equivalent to SAM's `S`. Bases that are soft
/// clipped will still be stored in the read.
ClipSoft = 5,
/// The hard clip operator indicates that bases at the start/end of a read
/// have been omitted from this alignment. This may occur if this linear
/// alignment is part of a chimeric alignment, or if the read has been
/// trimmed (for example, during error correction or to trim poly-A tails for
/// RNA-seq). This operator is equivalent to SAM's `H`.
ClipHard = 6,
/// The pad operator indicates that there is padding in an alignment. This
/// operator is equivalent to SAM's `P`.
Pad = 7,
/// This operator indicates that this portion of the aligned sequence exactly
/// matches the reference. This operator is equivalent to SAM's `=`.
SequenceMatch = 8,
/// This operator indicates that this portion of the aligned sequence is an
/// alignment match to the reference, but a sequence mismatch. This can
/// indicate a SNP or a read error. This operator is equivalent to SAM's
/// `X`.
SequenceMismatch = 9,
}
impl Operation {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Operation::Unspecified => "OPERATION_UNSPECIFIED",
Operation::AlignmentMatch => "ALIGNMENT_MATCH",
Operation::Insert => "INSERT",
Operation::Delete => "DELETE",
Operation::Skip => "SKIP",
Operation::ClipSoft => "CLIP_SOFT",
Operation::ClipHard => "CLIP_HARD",
Operation::Pad => "PAD",
Operation::SequenceMatch => "SEQUENCE_MATCH",
Operation::SequenceMismatch => "SEQUENCE_MISMATCH",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OPERATION_UNSPECIFIED" => Some(Self::Unspecified),
"ALIGNMENT_MATCH" => Some(Self::AlignmentMatch),
"INSERT" => Some(Self::Insert),
"DELETE" => Some(Self::Delete),
"SKIP" => Some(Self::Skip),
"CLIP_SOFT" => Some(Self::ClipSoft),
"CLIP_HARD" => Some(Self::ClipHard),
"PAD" => Some(Self::Pad),
"SEQUENCE_MATCH" => Some(Self::SequenceMatch),
"SEQUENCE_MISMATCH" => Some(Self::SequenceMismatch),
_ => None,
}
}
}
}
/// A 0-based half-open genomic coordinate range for search requests.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Range {
/// The reference sequence name, for example `chr1`,
/// `1`, or `chrX`.
#[prost(string, tag = "1")]
pub reference_name: ::prost::alloc::string::String,
/// The start position of the range on the reference, 0-based inclusive.
#[prost(int64, tag = "2")]
pub start: i64,
/// The end position of the range on the reference, 0-based exclusive.
#[prost(int64, tag = "3")]
pub end: i64,
}
/// An annotation set is a logical grouping of annotations that share consistent
/// type information and provenance. Examples of annotation sets include 'all
/// genes from refseq', and 'all variant annotations from ClinVar'.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnnotationSet {
/// The server-generated annotation set ID, unique across all annotation sets.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The dataset to which this annotation set belongs.
#[prost(string, tag = "2")]
pub dataset_id: ::prost::alloc::string::String,
/// The ID of the reference set that defines the coordinate space for this
/// set's annotations.
#[prost(string, tag = "3")]
pub reference_set_id: ::prost::alloc::string::String,
/// The display name for this annotation set.
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
/// The source URI describing the file from which this annotation set was
/// generated, if any.
#[prost(string, tag = "5")]
pub source_uri: ::prost::alloc::string::String,
/// The type of annotations contained within this set.
#[prost(enumeration = "AnnotationType", tag = "6")]
pub r#type: i32,
/// A map of additional read alignment information. This must be of the form
/// map<string, string\[\]> (string key mapping to a list of string values).
#[prost(btree_map = "string, message", tag = "17")]
pub info: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost_types::ListValue,
>,
}
/// An annotation describes a region of reference genome. The value of an
/// annotation may be one of several canonical types, supplemented by arbitrary
/// info tags. An annotation is not inherently associated with a specific
/// sample or individual (though a client could choose to use annotations in
/// this way). Example canonical annotation types are `GENE` and
/// `VARIANT`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Annotation {
/// The server-generated annotation ID, unique across all annotations.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The annotation set to which this annotation belongs.
#[prost(string, tag = "2")]
pub annotation_set_id: ::prost::alloc::string::String,
/// The display name of this annotation.
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// The ID of the Google Genomics reference associated with this range.
#[prost(string, tag = "4")]
pub reference_id: ::prost::alloc::string::String,
/// The display name corresponding to the reference specified by
/// `referenceId`, for example `chr1`, `1`, or `chrX`.
#[prost(string, tag = "5")]
pub reference_name: ::prost::alloc::string::String,
/// The start position of the range on the reference, 0-based inclusive.
#[prost(int64, tag = "6")]
pub start: i64,
/// The end position of the range on the reference, 0-based exclusive.
#[prost(int64, tag = "7")]
pub end: i64,
/// Whether this range refers to the reverse strand, as opposed to the forward
/// strand. Note that regardless of this field, the start/end position of the
/// range always refer to the forward strand.
#[prost(bool, tag = "8")]
pub reverse_strand: bool,
/// The data type for this annotation. Must match the containing annotation
/// set's type.
#[prost(enumeration = "AnnotationType", tag = "9")]
pub r#type: i32,
/// A map of additional read alignment information. This must be of the form
/// map<string, string\[\]> (string key mapping to a list of string values).
#[prost(btree_map = "string, message", tag = "12")]
pub info: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost_types::ListValue,
>,
#[prost(oneof = "annotation::Value", tags = "10, 11")]
pub value: ::core::option::Option<annotation::Value>,
}
/// Nested message and enum types in `Annotation`.
pub mod annotation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
/// A variant annotation, which describes the effect of a variant on the
/// genome, the coding sequence, and/or higher level consequences at the
/// organism level e.g. pathogenicity. This field is only set for annotations
/// of type `VARIANT`.
#[prost(message, tag = "10")]
Variant(super::VariantAnnotation),
/// A transcript value represents the assertion that a particular region of
/// the reference genome may be transcribed as RNA. An alternative splicing
/// pattern would be represented as a separate transcript object. This field
/// is only set for annotations of type `TRANSCRIPT`.
#[prost(message, tag = "11")]
Transcript(super::Transcript),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariantAnnotation {
/// Type has been adapted from ClinVar's list of variant types.
#[prost(enumeration = "variant_annotation::Type", tag = "1")]
pub r#type: i32,
/// Effect of the variant on the coding sequence.
#[prost(enumeration = "variant_annotation::Effect", tag = "2")]
pub effect: i32,
/// The alternate allele for this variant. If multiple alternate alleles
/// exist at this location, create a separate variant for each one, as they
/// may represent distinct conditions.
#[prost(string, tag = "3")]
pub alternate_bases: ::prost::alloc::string::String,
/// Google annotation ID of the gene affected by this variant. This should
/// be provided when the variant is created.
#[prost(string, tag = "4")]
pub gene_id: ::prost::alloc::string::String,
/// Google annotation IDs of the transcripts affected by this variant. These
/// should be provided when the variant is created.
#[prost(string, repeated, tag = "5")]
pub transcript_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The set of conditions associated with this variant.
/// A condition describes the way a variant influences human health.
#[prost(message, repeated, tag = "6")]
pub conditions: ::prost::alloc::vec::Vec<variant_annotation::ClinicalCondition>,
/// Describes the clinical significance of a variant.
/// It is adapted from the ClinVar controlled vocabulary for clinical
/// significance described at:
/// <http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/>
#[prost(enumeration = "variant_annotation::ClinicalSignificance", tag = "7")]
pub clinical_significance: i32,
}
/// Nested message and enum types in `VariantAnnotation`.
pub mod variant_annotation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClinicalCondition {
/// A set of names for the condition.
#[prost(string, repeated, tag = "1")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The set of external IDs for this condition.
#[prost(message, repeated, tag = "2")]
pub external_ids: ::prost::alloc::vec::Vec<super::ExternalId>,
/// The MedGen concept id associated with this gene.
/// Search for these IDs at <http://www.ncbi.nlm.nih.gov/medgen/>
#[prost(string, tag = "3")]
pub concept_id: ::prost::alloc::string::String,
/// The OMIM id for this condition.
/// Search for these IDs at <http://omim.org/>
#[prost(string, tag = "4")]
pub omim_id: ::prost::alloc::string::String,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
/// `TYPE_OTHER` should be used when no other Type will suffice.
/// Further explanation of the variant type may be included in the
/// [info][google.genomics.v1.Annotation.info] field.
Other = 1,
/// `INSERTION` indicates an insertion.
Insertion = 2,
/// `DELETION` indicates a deletion.
Deletion = 3,
/// `SUBSTITUTION` indicates a block substitution of
/// two or more nucleotides.
Substitution = 4,
/// `SNP` indicates a single nucleotide polymorphism.
Snp = 5,
/// `STRUCTURAL` indicates a large structural variant,
/// including chromosomal fusions, inversions, etc.
Structural = 6,
/// `CNV` indicates a variation in copy number.
Cnv = 7,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Other => "TYPE_OTHER",
Type::Insertion => "INSERTION",
Type::Deletion => "DELETION",
Type::Substitution => "SUBSTITUTION",
Type::Snp => "SNP",
Type::Structural => "STRUCTURAL",
Type::Cnv => "CNV",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TYPE_OTHER" => Some(Self::Other),
"INSERTION" => Some(Self::Insertion),
"DELETION" => Some(Self::Deletion),
"SUBSTITUTION" => Some(Self::Substitution),
"SNP" => Some(Self::Snp),
"STRUCTURAL" => Some(Self::Structural),
"CNV" => Some(Self::Cnv),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Effect {
Unspecified = 0,
/// `EFFECT_OTHER` should be used when no other Effect
/// will suffice.
Other = 1,
/// `FRAMESHIFT` indicates a mutation in which the insertion or
/// deletion of nucleotides resulted in a frameshift change.
Frameshift = 2,
/// `FRAME_PRESERVING_INDEL` indicates a mutation in which a
/// multiple of three nucleotides has been inserted or deleted, resulting
/// in no change to the reading frame of the coding sequence.
FramePreservingIndel = 3,
/// `SYNONYMOUS_SNP` indicates a single nucleotide polymorphism
/// mutation that results in no amino acid change.
SynonymousSnp = 4,
/// `NONSYNONYMOUS_SNP` indicates a single nucleotide
/// polymorphism mutation that results in an amino acid change.
NonsynonymousSnp = 5,
/// `STOP_GAIN` indicates a mutation that leads to the creation
/// of a stop codon at the variant site. Frameshift mutations creating
/// downstream stop codons do not count as `STOP_GAIN`.
StopGain = 6,
/// `STOP_LOSS` indicates a mutation that eliminates a
/// stop codon at the variant site.
StopLoss = 7,
/// `SPLICE_SITE_DISRUPTION` indicates that this variant is
/// found in a splice site for the associated transcript, and alters the
/// normal splicing pattern.
SpliceSiteDisruption = 8,
}
impl Effect {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Effect::Unspecified => "EFFECT_UNSPECIFIED",
Effect::Other => "EFFECT_OTHER",
Effect::Frameshift => "FRAMESHIFT",
Effect::FramePreservingIndel => "FRAME_PRESERVING_INDEL",
Effect::SynonymousSnp => "SYNONYMOUS_SNP",
Effect::NonsynonymousSnp => "NONSYNONYMOUS_SNP",
Effect::StopGain => "STOP_GAIN",
Effect::StopLoss => "STOP_LOSS",
Effect::SpliceSiteDisruption => "SPLICE_SITE_DISRUPTION",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"EFFECT_UNSPECIFIED" => Some(Self::Unspecified),
"EFFECT_OTHER" => Some(Self::Other),
"FRAMESHIFT" => Some(Self::Frameshift),
"FRAME_PRESERVING_INDEL" => Some(Self::FramePreservingIndel),
"SYNONYMOUS_SNP" => Some(Self::SynonymousSnp),
"NONSYNONYMOUS_SNP" => Some(Self::NonsynonymousSnp),
"STOP_GAIN" => Some(Self::StopGain),
"STOP_LOSS" => Some(Self::StopLoss),
"SPLICE_SITE_DISRUPTION" => Some(Self::SpliceSiteDisruption),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ClinicalSignificance {
Unspecified = 0,
/// `OTHER` should be used when no other clinical significance
/// value will suffice.
Other = 1,
Uncertain = 2,
Benign = 3,
LikelyBenign = 4,
LikelyPathogenic = 5,
Pathogenic = 6,
DrugResponse = 7,
Histocompatibility = 8,
ConfersSensitivity = 9,
RiskFactor = 10,
Association = 11,
Protective = 12,
/// `MULTIPLE_REPORTED` should be used when multiple clinical
/// signficances are reported for a variant. The original clinical
/// significance values may be provided in the `info` field.
MultipleReported = 13,
}
impl ClinicalSignificance {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ClinicalSignificance::Unspecified => "CLINICAL_SIGNIFICANCE_UNSPECIFIED",
ClinicalSignificance::Other => "CLINICAL_SIGNIFICANCE_OTHER",
ClinicalSignificance::Uncertain => "UNCERTAIN",
ClinicalSignificance::Benign => "BENIGN",
ClinicalSignificance::LikelyBenign => "LIKELY_BENIGN",
ClinicalSignificance::LikelyPathogenic => "LIKELY_PATHOGENIC",
ClinicalSignificance::Pathogenic => "PATHOGENIC",
ClinicalSignificance::DrugResponse => "DRUG_RESPONSE",
ClinicalSignificance::Histocompatibility => "HISTOCOMPATIBILITY",
ClinicalSignificance::ConfersSensitivity => "CONFERS_SENSITIVITY",
ClinicalSignificance::RiskFactor => "RISK_FACTOR",
ClinicalSignificance::Association => "ASSOCIATION",
ClinicalSignificance::Protective => "PROTECTIVE",
ClinicalSignificance::MultipleReported => "MULTIPLE_REPORTED",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CLINICAL_SIGNIFICANCE_UNSPECIFIED" => Some(Self::Unspecified),
"CLINICAL_SIGNIFICANCE_OTHER" => Some(Self::Other),
"UNCERTAIN" => Some(Self::Uncertain),
"BENIGN" => Some(Self::Benign),
"LIKELY_BENIGN" => Some(Self::LikelyBenign),
"LIKELY_PATHOGENIC" => Some(Self::LikelyPathogenic),
"PATHOGENIC" => Some(Self::Pathogenic),
"DRUG_RESPONSE" => Some(Self::DrugResponse),
"HISTOCOMPATIBILITY" => Some(Self::Histocompatibility),
"CONFERS_SENSITIVITY" => Some(Self::ConfersSensitivity),
"RISK_FACTOR" => Some(Self::RiskFactor),
"ASSOCIATION" => Some(Self::Association),
"PROTECTIVE" => Some(Self::Protective),
"MULTIPLE_REPORTED" => Some(Self::MultipleReported),
_ => None,
}
}
}
}
/// A transcript represents the assertion that a particular region of the
/// reference genome may be transcribed as RNA.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Transcript {
/// The annotation ID of the gene from which this transcript is transcribed.
#[prost(string, tag = "1")]
pub gene_id: ::prost::alloc::string::String,
/// The <a href="<http://en.wikipedia.org/wiki/Exon">exons</a>> that compose
/// this transcript. This field should be unset for genomes where transcript
/// splicing does not occur, for example prokaryotes.
///
/// Introns are regions of the transcript that are not included in the
/// spliced RNA product. Though not explicitly modeled here, intron ranges can
/// be deduced; all regions of this transcript that are not exons are introns.
///
/// Exonic sequences do not necessarily code for a translational product
/// (amino acids). Only the regions of exons bounded by the
/// [codingSequence][google.genomics.v1.Transcript.coding_sequence] correspond
/// to coding DNA sequence.
///
/// Exons are ordered by start position and may not overlap.
#[prost(message, repeated, tag = "2")]
pub exons: ::prost::alloc::vec::Vec<transcript::Exon>,
/// The range of the coding sequence for this transcript, if any. To determine
/// the exact ranges of coding sequence, intersect this range with those of the
/// [exons][google.genomics.v1.Transcript.exons], if any. If there are any
/// [exons][google.genomics.v1.Transcript.exons], the
/// [codingSequence][google.genomics.v1.Transcript.coding_sequence] must start
/// and end within them.
///
/// Note that in some cases, the reference genome will not exactly match the
/// observed mRNA transcript e.g. due to variance in the source genome from
/// reference. In these cases,
/// [exon.frame][google.genomics.v1.Transcript.Exon.frame] will not necessarily
/// match the expected reference reading frame and coding exon reference bases
/// cannot necessarily be concatenated to produce the original transcript mRNA.
#[prost(message, optional, tag = "3")]
pub coding_sequence: ::core::option::Option<transcript::CodingSequence>,
}
/// Nested message and enum types in `Transcript`.
pub mod transcript {
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Exon {
/// The start position of the exon on this annotation's reference sequence,
/// 0-based inclusive. Note that this is relative to the reference start, and
/// **not** the containing annotation start.
#[prost(int64, tag = "1")]
pub start: i64,
/// The end position of the exon on this annotation's reference sequence,
/// 0-based exclusive. Note that this is relative to the reference start, and
/// *not* the containing annotation start.
#[prost(int64, tag = "2")]
pub end: i64,
/// The frame of this exon. Contains a value of 0, 1, or 2, which indicates
/// the offset of the first coding base of the exon within the reading frame
/// of the coding DNA sequence, if any. This field is dependent on the
/// strandedness of this annotation (see
/// [Annotation.reverse_strand][google.genomics.v1.Annotation.reverse_strand]).
/// For forward stranded annotations, this offset is relative to the
/// [exon.start][google.genomics.v1.Transcript.Exon.start]. For reverse
/// strand annotations, this offset is relative to the
/// [exon.end][google.genomics.v1.Transcript.Exon.end] `- 1`.
///
/// Unset if this exon does not intersect the coding sequence. Upon creation
/// of a transcript, the frame must be populated for all or none of the
/// coding exons.
#[prost(message, optional, tag = "3")]
pub frame: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CodingSequence {
/// The start of the coding sequence on this annotation's reference sequence,
/// 0-based inclusive. Note that this position is relative to the reference
/// start, and *not* the containing annotation start.
#[prost(int64, tag = "1")]
pub start: i64,
/// The end of the coding sequence on this annotation's reference sequence,
/// 0-based exclusive. Note that this position is relative to the reference
/// start, and *not* the containing annotation start.
#[prost(int64, tag = "2")]
pub end: i64,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalId {
/// The name of the source of this data.
#[prost(string, tag = "1")]
pub source_name: ::prost::alloc::string::String,
/// The id used by the source of this data.
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAnnotationSetRequest {
/// The annotation set to create.
#[prost(message, optional, tag = "1")]
pub annotation_set: ::core::option::Option<AnnotationSet>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAnnotationSetRequest {
/// The ID of the annotation set to be retrieved.
#[prost(string, tag = "1")]
pub annotation_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAnnotationSetRequest {
/// The ID of the annotation set to be updated.
#[prost(string, tag = "1")]
pub annotation_set_id: ::prost::alloc::string::String,
/// The new annotation set.
#[prost(message, optional, tag = "2")]
pub annotation_set: ::core::option::Option<AnnotationSet>,
/// An optional mask specifying which fields to update. Mutable fields are
/// [name][google.genomics.v1.AnnotationSet.name],
/// [source_uri][google.genomics.v1.AnnotationSet.source_uri], and
/// [info][google.genomics.v1.AnnotationSet.info]. If unspecified, all
/// mutable fields will be updated.
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAnnotationSetRequest {
/// The ID of the annotation set to be deleted.
#[prost(string, tag = "1")]
pub annotation_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAnnotationSetsRequest {
/// Required. The dataset IDs to search within. Caller must have `READ` access
/// to these datasets.
#[prost(string, repeated, tag = "1")]
pub dataset_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// If specified, only annotation sets associated with the given reference set
/// are returned.
#[prost(string, tag = "2")]
pub reference_set_id: ::prost::alloc::string::String,
/// Only return annotations sets for which a substring of the name matches this
/// string (case insensitive).
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// If specified, only annotation sets that have any of these types are
/// returned.
#[prost(enumeration = "AnnotationType", repeated, tag = "4")]
pub types: ::prost::alloc::vec::Vec<i32>,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "5")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of results to return in a single page. If unspecified,
/// defaults to 128. The maximum value is 1024.
#[prost(int32, tag = "6")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAnnotationSetsResponse {
/// The matching annotation sets.
#[prost(message, repeated, tag = "1")]
pub annotation_sets: ::prost::alloc::vec::Vec<AnnotationSet>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAnnotationRequest {
/// The annotation to be created.
#[prost(message, optional, tag = "1")]
pub annotation: ::core::option::Option<Annotation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateAnnotationsRequest {
/// The annotations to be created. At most 4096 can be specified in a single
/// request.
#[prost(message, repeated, tag = "1")]
pub annotations: ::prost::alloc::vec::Vec<Annotation>,
/// A unique request ID which enables the server to detect duplicated requests.
/// If provided, duplicated requests will result in the same response; if not
/// provided, duplicated requests may result in duplicated data. For a given
/// annotation set, callers should not reuse `request_id`s when writing
/// different batches of annotations - behavior in this case is undefined.
/// A common approach is to use a UUID. For batch jobs where worker crashes are
/// a possibility, consider using some unique variant of a worker or run ID.
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateAnnotationsResponse {
/// The resulting per-annotation entries, ordered consistently with the
/// original request.
#[prost(message, repeated, tag = "1")]
pub entries: ::prost::alloc::vec::Vec<batch_create_annotations_response::Entry>,
}
/// Nested message and enum types in `BatchCreateAnnotationsResponse`.
pub mod batch_create_annotations_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entry {
/// The creation status.
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::super::super::rpc::Status>,
/// The created annotation, if creation was successful.
#[prost(message, optional, tag = "2")]
pub annotation: ::core::option::Option<super::Annotation>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAnnotationRequest {
/// The ID of the annotation to be retrieved.
#[prost(string, tag = "1")]
pub annotation_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAnnotationRequest {
/// The ID of the annotation to be updated.
#[prost(string, tag = "1")]
pub annotation_id: ::prost::alloc::string::String,
/// The new annotation.
#[prost(message, optional, tag = "2")]
pub annotation: ::core::option::Option<Annotation>,
/// An optional mask specifying which fields to update. Mutable fields are
/// [name][google.genomics.v1.Annotation.name],
/// [variant][google.genomics.v1.Annotation.variant],
/// [transcript][google.genomics.v1.Annotation.transcript], and
/// [info][google.genomics.v1.Annotation.info]. If unspecified, all mutable
/// fields will be updated.
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAnnotationRequest {
/// The ID of the annotation to be deleted.
#[prost(string, tag = "1")]
pub annotation_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAnnotationsRequest {
/// Required. The annotation sets to search within. The caller must have
/// `READ` access to these annotation sets.
/// All queried annotation sets must have the same type.
#[prost(string, repeated, tag = "1")]
pub annotation_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The start position of the range on the reference, 0-based inclusive. If
/// specified,
/// [referenceId][google.genomics.v1.SearchAnnotationsRequest.reference_id] or
/// [referenceName][google.genomics.v1.SearchAnnotationsRequest.reference_name]
/// must be specified. Defaults to 0.
#[prost(int64, tag = "4")]
pub start: i64,
/// The end position of the range on the reference, 0-based exclusive. If
/// [referenceId][google.genomics.v1.SearchAnnotationsRequest.reference_id] or
/// [referenceName][google.genomics.v1.SearchAnnotationsRequest.reference_name]
/// must be specified, Defaults to the length of the reference.
#[prost(int64, tag = "5")]
pub end: i64,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "6")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of results to return in a single page. If unspecified,
/// defaults to 256. The maximum value is 2048.
#[prost(int32, tag = "7")]
pub page_size: i32,
/// Required. `reference_id` or `reference_name` must be set.
#[prost(oneof = "search_annotations_request::Reference", tags = "2, 3")]
pub reference: ::core::option::Option<search_annotations_request::Reference>,
}
/// Nested message and enum types in `SearchAnnotationsRequest`.
pub mod search_annotations_request {
/// Required. `reference_id` or `reference_name` must be set.
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Reference {
/// The ID of the reference to query.
#[prost(string, tag = "2")]
ReferenceId(::prost::alloc::string::String),
/// The name of the reference to query, within the reference set associated
/// with this query.
#[prost(string, tag = "3")]
ReferenceName(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAnnotationsResponse {
/// The matching annotations.
#[prost(message, repeated, tag = "1")]
pub annotations: ::prost::alloc::vec::Vec<Annotation>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// When an [Annotation][google.genomics.v1.Annotation] or
/// [AnnotationSet][google.genomics.v1.AnnotationSet] is created, if `type` is
/// not specified it will be set to `GENERIC`.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AnnotationType {
Unspecified = 0,
/// A `GENERIC` annotation type should be used when no other annotation
/// type will suffice. This represents an untyped annotation of the reference
/// genome.
Generic = 1,
/// A `VARIANT` annotation type.
Variant = 2,
/// A `GENE` annotation type represents the existence of a gene at the
/// associated reference coordinates. The start coordinate is typically the
/// gene's transcription start site and the end is typically the end of the
/// gene's last exon.
Gene = 3,
/// A `TRANSCRIPT` annotation type represents the assertion that a
/// particular region of the reference genome may be transcribed as RNA.
Transcript = 4,
}
impl AnnotationType {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
AnnotationType::Unspecified => "ANNOTATION_TYPE_UNSPECIFIED",
AnnotationType::Generic => "GENERIC",
AnnotationType::Variant => "VARIANT",
AnnotationType::Gene => "GENE",
AnnotationType::Transcript => "TRANSCRIPT",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ANNOTATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"GENERIC" => Some(Self::Generic),
"VARIANT" => Some(Self::Variant),
"GENE" => Some(Self::Gene),
"TRANSCRIPT" => Some(Self::Transcript),
_ => None,
}
}
}
/// Generated client implementations.
pub mod annotation_service_v1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// This service provides storage and positional retrieval of genomic
/// reference annotations, including variant annotations.
#[derive(Debug, Clone)]
pub struct AnnotationServiceV1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AnnotationServiceV1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AnnotationServiceV1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
AnnotationServiceV1Client::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Creates a new annotation set. Caller must have WRITE permission for the
/// associated dataset.
///
/// The following fields are required:
///
/// * [datasetId][google.genomics.v1.AnnotationSet.dataset_id]
/// * [referenceSetId][google.genomics.v1.AnnotationSet.reference_set_id]
///
/// All other fields may be optionally specified, unless documented as being
/// server-generated (for example, the `id` field).
pub async fn create_annotation_set(
&mut self,
request: impl tonic::IntoRequest<super::CreateAnnotationSetRequest>,
) -> std::result::Result<tonic::Response<super::AnnotationSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/CreateAnnotationSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"CreateAnnotationSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets an annotation set. Caller must have READ permission for
/// the associated dataset.
pub async fn get_annotation_set(
&mut self,
request: impl tonic::IntoRequest<super::GetAnnotationSetRequest>,
) -> std::result::Result<tonic::Response<super::AnnotationSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/GetAnnotationSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"GetAnnotationSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates an annotation set. The update must respect all mutability
/// restrictions and other invariants described on the annotation set resource.
/// Caller must have WRITE permission for the associated dataset.
pub async fn update_annotation_set(
&mut self,
request: impl tonic::IntoRequest<super::UpdateAnnotationSetRequest>,
) -> std::result::Result<tonic::Response<super::AnnotationSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/UpdateAnnotationSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"UpdateAnnotationSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes an annotation set. Caller must have WRITE permission
/// for the associated annotation set.
pub async fn delete_annotation_set(
&mut self,
request: impl tonic::IntoRequest<super::DeleteAnnotationSetRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/DeleteAnnotationSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"DeleteAnnotationSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Searches for annotation sets that match the given criteria. Annotation sets
/// are returned in an unspecified order. This order is consistent, such that
/// two queries for the same content (regardless of page size) yield annotation
/// sets in the same order across their respective streams of paginated
/// responses. Caller must have READ permission for the queried datasets.
pub async fn search_annotation_sets(
&mut self,
request: impl tonic::IntoRequest<super::SearchAnnotationSetsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchAnnotationSetsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/SearchAnnotationSets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"SearchAnnotationSets",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new annotation. Caller must have WRITE permission
/// for the associated annotation set.
///
/// The following fields are required:
///
/// * [annotationSetId][google.genomics.v1.Annotation.annotation_set_id]
/// * [referenceName][google.genomics.v1.Annotation.reference_name] or
/// [referenceId][google.genomics.v1.Annotation.reference_id]
///
/// ### Transcripts
///
/// For annotations of type TRANSCRIPT, the following fields of
/// [transcript][google.genomics.v1.Annotation.transcript] must be provided:
///
/// * [exons.start][google.genomics.v1.Transcript.Exon.start]
/// * [exons.end][google.genomics.v1.Transcript.Exon.end]
///
/// All other fields may be optionally specified, unless documented as being
/// server-generated (for example, the `id` field). The annotated
/// range must be no longer than 100Mbp (mega base pairs). See the
/// [Annotation resource][google.genomics.v1.Annotation]
/// for additional restrictions on each field.
pub async fn create_annotation(
&mut self,
request: impl tonic::IntoRequest<super::CreateAnnotationRequest>,
) -> std::result::Result<tonic::Response<super::Annotation>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/CreateAnnotation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"CreateAnnotation",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates one or more new annotations atomically. All annotations must
/// belong to the same annotation set. Caller must have WRITE
/// permission for this annotation set. For optimal performance, batch
/// positionally adjacent annotations together.
///
/// If the request has a systemic issue, such as an attempt to write to
/// an inaccessible annotation set, the entire RPC will fail accordingly. For
/// lesser data issues, when possible an error will be isolated to the
/// corresponding batch entry in the response; the remaining well formed
/// annotations will be created normally.
///
/// For details on the requirements for each individual annotation resource,
/// see
/// [CreateAnnotation][google.genomics.v1.AnnotationServiceV1.CreateAnnotation].
pub async fn batch_create_annotations(
&mut self,
request: impl tonic::IntoRequest<super::BatchCreateAnnotationsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchCreateAnnotationsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/BatchCreateAnnotations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"BatchCreateAnnotations",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets an annotation. Caller must have READ permission
/// for the associated annotation set.
pub async fn get_annotation(
&mut self,
request: impl tonic::IntoRequest<super::GetAnnotationRequest>,
) -> std::result::Result<tonic::Response<super::Annotation>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/GetAnnotation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"GetAnnotation",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates an annotation. Caller must have
/// WRITE permission for the associated dataset.
pub async fn update_annotation(
&mut self,
request: impl tonic::IntoRequest<super::UpdateAnnotationRequest>,
) -> std::result::Result<tonic::Response<super::Annotation>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/UpdateAnnotation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"UpdateAnnotation",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes an annotation. Caller must have WRITE permission for
/// the associated annotation set.
pub async fn delete_annotation(
&mut self,
request: impl tonic::IntoRequest<super::DeleteAnnotationRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/DeleteAnnotation",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"DeleteAnnotation",
),
);
self.inner.unary(req, path, codec).await
}
/// Searches for annotations that match the given criteria. Results are
/// ordered by genomic coordinate (by reference sequence, then position).
/// Annotations with equivalent genomic coordinates are returned in an
/// unspecified order. This order is consistent, such that two queries for the
/// same content (regardless of page size) yield annotations in the same order
/// across their respective streams of paginated responses. Caller must have
/// READ permission for the queried annotation sets.
pub async fn search_annotations(
&mut self,
request: impl tonic::IntoRequest<super::SearchAnnotationsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchAnnotationsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/SearchAnnotations",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.AnnotationServiceV1",
"SearchAnnotations",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// A read group is all the data that's processed the same way by the sequencer.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadGroup {
/// The server-generated read group ID, unique for all read groups.
/// Note: This is different than the @RG ID field in the SAM spec. For that
/// value, see [name][google.genomics.v1.ReadGroup.name].
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The dataset to which this read group belongs.
#[prost(string, tag = "2")]
pub dataset_id: ::prost::alloc::string::String,
/// The read group name. This corresponds to the @RG ID field in the SAM spec.
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// A free-form text description of this read group.
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
/// A client-supplied sample identifier for the reads in this read group.
#[prost(string, tag = "5")]
pub sample_id: ::prost::alloc::string::String,
/// The experiment used to generate this read group.
#[prost(message, optional, tag = "6")]
pub experiment: ::core::option::Option<read_group::Experiment>,
/// The predicted insert size of this read group. The insert size is the length
/// the sequenced DNA fragment from end-to-end, not including the adapters.
#[prost(int32, tag = "7")]
pub predicted_insert_size: i32,
/// The programs used to generate this read group. Programs are always
/// identical for all read groups within a read group set. For this reason,
/// only the first read group in a returned set will have this field
/// populated.
#[prost(message, repeated, tag = "10")]
pub programs: ::prost::alloc::vec::Vec<read_group::Program>,
/// The reference set the reads in this read group are aligned to.
#[prost(string, tag = "11")]
pub reference_set_id: ::prost::alloc::string::String,
/// A map of additional read group information. This must be of the form
/// map<string, string\[\]> (string key mapping to a list of string values).
#[prost(btree_map = "string, message", tag = "12")]
pub info: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost_types::ListValue,
>,
}
/// Nested message and enum types in `ReadGroup`.
pub mod read_group {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Experiment {
/// A client-supplied library identifier; a library is a collection of DNA
/// fragments which have been prepared for sequencing from a sample. This
/// field is important for quality control as error or bias can be introduced
/// during sample preparation.
#[prost(string, tag = "1")]
pub library_id: ::prost::alloc::string::String,
/// The platform unit used as part of this experiment, for example
/// flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to the
/// @RG PU field in the SAM spec.
#[prost(string, tag = "2")]
pub platform_unit: ::prost::alloc::string::String,
/// The sequencing center used as part of this experiment.
#[prost(string, tag = "3")]
pub sequencing_center: ::prost::alloc::string::String,
/// The instrument model used as part of this experiment. This maps to
/// sequencing technology in the SAM spec.
#[prost(string, tag = "4")]
pub instrument_model: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Program {
/// The command line used to run this program.
#[prost(string, tag = "1")]
pub command_line: ::prost::alloc::string::String,
/// The user specified locally unique ID of the program. Used along with
/// `prevProgramId` to define an ordering between programs.
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
/// The display name of the program. This is typically the colloquial name of
/// the tool used, for example 'bwa' or 'picard'.
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// The ID of the program run before this one.
#[prost(string, tag = "4")]
pub prev_program_id: ::prost::alloc::string::String,
/// The version of the program run.
#[prost(string, tag = "5")]
pub version: ::prost::alloc::string::String,
}
}
/// Metadata describing an [Operation][google.longrunning.Operation].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
/// The Google Cloud Project in which the job is scoped.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// The time at which the job was submitted to the Genomics service.
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time at which the job began to run.
#[prost(message, optional, tag = "3")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// The time at which the job stopped running.
#[prost(message, optional, tag = "4")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// The original request that started the operation. Note that this will be in
/// current version of the API. If the operation was started with v1beta2 API
/// and a GetOperation is performed on v1 API, a v1 request will be returned.
#[prost(message, optional, tag = "5")]
pub request: ::core::option::Option<::prost_types::Any>,
/// Optional event messages that were generated during the job's execution.
/// This also contains any warnings that were generated during import
/// or export.
#[prost(message, repeated, tag = "6")]
pub events: ::prost::alloc::vec::Vec<OperationEvent>,
/// This field is deprecated. Use `labels` instead. Optionally provided by the
/// caller when submitting the request that creates the operation.
#[prost(string, tag = "7")]
pub client_id: ::prost::alloc::string::String,
/// Runtime metadata on this Operation.
#[prost(message, optional, tag = "8")]
pub runtime_metadata: ::core::option::Option<::prost_types::Any>,
/// Optionally provided by the caller when submitting the request that creates
/// the operation.
#[prost(btree_map = "string, string", tag = "9")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// An event that occurred during an [Operation][google.longrunning.Operation].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationEvent {
/// Optional time of when event started.
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
/// Optional time of when event finished. An event can have a start time and no
/// finish time. If an event has a finish time, there must be a start time.
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
/// Required description of event.
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
}
/// An abstraction for referring to a genomic position, in relation to some
/// already known reference. For now, represents a genomic position as a
/// reference name, a base number on that reference (0-based), and a
/// determination of forward or reverse strand.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Position {
/// The name of the reference in whatever reference set is being used.
#[prost(string, tag = "1")]
pub reference_name: ::prost::alloc::string::String,
/// The 0-based offset from the start of the forward strand for that reference.
#[prost(int64, tag = "2")]
pub position: i64,
/// Whether this position is on the reverse strand, as opposed to the forward
/// strand.
#[prost(bool, tag = "3")]
pub reverse_strand: bool,
}
/// A linear alignment can be represented by one CIGAR string. Describes the
/// mapped position and local alignment of the read to the reference.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LinearAlignment {
/// The position of this alignment.
#[prost(message, optional, tag = "1")]
pub position: ::core::option::Option<Position>,
/// The mapping quality of this alignment. Represents how likely
/// the read maps to this position as opposed to other locations.
///
/// Specifically, this is -10 log10 Pr(mapping position is wrong), rounded to
/// the nearest integer.
#[prost(int32, tag = "2")]
pub mapping_quality: i32,
/// Represents the local alignment of this sequence (alignment matches, indels,
/// etc) against the reference.
#[prost(message, repeated, tag = "3")]
pub cigar: ::prost::alloc::vec::Vec<CigarUnit>,
}
/// A read alignment describes a linear alignment of a string of DNA to a
/// [reference sequence][google.genomics.v1.Reference], in addition to metadata
/// about the fragment (the molecule of DNA sequenced) and the read (the bases
/// which were read by the sequencer). A read is equivalent to a line in a SAM
/// file. A read belongs to exactly one read group and exactly one
/// [read group set][google.genomics.v1.ReadGroupSet].
///
/// For more genomics resource definitions, see [Fundamentals of Google
/// Genomics](<https://cloud.google.com/genomics/fundamentals-of-google-genomics>)
///
/// ### Reverse-stranded reads
///
/// Mapped reads (reads having a non-null `alignment`) can be aligned to either
/// the forward or the reverse strand of their associated reference. Strandedness
/// of a mapped read is encoded by `alignment.position.reverseStrand`.
///
/// If we consider the reference to be a forward-stranded coordinate space of
/// `[0, reference.length)` with `0` as the left-most position and
/// `reference.length` as the right-most position, reads are always aligned left
/// to right. That is, `alignment.position.position` always refers to the
/// left-most reference coordinate and `alignment.cigar` describes the alignment
/// of this read to the reference from left to right. All per-base fields such as
/// `alignedSequence` and `alignedQuality` share this same left-to-right
/// orientation; this is true of reads which are aligned to either strand. For
/// reverse-stranded reads, this means that `alignedSequence` is the reverse
/// complement of the bases that were originally reported by the sequencing
/// machine.
///
/// ### Generating a reference-aligned sequence string
///
/// When interacting with mapped reads, it's often useful to produce a string
/// representing the local alignment of the read to reference. The following
/// pseudocode demonstrates one way of doing this:
///
/// out = ""
/// offset = 0
/// for c in read.alignment.cigar {
/// switch c.operation {
/// case "ALIGNMENT_MATCH", "SEQUENCE_MATCH", "SEQUENCE_MISMATCH":
/// out += read.alignedSequence\[offset:offset+c.operationLength\]
/// offset += c.operationLength
/// break
/// case "CLIP_SOFT", "INSERT":
/// offset += c.operationLength
/// break
/// case "PAD":
/// out += repeat("*", c.operationLength)
/// break
/// case "DELETE":
/// out += repeat("-", c.operationLength)
/// break
/// case "SKIP":
/// out += repeat(" ", c.operationLength)
/// break
/// case "CLIP_HARD":
/// break
/// }
/// }
/// return out
///
/// ### Converting to SAM's CIGAR string
///
/// The following pseudocode generates a SAM CIGAR string from the
/// `cigar` field. Note that this is a lossy conversion
/// (`cigar.referenceSequence` is lost).
///
/// cigarMap = {
/// "ALIGNMENT_MATCH": "M",
/// "INSERT": "I",
/// "DELETE": "D",
/// "SKIP": "N",
/// "CLIP_SOFT": "S",
/// "CLIP_HARD": "H",
/// "PAD": "P",
/// "SEQUENCE_MATCH": "=",
/// "SEQUENCE_MISMATCH": "X",
/// }
/// cigarStr = ""
/// for c in read.alignment.cigar {
/// cigarStr += c.operationLength + cigarMap\[c.operation\]
/// }
/// return cigarStr
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Read {
/// The server-generated read ID, unique across all reads. This is different
/// from the `fragmentName`.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The ID of the read group this read belongs to. A read belongs to exactly
/// one read group. This is a server-generated ID which is distinct from SAM's
/// RG tag (for that value, see
/// [ReadGroup.name][google.genomics.v1.ReadGroup.name]).
#[prost(string, tag = "2")]
pub read_group_id: ::prost::alloc::string::String,
/// The ID of the read group set this read belongs to. A read belongs to
/// exactly one read group set.
#[prost(string, tag = "3")]
pub read_group_set_id: ::prost::alloc::string::String,
/// The fragment name. Equivalent to QNAME (query template name) in SAM.
#[prost(string, tag = "4")]
pub fragment_name: ::prost::alloc::string::String,
/// The orientation and the distance between reads from the fragment are
/// consistent with the sequencing protocol (SAM flag 0x2).
#[prost(bool, tag = "5")]
pub proper_placement: bool,
/// The fragment is a PCR or optical duplicate (SAM flag 0x400).
#[prost(bool, tag = "6")]
pub duplicate_fragment: bool,
/// The observed length of the fragment, equivalent to TLEN in SAM.
#[prost(int32, tag = "7")]
pub fragment_length: i32,
/// The read number in sequencing. 0-based and less than numberReads. This
/// field replaces SAM flag 0x40 and 0x80.
#[prost(int32, tag = "8")]
pub read_number: i32,
/// The number of reads in the fragment (extension to SAM flag 0x1).
#[prost(int32, tag = "9")]
pub number_reads: i32,
/// Whether this read did not pass filters, such as platform or vendor quality
/// controls (SAM flag 0x200).
#[prost(bool, tag = "10")]
pub failed_vendor_quality_checks: bool,
/// The linear alignment for this alignment record. This field is null for
/// unmapped reads.
#[prost(message, optional, tag = "11")]
pub alignment: ::core::option::Option<LinearAlignment>,
/// Whether this alignment is secondary. Equivalent to SAM flag 0x100.
/// A secondary alignment represents an alternative to the primary alignment
/// for this read. Aligners may return secondary alignments if a read can map
/// ambiguously to multiple coordinates in the genome. By convention, each read
/// has one and only one alignment where both `secondaryAlignment`
/// and `supplementaryAlignment` are false.
#[prost(bool, tag = "12")]
pub secondary_alignment: bool,
/// Whether this alignment is supplementary. Equivalent to SAM flag 0x800.
/// Supplementary alignments are used in the representation of a chimeric
/// alignment. In a chimeric alignment, a read is split into multiple
/// linear alignments that map to different reference contigs. The first
/// linear alignment in the read will be designated as the representative
/// alignment; the remaining linear alignments will be designated as
/// supplementary alignments. These alignments may have different mapping
/// quality scores. In each linear alignment in a chimeric alignment, the read
/// will be hard clipped. The `alignedSequence` and
/// `alignedQuality` fields in the alignment record will only
/// represent the bases for its respective linear alignment.
#[prost(bool, tag = "13")]
pub supplementary_alignment: bool,
/// The bases of the read sequence contained in this alignment record,
/// **without CIGAR operations applied** (equivalent to SEQ in SAM).
/// `alignedSequence` and `alignedQuality` may be
/// shorter than the full read sequence and quality. This will occur if the
/// alignment is part of a chimeric alignment, or if the read was trimmed. When
/// this occurs, the CIGAR for this read will begin/end with a hard clip
/// operator that will indicate the length of the excised sequence.
#[prost(string, tag = "14")]
pub aligned_sequence: ::prost::alloc::string::String,
/// The quality of the read sequence contained in this alignment record
/// (equivalent to QUAL in SAM).
/// `alignedSequence` and `alignedQuality` may be shorter than the full read
/// sequence and quality. This will occur if the alignment is part of a
/// chimeric alignment, or if the read was trimmed. When this occurs, the CIGAR
/// for this read will begin/end with a hard clip operator that will indicate
/// the length of the excised sequence.
#[prost(int32, repeated, tag = "15")]
pub aligned_quality: ::prost::alloc::vec::Vec<i32>,
/// The mapping of the primary alignment of the
/// `(readNumber+1)%numberReads` read in the fragment. It replaces
/// mate position and mate strand in SAM.
#[prost(message, optional, tag = "16")]
pub next_mate_position: ::core::option::Option<Position>,
/// A map of additional read alignment information. This must be of the form
/// map<string, string\[\]> (string key mapping to a list of string values).
#[prost(btree_map = "string, message", tag = "17")]
pub info: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost_types::ListValue,
>,
}
/// A read group set is a logical collection of read groups, which are
/// collections of reads produced by a sequencer. A read group set typically
/// models reads corresponding to one sample, sequenced one way, and aligned one
/// way.
///
/// * A read group set belongs to one dataset.
/// * A read group belongs to one read group set.
/// * A read belongs to one read group.
///
/// For more genomics resource definitions, see [Fundamentals of Google
/// Genomics](<https://cloud.google.com/genomics/fundamentals-of-google-genomics>)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadGroupSet {
/// The server-generated read group set ID, unique for all read group sets.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The dataset to which this read group set belongs.
#[prost(string, tag = "2")]
pub dataset_id: ::prost::alloc::string::String,
/// The reference set to which the reads in this read group set are aligned.
#[prost(string, tag = "3")]
pub reference_set_id: ::prost::alloc::string::String,
/// The read group set name. By default this will be initialized to the sample
/// name of the sequenced data contained in this set.
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
/// The filename of the original source file for this read group set, if any.
#[prost(string, tag = "5")]
pub filename: ::prost::alloc::string::String,
/// The read groups in this set. There are typically 1-10 read groups in a read
/// group set.
#[prost(message, repeated, tag = "6")]
pub read_groups: ::prost::alloc::vec::Vec<ReadGroup>,
/// A map of additional read group set information.
#[prost(btree_map = "string, message", tag = "7")]
pub info: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost_types::ListValue,
>,
}
/// The read group set search request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReadGroupSetsRequest {
/// Restricts this query to read group sets within the given datasets. At least
/// one ID must be provided.
#[prost(string, repeated, tag = "1")]
pub dataset_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Only return read group sets for which a substring of the name matches this
/// string.
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of results to return in a single page. If unspecified,
/// defaults to 256. The maximum value is 1024.
#[prost(int32, tag = "4")]
pub page_size: i32,
}
/// The read group set search response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReadGroupSetsResponse {
/// The list of matching read group sets.
#[prost(message, repeated, tag = "1")]
pub read_group_sets: ::prost::alloc::vec::Vec<ReadGroupSet>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The read group set import request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportReadGroupSetsRequest {
/// Required. The ID of the dataset these read group sets will belong to. The
/// caller must have WRITE permissions to this dataset.
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
/// The reference set to which the imported read group sets are aligned to, if
/// any. The reference names of this reference set must be a superset of those
/// found in the imported file headers. If no reference set id is provided, a
/// best effort is made to associate with a matching reference set.
#[prost(string, tag = "4")]
pub reference_set_id: ::prost::alloc::string::String,
/// A list of URIs pointing at [BAM
/// files](<https://samtools.github.io/hts-specs/SAMv1.pdf>)
/// in Google Cloud Storage.
/// Those URIs can include wildcards (*), but do not add or remove
/// matching files before import has completed.
///
/// Note that Google Cloud Storage object listing is only eventually
/// consistent: files added may be not be immediately visible to
/// everyone. Thus, if using a wildcard it is preferable not to start
/// the import immediately after the files are created.
#[prost(string, repeated, tag = "2")]
pub source_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The partition strategy describes how read groups are partitioned into read
/// group sets.
#[prost(
enumeration = "import_read_group_sets_request::PartitionStrategy",
tag = "5"
)]
pub partition_strategy: i32,
}
/// Nested message and enum types in `ImportReadGroupSetsRequest`.
pub mod import_read_group_sets_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum PartitionStrategy {
Unspecified = 0,
/// In most cases, this strategy yields one read group set per file. This is
/// the default behavior.
///
/// Allocate one read group set per file per sample. For BAM files, read
/// groups are considered to share a sample if they have identical sample
/// names. Furthermore, all reads for each file which do not belong to a read
/// group, if any, will be grouped into a single read group set per-file.
PerFilePerSample = 1,
/// Includes all read groups in all imported files into a single read group
/// set. Requires that the headers for all imported files are equivalent. All
/// reads which do not belong to a read group, if any, will be grouped into a
/// separate read group set.
MergeAll = 2,
}
impl PartitionStrategy {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
PartitionStrategy::Unspecified => "PARTITION_STRATEGY_UNSPECIFIED",
PartitionStrategy::PerFilePerSample => "PER_FILE_PER_SAMPLE",
PartitionStrategy::MergeAll => "MERGE_ALL",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PARTITION_STRATEGY_UNSPECIFIED" => Some(Self::Unspecified),
"PER_FILE_PER_SAMPLE" => Some(Self::PerFilePerSample),
"MERGE_ALL" => Some(Self::MergeAll),
_ => None,
}
}
}
}
/// The read group set import response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportReadGroupSetsResponse {
/// IDs of the read group sets that were created.
#[prost(string, repeated, tag = "1")]
pub read_group_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// The read group set export request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportReadGroupSetRequest {
/// Required. The Google Cloud project ID that owns this
/// export. The caller must have WRITE access to this project.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// Required. A Google Cloud Storage URI for the exported BAM file.
/// The currently authenticated user must have write access to the new file.
/// An error will be returned if the URI already contains data.
#[prost(string, tag = "2")]
pub export_uri: ::prost::alloc::string::String,
/// Required. The ID of the read group set to export. The caller must have
/// READ access to this read group set.
#[prost(string, tag = "3")]
pub read_group_set_id: ::prost::alloc::string::String,
/// The reference names to export. If this is not specified, all reference
/// sequences, including unmapped reads, are exported.
/// Use `*` to export only unmapped reads.
#[prost(string, repeated, tag = "4")]
pub reference_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateReadGroupSetRequest {
/// The ID of the read group set to be updated. The caller must have WRITE
/// permissions to the dataset associated with this read group set.
#[prost(string, tag = "1")]
pub read_group_set_id: ::prost::alloc::string::String,
/// The new read group set data. See `updateMask` for details on mutability of
/// fields.
#[prost(message, optional, tag = "2")]
pub read_group_set: ::core::option::Option<ReadGroupSet>,
/// An optional mask specifying which fields to update. Supported fields:
///
/// * [name][google.genomics.v1.ReadGroupSet.name].
/// * [referenceSetId][google.genomics.v1.ReadGroupSet.reference_set_id].
///
/// Leaving `updateMask` unset is equivalent to specifying all mutable
/// fields.
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteReadGroupSetRequest {
/// The ID of the read group set to be deleted. The caller must have WRITE
/// permissions to the dataset associated with this read group set.
#[prost(string, tag = "1")]
pub read_group_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReadGroupSetRequest {
/// The ID of the read group set.
#[prost(string, tag = "1")]
pub read_group_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCoverageBucketsRequest {
/// Required. The ID of the read group set over which coverage is requested.
#[prost(string, tag = "1")]
pub read_group_set_id: ::prost::alloc::string::String,
/// The name of the reference to query, within the reference set associated
/// with this query. Optional.
#[prost(string, tag = "3")]
pub reference_name: ::prost::alloc::string::String,
/// The start position of the range on the reference, 0-based inclusive. If
/// specified, `referenceName` must also be specified. Defaults to 0.
#[prost(int64, tag = "4")]
pub start: i64,
/// The end position of the range on the reference, 0-based exclusive. If
/// specified, `referenceName` must also be specified. If unset or 0, defaults
/// to the length of the reference.
#[prost(int64, tag = "5")]
pub end: i64,
/// The desired width of each reported coverage bucket in base pairs. This
/// will be rounded down to the nearest precomputed bucket width; the value
/// of which is returned as `bucketWidth` in the response. Defaults
/// to infinity (each bucket spans an entire reference sequence) or the length
/// of the target range, if specified. The smallest precomputed
/// `bucketWidth` is currently 2048 base pairs; this is subject to
/// change.
#[prost(int64, tag = "6")]
pub target_bucket_width: i64,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "7")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of results to return in a single page. If unspecified,
/// defaults to 1024. The maximum value is 2048.
#[prost(int32, tag = "8")]
pub page_size: i32,
}
/// A bucket over which read coverage has been precomputed. A bucket corresponds
/// to a specific range of the reference sequence.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CoverageBucket {
/// The genomic coordinate range spanned by this bucket.
#[prost(message, optional, tag = "1")]
pub range: ::core::option::Option<Range>,
/// The average number of reads which are aligned to each individual
/// reference base in this bucket.
#[prost(float, tag = "2")]
pub mean_coverage: f32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCoverageBucketsResponse {
/// The length of each coverage bucket in base pairs. Note that buckets at the
/// end of a reference sequence may be shorter. This value is omitted if the
/// bucket width is infinity (the default behaviour, with no range or
/// `targetBucketWidth`).
#[prost(int64, tag = "1")]
pub bucket_width: i64,
/// The coverage buckets. The list of buckets is sparse; a bucket with 0
/// overlapping reads is not returned. A bucket never crosses more than one
/// reference sequence. Each bucket has width `bucketWidth`, unless
/// its end is the end of the reference sequence.
#[prost(message, repeated, tag = "2")]
pub coverage_buckets: ::prost::alloc::vec::Vec<CoverageBucket>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "3")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The read search request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReadsRequest {
/// The IDs of the read groups sets within which to search for reads. All
/// specified read group sets must be aligned against a common set of reference
/// sequences; this defines the genomic coordinates for the query. Must specify
/// one of `readGroupSetIds` or `readGroupIds`.
#[prost(string, repeated, tag = "1")]
pub read_group_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The IDs of the read groups within which to search for reads. All specified
/// read groups must belong to the same read group sets. Must specify one of
/// `readGroupSetIds` or `readGroupIds`.
#[prost(string, repeated, tag = "5")]
pub read_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The reference sequence name, for example `chr1`, `1`, or `chrX`. If set to
/// `*`, only unmapped reads are returned. If unspecified, all reads (mapped
/// and unmapped) are returned.
#[prost(string, tag = "7")]
pub reference_name: ::prost::alloc::string::String,
/// The start position of the range on the reference, 0-based inclusive. If
/// specified, `referenceName` must also be specified.
#[prost(int64, tag = "8")]
pub start: i64,
/// The end position of the range on the reference, 0-based exclusive. If
/// specified, `referenceName` must also be specified.
#[prost(int64, tag = "9")]
pub end: i64,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of results to return in a single page. If unspecified,
/// defaults to 256. The maximum value is 2048.
#[prost(int32, tag = "4")]
pub page_size: i32,
}
/// The read search response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReadsResponse {
/// The list of matching alignments sorted by mapped genomic coordinate,
/// if any, ascending in position within the same reference. Unmapped reads,
/// which have no position, are returned contiguously and are sorted in
/// ascending lexicographic order by fragment name.
#[prost(message, repeated, tag = "1")]
pub alignments: ::prost::alloc::vec::Vec<Read>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The stream reads request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamReadsRequest {
/// The Google Cloud project ID which will be billed
/// for this access. The caller must have WRITE access to this project.
/// Required.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// The ID of the read group set from which to stream reads.
#[prost(string, tag = "2")]
pub read_group_set_id: ::prost::alloc::string::String,
/// The reference sequence name, for example `chr1`,
/// `1`, or `chrX`. If set to *, only unmapped reads are
/// returned.
#[prost(string, tag = "3")]
pub reference_name: ::prost::alloc::string::String,
/// The start position of the range on the reference, 0-based inclusive. If
/// specified, `referenceName` must also be specified.
#[prost(int64, tag = "4")]
pub start: i64,
/// The end position of the range on the reference, 0-based exclusive. If
/// specified, `referenceName` must also be specified.
#[prost(int64, tag = "5")]
pub end: i64,
/// Restricts results to a shard containing approximately `1/totalShards`
/// of the normal response payload for this query. Results from a sharded
/// request are disjoint from those returned by all queries which differ only
/// in their shard parameter. A shard may yield 0 results; this is especially
/// likely for large values of `totalShards`.
///
/// Valid values are `[0, totalShards)`.
#[prost(int32, tag = "6")]
pub shard: i32,
/// Specifying `totalShards` causes a disjoint subset of the normal response
/// payload to be returned for each query with a unique `shard` parameter
/// specified. A best effort is made to yield equally sized shards. Sharding
/// can be used to distribute processing amongst workers, where each worker is
/// assigned a unique `shard` number and all workers specify the same
/// `totalShards` number. The union of reads returned for all sharded queries
/// `[0, totalShards)` is equal to those returned by a single unsharded query.
///
/// Queries for different values of `totalShards` with common divisors will
/// share shard boundaries. For example, streaming `shard` 2 of 5
/// `totalShards` yields the same results as streaming `shard`s 4 and 5 of 10
/// `totalShards`. This property can be leveraged for adaptive retries.
#[prost(int32, tag = "7")]
pub total_shards: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamReadsResponse {
#[prost(message, repeated, tag = "1")]
pub alignments: ::prost::alloc::vec::Vec<Read>,
}
/// Generated client implementations.
pub mod streaming_read_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct StreamingReadServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> StreamingReadServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> StreamingReadServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
StreamingReadServiceClient::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Returns a stream of all the reads matching the search request, ordered
/// by reference name, position, and ID.
pub async fn stream_reads(
&mut self,
request: impl tonic::IntoRequest<super::StreamReadsRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::StreamReadsResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.StreamingReadService/StreamReads",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.StreamingReadService",
"StreamReads",
),
);
self.inner.server_streaming(req, path, codec).await
}
}
}
/// Generated client implementations.
pub mod read_service_v1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// The Readstore. A data store for DNA sequencing Reads.
#[derive(Debug, Clone)]
pub struct ReadServiceV1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ReadServiceV1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ReadServiceV1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
ReadServiceV1Client::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Creates read group sets by asynchronously importing the provided
/// information.
///
/// For the definitions of read group sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// The caller must have WRITE permissions to the dataset.
///
/// ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import
///
/// - Tags will be converted to strings - tag types are not preserved
/// - Comments (`@CO`) in the input file header will not be preserved
/// - Original header order of references (`@SQ`) will not be preserved
/// - Any reverse stranded unmapped reads will be reverse complemented, and
/// their qualities (also the "BQ" and "OQ" tags, if any) will be reversed
/// - Unmapped reads will be stripped of positional information (reference name
/// and position)
pub async fn import_read_group_sets(
&mut self,
request: impl tonic::IntoRequest<super::ImportReadGroupSetsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/ImportReadGroupSets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReadServiceV1",
"ImportReadGroupSets",
),
);
self.inner.unary(req, path, codec).await
}
/// Exports a read group set to a BAM file in Google Cloud Storage.
///
/// For the definitions of read group sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Note that currently there may be some differences between exported BAM
/// files and the original BAM file at the time of import. See
/// [ImportReadGroupSets][google.genomics.v1.ReadServiceV1.ImportReadGroupSets]
/// for caveats.
pub async fn export_read_group_set(
&mut self,
request: impl tonic::IntoRequest<super::ExportReadGroupSetRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/ExportReadGroupSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReadServiceV1",
"ExportReadGroupSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Searches for read group sets matching the criteria.
///
/// For the definitions of read group sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Implements
/// [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135).
pub async fn search_read_group_sets(
&mut self,
request: impl tonic::IntoRequest<super::SearchReadGroupSetsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchReadGroupSetsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/SearchReadGroupSets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReadServiceV1",
"SearchReadGroupSets",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a read group set.
///
/// For the definitions of read group sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// This method supports patch semantics.
pub async fn update_read_group_set(
&mut self,
request: impl tonic::IntoRequest<super::UpdateReadGroupSetRequest>,
) -> std::result::Result<tonic::Response<super::ReadGroupSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/UpdateReadGroupSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReadServiceV1",
"UpdateReadGroupSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a read group set.
///
/// For the definitions of read group sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn delete_read_group_set(
&mut self,
request: impl tonic::IntoRequest<super::DeleteReadGroupSetRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/DeleteReadGroupSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReadServiceV1",
"DeleteReadGroupSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a read group set by ID.
///
/// For the definitions of read group sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn get_read_group_set(
&mut self,
request: impl tonic::IntoRequest<super::GetReadGroupSetRequest>,
) -> std::result::Result<tonic::Response<super::ReadGroupSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/GetReadGroupSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReadServiceV1",
"GetReadGroupSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists fixed width coverage buckets for a read group set, each of which
/// correspond to a range of a reference sequence. Each bucket summarizes
/// coverage information across its corresponding genomic range.
///
/// For the definitions of read group sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Coverage is defined as the number of reads which are aligned to a given
/// base in the reference sequence. Coverage buckets are available at several
/// precomputed bucket widths, enabling retrieval of various coverage 'zoom
/// levels'. The caller must have READ permissions for the target read group
/// set.
pub async fn list_coverage_buckets(
&mut self,
request: impl tonic::IntoRequest<super::ListCoverageBucketsRequest>,
) -> std::result::Result<
tonic::Response<super::ListCoverageBucketsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/ListCoverageBuckets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReadServiceV1",
"ListCoverageBuckets",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a list of reads for one or more read group sets.
///
/// For the definitions of read group sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Reads search operates over a genomic coordinate space of reference sequence
/// & position defined over the reference sequences to which the requested
/// read group sets are aligned.
///
/// If a target positional range is specified, search returns all reads whose
/// alignment to the reference genome overlap the range. A query which
/// specifies only read group set IDs yields all reads in those read group
/// sets, including unmapped reads.
///
/// All reads returned (including reads on subsequent pages) are ordered by
/// genomic coordinate (by reference sequence, then position). Reads with
/// equivalent genomic coordinates are returned in an unspecified order. This
/// order is consistent, such that two queries for the same content (regardless
/// of page size) yield reads in the same order across their respective streams
/// of paginated responses.
///
/// Implements
/// [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85).
pub async fn search_reads(
&mut self,
request: impl tonic::IntoRequest<super::SearchReadsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchReadsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/SearchReads",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.genomics.v1.ReadServiceV1", "SearchReads"),
);
self.inner.unary(req, path, codec).await
}
}
}
/// Metadata describes a single piece of variant call metadata.
/// These data include a top level key and either a single value string (value)
/// or a list of key-value pairs (info.)
/// Value and info are mutually exclusive.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariantSetMetadata {
/// The top-level key.
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
/// The value field for simple metadata
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
/// User-provided ID field, not enforced by this API.
/// Two or more pieces of structured metadata with identical
/// id and key fields are considered equivalent.
#[prost(string, tag = "4")]
pub id: ::prost::alloc::string::String,
/// The type of data. Possible types include: Integer, Float,
/// Flag, Character, and String.
#[prost(enumeration = "variant_set_metadata::Type", tag = "5")]
pub r#type: i32,
/// The number of values that can be included in a field described by this
/// metadata.
#[prost(string, tag = "8")]
pub number: ::prost::alloc::string::String,
/// A textual description of this metadata.
#[prost(string, tag = "7")]
pub description: ::prost::alloc::string::String,
/// Remaining structured metadata key-value pairs. This must be of the form
/// map<string, string\[\]> (string key mapping to a list of string values).
#[prost(btree_map = "string, message", tag = "3")]
pub info: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost_types::ListValue,
>,
}
/// Nested message and enum types in `VariantSetMetadata`.
pub mod variant_set_metadata {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Integer = 1,
Float = 2,
Flag = 3,
Character = 4,
String = 5,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::Integer => "INTEGER",
Type::Float => "FLOAT",
Type::Flag => "FLAG",
Type::Character => "CHARACTER",
Type::String => "STRING",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"INTEGER" => Some(Self::Integer),
"FLOAT" => Some(Self::Float),
"FLAG" => Some(Self::Flag),
"CHARACTER" => Some(Self::Character),
"STRING" => Some(Self::String),
_ => None,
}
}
}
}
/// A variant set is a collection of call sets and variants. It contains summary
/// statistics of those contents. A variant set belongs to a dataset.
///
/// For more genomics resource definitions, see [Fundamentals of Google
/// Genomics](<https://cloud.google.com/genomics/fundamentals-of-google-genomics>)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariantSet {
/// The dataset to which this variant set belongs.
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
/// The server-generated variant set ID, unique across all variant sets.
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
/// The reference set to which the variant set is mapped. The reference set
/// describes the alignment provenance of the variant set, while the
/// `referenceBounds` describe the shape of the actual variant data. The
/// reference set's reference names are a superset of those found in the
/// `referenceBounds`.
///
/// For example, given a variant set that is mapped to the GRCh38 reference set
/// and contains a single variant on reference 'X', `referenceBounds` would
/// contain only an entry for 'X', while the associated reference set
/// enumerates all possible references: '1', '2', 'X', 'Y', 'MT', etc.
#[prost(string, tag = "6")]
pub reference_set_id: ::prost::alloc::string::String,
/// A list of all references used by the variants in a variant set
/// with associated coordinate upper bounds for each one.
#[prost(message, repeated, tag = "5")]
pub reference_bounds: ::prost::alloc::vec::Vec<ReferenceBound>,
/// The metadata associated with this variant set.
#[prost(message, repeated, tag = "4")]
pub metadata: ::prost::alloc::vec::Vec<VariantSetMetadata>,
/// User-specified, mutable name.
#[prost(string, tag = "7")]
pub name: ::prost::alloc::string::String,
/// A textual description of this variant set.
#[prost(string, tag = "8")]
pub description: ::prost::alloc::string::String,
}
/// A variant represents a change in DNA sequence relative to a reference
/// sequence. For example, a variant could represent a SNP or an insertion.
/// Variants belong to a variant set.
///
/// For more genomics resource definitions, see [Fundamentals of Google
/// Genomics](<https://cloud.google.com/genomics/fundamentals-of-google-genomics>)
///
/// Each of the calls on a variant represent a determination of genotype with
/// respect to that variant. For example, a call might assign probability of 0.32
/// to the occurrence of a SNP named rs1234 in a sample named NA12345. A call
/// belongs to a call set, which contains related calls typically from one
/// sample.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Variant {
/// The ID of the variant set this variant belongs to.
#[prost(string, tag = "15")]
pub variant_set_id: ::prost::alloc::string::String,
/// The server-generated variant ID, unique across all variants.
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
/// Names for the variant, for example a RefSNP ID.
#[prost(string, repeated, tag = "3")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The date this variant was created, in milliseconds from the epoch.
#[prost(int64, tag = "12")]
pub created: i64,
/// The reference on which this variant occurs.
/// (such as `chr20` or `X`)
#[prost(string, tag = "14")]
pub reference_name: ::prost::alloc::string::String,
/// The position at which this variant occurs (0-based).
/// This corresponds to the first base of the string of reference bases.
#[prost(int64, tag = "16")]
pub start: i64,
/// The end position (0-based) of this variant. This corresponds to the first
/// base after the last base in the reference allele. So, the length of
/// the reference allele is (end - start). This is useful for variants
/// that don't explicitly give alternate bases, for example large deletions.
#[prost(int64, tag = "13")]
pub end: i64,
/// The reference bases for this variant. They start at the given
/// position.
#[prost(string, tag = "6")]
pub reference_bases: ::prost::alloc::string::String,
/// The bases that appear instead of the reference bases.
#[prost(string, repeated, tag = "7")]
pub alternate_bases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// A measure of how likely this variant is to be real.
/// A higher value is better.
#[prost(double, tag = "8")]
pub quality: f64,
/// A list of filters (normally quality filters) this variant has failed.
/// `PASS` indicates this variant has passed all filters.
#[prost(string, repeated, tag = "9")]
pub filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// A map of additional variant information. This must be of the form
/// map<string, string\[\]> (string key mapping to a list of string values).
#[prost(btree_map = "string, message", tag = "10")]
pub info: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost_types::ListValue,
>,
/// The variant calls for this particular variant. Each one represents the
/// determination of genotype with respect to this variant.
#[prost(message, repeated, tag = "11")]
pub calls: ::prost::alloc::vec::Vec<VariantCall>,
}
/// A call represents the determination of genotype with respect to a particular
/// variant. It may include associated information such as quality and phasing.
/// For example, a call might assign a probability of 0.32 to the occurrence of
/// a SNP named rs1234 in a call set with the name NA12345.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariantCall {
/// The ID of the call set this variant call belongs to.
#[prost(string, tag = "8")]
pub call_set_id: ::prost::alloc::string::String,
/// The name of the call set this variant call belongs to.
#[prost(string, tag = "9")]
pub call_set_name: ::prost::alloc::string::String,
/// The genotype of this variant call. Each value represents either the value
/// of the `referenceBases` field or a 1-based index into
/// `alternateBases`. If a variant had a `referenceBases`
/// value of `T` and an `alternateBases`
/// value of `\["A", "C"\]`, and the `genotype` was
/// `\[2, 1\]`, that would mean the call
/// represented the heterozygous value `CA` for this variant.
/// If the `genotype` was instead `\[0, 1\]`, the
/// represented value would be `TA`. Ordering of the
/// genotype values is important if the `phaseset` is present.
/// If a genotype is not called (that is, a `.` is present in the
/// GT string) -1 is returned.
#[prost(int32, repeated, tag = "7")]
pub genotype: ::prost::alloc::vec::Vec<i32>,
/// If this field is present, this variant call's genotype ordering implies
/// the phase of the bases and is consistent with any other variant calls in
/// the same reference sequence which have the same phaseset value.
/// When importing data from VCF, if the genotype data was phased but no
/// phase set was specified this field will be set to `*`.
#[prost(string, tag = "5")]
pub phaseset: ::prost::alloc::string::String,
/// The genotype likelihoods for this variant call. Each array entry
/// represents how likely a specific genotype is for this call. The value
/// ordering is defined by the GL tag in the VCF spec.
/// If Phred-scaled genotype likelihood scores (PL) are available and
/// log10(P) genotype likelihood scores (GL) are not, PL scores are converted
/// to GL scores. If both are available, PL scores are stored in `info`.
#[prost(double, repeated, tag = "6")]
pub genotype_likelihood: ::prost::alloc::vec::Vec<f64>,
/// A map of additional variant call information. This must be of the form
/// map<string, string\[\]> (string key mapping to a list of string values).
#[prost(btree_map = "string, message", tag = "2")]
pub info: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost_types::ListValue,
>,
}
/// A call set is a collection of variant calls, typically for one sample. It
/// belongs to a variant set.
///
/// For more genomics resource definitions, see [Fundamentals of Google
/// Genomics](<https://cloud.google.com/genomics/fundamentals-of-google-genomics>)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CallSet {
/// The server-generated call set ID, unique across all call sets.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The call set name.
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// The sample ID this call set corresponds to.
#[prost(string, tag = "7")]
pub sample_id: ::prost::alloc::string::String,
/// The IDs of the variant sets this call set belongs to. This field must
/// have exactly length one, as a call set belongs to a single variant set.
/// This field is repeated for compatibility with the
/// [GA4GH 0.5.1
/// API](<https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variants.avdl#L76>).
#[prost(string, repeated, tag = "6")]
pub variant_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The date this call set was created in milliseconds from the epoch.
#[prost(int64, tag = "5")]
pub created: i64,
/// A map of additional call set information. This must be of the form
/// map<string, string\[\]> (string key mapping to a list of string values).
#[prost(btree_map = "string, message", tag = "4")]
pub info: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost_types::ListValue,
>,
}
/// ReferenceBound records an upper bound for the starting coordinate of
/// variants in a particular reference.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReferenceBound {
/// The name of the reference associated with this reference bound.
#[prost(string, tag = "1")]
pub reference_name: ::prost::alloc::string::String,
/// An upper bound (inclusive) on the starting coordinate of any
/// variant in the reference sequence.
#[prost(int64, tag = "2")]
pub upper_bound: i64,
}
/// The variant data import request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportVariantsRequest {
/// Required. The variant set to which variant data should be imported.
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
/// A list of URIs referencing variant files in Google Cloud Storage. URIs can
/// include wildcards [as described
/// here](<https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames>).
/// Note that recursive wildcards ('**') are not supported.
#[prost(string, repeated, tag = "2")]
pub source_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The format of the variant data being imported. If unspecified, defaults to
/// to `VCF`.
#[prost(enumeration = "import_variants_request::Format", tag = "3")]
pub format: i32,
/// Convert reference names to the canonical representation.
/// hg19 haploytypes (those reference names containing "_hap")
/// are not modified in any way.
/// All other reference names are modified according to the following rules:
/// The reference name is capitalized.
/// The "chr" prefix is dropped for all autosomes and sex chromsomes.
/// For example "chr17" becomes "17" and "chrX" becomes "X".
/// All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT".
#[prost(bool, tag = "5")]
pub normalize_reference_names: bool,
/// A mapping between info field keys and the InfoMergeOperations to
/// be performed on them. This is plumbed down to the MergeVariantRequests
/// generated by the resulting import job.
#[prost(btree_map = "string, enumeration(InfoMergeOperation)", tag = "6")]
pub info_merge_config: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
i32,
>,
}
/// Nested message and enum types in `ImportVariantsRequest`.
pub mod import_variants_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Format {
Unspecified = 0,
/// VCF (Variant Call Format). The VCF files may be gzip compressed. gVCF is
/// also supported.
Vcf = 1,
/// Complete Genomics masterVarBeta format. The masterVarBeta files may
/// be bzip2 compressed.
CompleteGenomics = 2,
}
impl Format {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Format::Unspecified => "FORMAT_UNSPECIFIED",
Format::Vcf => "FORMAT_VCF",
Format::CompleteGenomics => "FORMAT_COMPLETE_GENOMICS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"FORMAT_VCF" => Some(Self::Vcf),
"FORMAT_COMPLETE_GENOMICS" => Some(Self::CompleteGenomics),
_ => None,
}
}
}
}
/// The variant data import response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportVariantsResponse {
/// IDs of the call sets created during the import.
#[prost(string, repeated, tag = "1")]
pub call_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// The CreateVariantSet request
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateVariantSetRequest {
/// Required. The variant set to be created. Must have a valid `datasetId`.
#[prost(message, optional, tag = "1")]
pub variant_set: ::core::option::Option<VariantSet>,
}
/// The variant data export request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportVariantSetRequest {
/// Required. The ID of the variant set that contains variant data which
/// should be exported. The caller must have READ access to this variant set.
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
/// If provided, only variant call information from the specified call sets
/// will be exported. By default all variant calls are exported.
#[prost(string, repeated, tag = "2")]
pub call_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Required. The Google Cloud project ID that owns the destination
/// BigQuery dataset. The caller must have WRITE access to this project. This
/// project will also own the resulting export job.
#[prost(string, tag = "3")]
pub project_id: ::prost::alloc::string::String,
/// The format for the exported data.
#[prost(enumeration = "export_variant_set_request::Format", tag = "4")]
pub format: i32,
/// Required. The BigQuery dataset to export data to. This dataset must already
/// exist. Note that this is distinct from the Genomics concept of "dataset".
#[prost(string, tag = "5")]
pub bigquery_dataset: ::prost::alloc::string::String,
/// Required. The BigQuery table to export data to.
/// If the table doesn't exist, it will be created. If it already exists, it
/// will be overwritten.
#[prost(string, tag = "6")]
pub bigquery_table: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ExportVariantSetRequest`.
pub mod export_variant_set_request {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Format {
Unspecified = 0,
/// Export the data to Google BigQuery.
Bigquery = 1,
}
impl Format {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Format::Unspecified => "FORMAT_UNSPECIFIED",
Format::Bigquery => "FORMAT_BIGQUERY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"FORMAT_BIGQUERY" => Some(Self::Bigquery),
_ => None,
}
}
}
}
/// The variant set request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVariantSetRequest {
/// Required. The ID of the variant set.
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
}
/// The search variant sets request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchVariantSetsRequest {
/// Exactly one dataset ID must be provided here. Only variant sets which
/// belong to this dataset will be returned.
#[prost(string, repeated, tag = "1")]
pub dataset_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of results to return in a single page. If unspecified,
/// defaults to 1024.
#[prost(int32, tag = "3")]
pub page_size: i32,
}
/// The search variant sets response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchVariantSetsResponse {
/// The variant sets belonging to the requested dataset.
#[prost(message, repeated, tag = "1")]
pub variant_sets: ::prost::alloc::vec::Vec<VariantSet>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
/// The delete variant set request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteVariantSetRequest {
/// The ID of the variant set to be deleted.
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateVariantSetRequest {
/// The ID of the variant to be updated (must already exist).
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
/// The new variant data. Only the variant_set.metadata will be considered
/// for update.
#[prost(message, optional, tag = "2")]
pub variant_set: ::core::option::Option<VariantSet>,
/// An optional mask specifying which fields to update. Supported fields:
///
/// * [metadata][google.genomics.v1.VariantSet.metadata].
/// * [name][google.genomics.v1.VariantSet.name].
/// * [description][google.genomics.v1.VariantSet.description].
///
/// Leaving `updateMask` unset is equivalent to specifying all mutable
/// fields.
#[prost(message, optional, tag = "5")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
/// The variant search request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchVariantsRequest {
/// At most one variant set ID must be provided. Only variants from this
/// variant set will be returned. If omitted, a call set id must be included in
/// the request.
#[prost(string, repeated, tag = "1")]
pub variant_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Only return variants which have exactly this name.
#[prost(string, tag = "2")]
pub variant_name: ::prost::alloc::string::String,
/// Only return variant calls which belong to call sets with these ids.
/// Leaving this blank returns all variant calls. If a variant has no
/// calls belonging to any of these call sets, it won't be returned at all.
#[prost(string, repeated, tag = "3")]
pub call_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Required. Only return variants in this reference sequence.
#[prost(string, tag = "4")]
pub reference_name: ::prost::alloc::string::String,
/// The beginning of the window (0-based, inclusive) for which
/// overlapping variants should be returned. If unspecified, defaults to 0.
#[prost(int64, tag = "5")]
pub start: i64,
/// The end of the window, 0-based exclusive. If unspecified or 0, defaults to
/// the length of the reference.
#[prost(int64, tag = "6")]
pub end: i64,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "7")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of variants to return in a single page. If unspecified,
/// defaults to 5000. The maximum value is 10000.
#[prost(int32, tag = "8")]
pub page_size: i32,
/// The maximum number of calls to return in a single page. Note that this
/// limit may be exceeded in the event that a matching variant contains more
/// calls than the requested maximum. If unspecified, defaults to 5000. The
/// maximum value is 10000.
#[prost(int32, tag = "9")]
pub max_calls: i32,
}
/// The variant search response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchVariantsResponse {
/// The list of matching Variants.
#[prost(message, repeated, tag = "1")]
pub variants: ::prost::alloc::vec::Vec<Variant>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateVariantRequest {
/// The variant to be created.
#[prost(message, optional, tag = "1")]
pub variant: ::core::option::Option<Variant>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateVariantRequest {
/// The ID of the variant to be updated.
#[prost(string, tag = "1")]
pub variant_id: ::prost::alloc::string::String,
/// The new variant data.
#[prost(message, optional, tag = "2")]
pub variant: ::core::option::Option<Variant>,
/// An optional mask specifying which fields to update. At this time, mutable
/// fields are [names][google.genomics.v1.Variant.names] and
/// [info][google.genomics.v1.Variant.info]. Acceptable values are "names" and
/// "info". If unspecified, all mutable fields will be updated.
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteVariantRequest {
/// The ID of the variant to be deleted.
#[prost(string, tag = "1")]
pub variant_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVariantRequest {
/// The ID of the variant.
#[prost(string, tag = "1")]
pub variant_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MergeVariantsRequest {
/// The destination variant set.
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
/// The variants to be merged with existing variants.
#[prost(message, repeated, tag = "2")]
pub variants: ::prost::alloc::vec::Vec<Variant>,
/// A mapping between info field keys and the InfoMergeOperations to
/// be performed on them.
#[prost(btree_map = "string, enumeration(InfoMergeOperation)", tag = "3")]
pub info_merge_config: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
i32,
>,
}
/// The call set search request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchCallSetsRequest {
/// Restrict the query to call sets within the given variant sets. At least one
/// ID must be provided.
#[prost(string, repeated, tag = "1")]
pub variant_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Only return call sets for which a substring of the name matches this
/// string.
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of results to return in a single page. If unspecified,
/// defaults to 1024.
#[prost(int32, tag = "4")]
pub page_size: i32,
}
/// The call set search response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchCallSetsResponse {
/// The list of matching call sets.
#[prost(message, repeated, tag = "1")]
pub call_sets: ::prost::alloc::vec::Vec<CallSet>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCallSetRequest {
/// The call set to be created.
#[prost(message, optional, tag = "1")]
pub call_set: ::core::option::Option<CallSet>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCallSetRequest {
/// The ID of the call set to be updated.
#[prost(string, tag = "1")]
pub call_set_id: ::prost::alloc::string::String,
/// The new call set data.
#[prost(message, optional, tag = "2")]
pub call_set: ::core::option::Option<CallSet>,
/// An optional mask specifying which fields to update. At this time, the only
/// mutable field is [name][google.genomics.v1.CallSet.name]. The only
/// acceptable value is "name". If unspecified, all mutable fields will be
/// updated.
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCallSetRequest {
/// The ID of the call set to be deleted.
#[prost(string, tag = "1")]
pub call_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCallSetRequest {
/// The ID of the call set.
#[prost(string, tag = "1")]
pub call_set_id: ::prost::alloc::string::String,
}
/// The stream variants request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamVariantsRequest {
/// The Google Cloud project ID which will be billed
/// for this access. The caller must have WRITE access to this project.
/// Required.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// The variant set ID from which to stream variants.
#[prost(string, tag = "2")]
pub variant_set_id: ::prost::alloc::string::String,
/// Only return variant calls which belong to call sets with these IDs.
/// Leaving this blank returns all variant calls.
#[prost(string, repeated, tag = "3")]
pub call_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Required. Only return variants in this reference sequence.
#[prost(string, tag = "4")]
pub reference_name: ::prost::alloc::string::String,
/// The beginning of the window (0-based, inclusive) for which
/// overlapping variants should be returned.
#[prost(int64, tag = "5")]
pub start: i64,
/// The end of the window (0-based, exclusive) for which overlapping
/// variants should be returned.
#[prost(int64, tag = "6")]
pub end: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamVariantsResponse {
#[prost(message, repeated, tag = "1")]
pub variants: ::prost::alloc::vec::Vec<Variant>,
}
/// Operations to be performed during import on Variant info fields.
/// These operations are set for each info field in the info_merge_config
/// map of ImportVariantsRequest, which is plumbed down to the
/// MergeVariantRequests generated by the import job.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InfoMergeOperation {
Unspecified = 0,
/// By default, Variant info fields are persisted if the Variant doesn't
/// already exist in the variantset. If the Variant is equivalent to a
/// Variant already in the variantset, the incoming Variant's info field
/// is ignored in favor of that of the already persisted Variant.
IgnoreNew = 1,
/// This operation removes an info field from the incoming Variant
/// and persists this info field in each of the incoming Variant's Calls.
MoveToCalls = 2,
}
impl InfoMergeOperation {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
InfoMergeOperation::Unspecified => "INFO_MERGE_OPERATION_UNSPECIFIED",
InfoMergeOperation::IgnoreNew => "IGNORE_NEW",
InfoMergeOperation::MoveToCalls => "MOVE_TO_CALLS",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INFO_MERGE_OPERATION_UNSPECIFIED" => Some(Self::Unspecified),
"IGNORE_NEW" => Some(Self::IgnoreNew),
"MOVE_TO_CALLS" => Some(Self::MoveToCalls),
_ => None,
}
}
}
/// Generated client implementations.
pub mod streaming_variant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct StreamingVariantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> StreamingVariantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> StreamingVariantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
StreamingVariantServiceClient::new(
InterceptedService::new(inner, interceptor),
)
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Returns a stream of all the variants matching the search request, ordered
/// by reference name, position, and ID.
pub async fn stream_variants(
&mut self,
request: impl tonic::IntoRequest<super::StreamVariantsRequest>,
) -> std::result::Result<
tonic::Response<tonic::codec::Streaming<super::StreamVariantsResponse>>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.StreamingVariantService/StreamVariants",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.StreamingVariantService",
"StreamVariants",
),
);
self.inner.server_streaming(req, path, codec).await
}
}
}
/// Generated client implementations.
pub mod variant_service_v1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct VariantServiceV1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> VariantServiceV1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> VariantServiceV1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
VariantServiceV1Client::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Creates variant data by asynchronously importing the provided information.
///
/// For the definitions of variant sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// The variants for import will be merged with any existing variant that
/// matches its reference sequence, start, end, reference bases, and
/// alternative bases. If no such variant exists, a new one will be created.
///
/// When variants are merged, the call information from the new variant
/// is added to the existing variant, and Variant info fields are merged
/// as specified in
/// [infoMergeConfig][google.genomics.v1.ImportVariantsRequest.info_merge_config].
/// As a special case, for single-sample VCF files, QUAL and FILTER fields will
/// be moved to the call level; these are sometimes interpreted in a
/// call-specific context.
/// Imported VCF headers are appended to the metadata already in a variant set.
pub async fn import_variants(
&mut self,
request: impl tonic::IntoRequest<super::ImportVariantsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/ImportVariants",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"ImportVariants",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new variant set.
///
/// For the definitions of variant sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// The provided variant set must have a valid `datasetId` set - all other
/// fields are optional. Note that the `id` field will be ignored, as this is
/// assigned by the server.
pub async fn create_variant_set(
&mut self,
request: impl tonic::IntoRequest<super::CreateVariantSetRequest>,
) -> std::result::Result<tonic::Response<super::VariantSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/CreateVariantSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"CreateVariantSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Exports variant set data to an external destination.
///
/// For the definitions of variant sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn export_variant_set(
&mut self,
request: impl tonic::IntoRequest<super::ExportVariantSetRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::longrunning::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/ExportVariantSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"ExportVariantSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a variant set by ID.
///
/// For the definitions of variant sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn get_variant_set(
&mut self,
request: impl tonic::IntoRequest<super::GetVariantSetRequest>,
) -> std::result::Result<tonic::Response<super::VariantSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/GetVariantSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"GetVariantSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns a list of all variant sets matching search criteria.
///
/// For the definitions of variant sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Implements
/// [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).
pub async fn search_variant_sets(
&mut self,
request: impl tonic::IntoRequest<super::SearchVariantSetsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchVariantSetsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/SearchVariantSets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"SearchVariantSets",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a variant set including all variants, call sets, and calls within.
/// This is not reversible.
///
/// For the definitions of variant sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn delete_variant_set(
&mut self,
request: impl tonic::IntoRequest<super::DeleteVariantSetRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/DeleteVariantSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"DeleteVariantSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a variant set using patch semantics.
///
/// For the definitions of variant sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn update_variant_set(
&mut self,
request: impl tonic::IntoRequest<super::UpdateVariantSetRequest>,
) -> std::result::Result<tonic::Response<super::VariantSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/UpdateVariantSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"UpdateVariantSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a list of variants matching the criteria.
///
/// For the definitions of variants and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Implements
/// [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).
pub async fn search_variants(
&mut self,
request: impl tonic::IntoRequest<super::SearchVariantsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchVariantsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/SearchVariants",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"SearchVariants",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new variant.
///
/// For the definitions of variants and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn create_variant(
&mut self,
request: impl tonic::IntoRequest<super::CreateVariantRequest>,
) -> std::result::Result<tonic::Response<super::Variant>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/CreateVariant",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"CreateVariant",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a variant.
///
/// For the definitions of variants and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// This method supports patch semantics. Returns the modified variant without
/// its calls.
pub async fn update_variant(
&mut self,
request: impl tonic::IntoRequest<super::UpdateVariantRequest>,
) -> std::result::Result<tonic::Response<super::Variant>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/UpdateVariant",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"UpdateVariant",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a variant.
///
/// For the definitions of variants and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn delete_variant(
&mut self,
request: impl tonic::IntoRequest<super::DeleteVariantRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/DeleteVariant",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"DeleteVariant",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a variant by ID.
///
/// For the definitions of variants and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn get_variant(
&mut self,
request: impl tonic::IntoRequest<super::GetVariantRequest>,
) -> std::result::Result<tonic::Response<super::Variant>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/GetVariant",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.genomics.v1.VariantServiceV1", "GetVariant"),
);
self.inner.unary(req, path, codec).await
}
/// Merges the given variants with existing variants.
///
/// For the definitions of variants and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Each variant will be
/// merged with an existing variant that matches its reference sequence,
/// start, end, reference bases, and alternative bases. If no such variant
/// exists, a new one will be created.
///
/// When variants are merged, the call information from the new variant
/// is added to the existing variant. Variant info fields are merged as
/// specified in the
/// [infoMergeConfig][google.genomics.v1.MergeVariantsRequest.info_merge_config]
/// field of the MergeVariantsRequest.
///
/// Please exercise caution when using this method! It is easy to introduce
/// mistakes in existing variants and difficult to back out of them. For
/// example,
/// suppose you were trying to merge a new variant with an existing one and
/// both
/// variants contain calls that belong to callsets with the same callset ID.
///
/// // Existing variant - irrelevant fields trimmed for clarity
/// {
/// "variantSetId": "10473108253681171589",
/// "referenceName": "1",
/// "start": "10582",
/// "referenceBases": "G",
/// "alternateBases": [
/// "A"
/// ],
/// "calls": [
/// {
/// "callSetId": "10473108253681171589-0",
/// "callSetName": "CALLSET0",
/// "genotype": [
/// 0,
/// 1
/// ],
/// }
/// ]
/// }
///
/// // New variant with conflicting call information
/// {
/// "variantSetId": "10473108253681171589",
/// "referenceName": "1",
/// "start": "10582",
/// "referenceBases": "G",
/// "alternateBases": [
/// "A"
/// ],
/// "calls": [
/// {
/// "callSetId": "10473108253681171589-0",
/// "callSetName": "CALLSET0",
/// "genotype": [
/// 1,
/// 1
/// ],
/// }
/// ]
/// }
///
/// The resulting merged variant would overwrite the existing calls with those
/// from the new variant:
///
/// {
/// "variantSetId": "10473108253681171589",
/// "referenceName": "1",
/// "start": "10582",
/// "referenceBases": "G",
/// "alternateBases": [
/// "A"
/// ],
/// "calls": [
/// {
/// "callSetId": "10473108253681171589-0",
/// "callSetName": "CALLSET0",
/// "genotype": [
/// 1,
/// 1
/// ],
/// }
/// ]
/// }
///
/// This may be the desired outcome, but it is up to the user to determine if
/// if that is indeed the case.
pub async fn merge_variants(
&mut self,
request: impl tonic::IntoRequest<super::MergeVariantsRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/MergeVariants",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"MergeVariants",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a list of call sets matching the criteria.
///
/// For the definitions of call sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Implements
/// [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178).
pub async fn search_call_sets(
&mut self,
request: impl tonic::IntoRequest<super::SearchCallSetsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchCallSetsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/SearchCallSets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"SearchCallSets",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new call set.
///
/// For the definitions of call sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn create_call_set(
&mut self,
request: impl tonic::IntoRequest<super::CreateCallSetRequest>,
) -> std::result::Result<tonic::Response<super::CallSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/CreateCallSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"CreateCallSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Updates a call set.
///
/// For the definitions of call sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// This method supports patch semantics.
pub async fn update_call_set(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCallSetRequest>,
) -> std::result::Result<tonic::Response<super::CallSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/UpdateCallSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"UpdateCallSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a call set.
///
/// For the definitions of call sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn delete_call_set(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCallSetRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/DeleteCallSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.VariantServiceV1",
"DeleteCallSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a call set by ID.
///
/// For the definitions of call sets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn get_call_set(
&mut self,
request: impl tonic::IntoRequest<super::GetCallSetRequest>,
) -> std::result::Result<tonic::Response<super::CallSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/GetCallSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.genomics.v1.VariantServiceV1", "GetCallSet"),
);
self.inner.unary(req, path, codec).await
}
}
}
/// A Dataset is a collection of genomic data.
///
/// For more genomics resource definitions, see [Fundamentals of Google
/// Genomics](<https://cloud.google.com/genomics/fundamentals-of-google-genomics>)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dataset {
/// The server-generated dataset ID, unique across all datasets.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The Google Cloud project ID that this dataset belongs to.
#[prost(string, tag = "2")]
pub project_id: ::prost::alloc::string::String,
/// The dataset name.
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
/// The time this dataset was created, in seconds from the epoch.
#[prost(message, optional, tag = "4")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// The dataset list request.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatasetsRequest {
/// Required. The Google Cloud project ID to list datasets for.
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
/// The maximum number of results to return in a single page. If unspecified,
/// defaults to 50. The maximum value is 1024.
#[prost(int32, tag = "2")]
pub page_size: i32,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
/// The dataset list response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatasetsResponse {
/// The list of matching Datasets.
#[prost(message, repeated, tag = "1")]
pub datasets: ::prost::alloc::vec::Vec<Dataset>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatasetRequest {
/// The dataset to be created. Must contain projectId and name.
#[prost(message, optional, tag = "1")]
pub dataset: ::core::option::Option<Dataset>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDatasetRequest {
/// The ID of the dataset to be updated.
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
/// The new dataset data.
#[prost(message, optional, tag = "2")]
pub dataset: ::core::option::Option<Dataset>,
/// An optional mask specifying which fields to update. At this time, the only
/// mutable field is [name][google.genomics.v1.Dataset.name]. The only
/// acceptable value is "name". If unspecified, all mutable fields will be
/// updated.
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatasetRequest {
/// The ID of the dataset to be deleted.
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UndeleteDatasetRequest {
/// The ID of the dataset to be undeleted.
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatasetRequest {
/// The ID of the dataset.
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod dataset_service_v1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
/// This service manages datasets, which are collections of genomic data.
#[derive(Debug, Clone)]
pub struct DatasetServiceV1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DatasetServiceV1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DatasetServiceV1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
DatasetServiceV1Client::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Lists datasets within a project.
///
/// For the definitions of datasets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn list_datasets(
&mut self,
request: impl tonic::IntoRequest<super::ListDatasetsRequest>,
) -> std::result::Result<
tonic::Response<super::ListDatasetsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/ListDatasets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.DatasetServiceV1",
"ListDatasets",
),
);
self.inner.unary(req, path, codec).await
}
/// Creates a new dataset.
///
/// For the definitions of datasets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn create_dataset(
&mut self,
request: impl tonic::IntoRequest<super::CreateDatasetRequest>,
) -> std::result::Result<tonic::Response<super::Dataset>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/CreateDataset",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.DatasetServiceV1",
"CreateDataset",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a dataset by ID.
///
/// For the definitions of datasets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn get_dataset(
&mut self,
request: impl tonic::IntoRequest<super::GetDatasetRequest>,
) -> std::result::Result<tonic::Response<super::Dataset>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/GetDataset",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.genomics.v1.DatasetServiceV1", "GetDataset"),
);
self.inner.unary(req, path, codec).await
}
/// Updates a dataset.
///
/// For the definitions of datasets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// This method supports patch semantics.
pub async fn update_dataset(
&mut self,
request: impl tonic::IntoRequest<super::UpdateDatasetRequest>,
) -> std::result::Result<tonic::Response<super::Dataset>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/UpdateDataset",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.DatasetServiceV1",
"UpdateDataset",
),
);
self.inner.unary(req, path, codec).await
}
/// Deletes a dataset and all of its contents (all read group sets,
/// reference sets, variant sets, call sets, annotation sets, etc.)
/// This is reversible (up to one week after the deletion) via
/// the
/// [datasets.undelete][google.genomics.v1.DatasetServiceV1.UndeleteDataset]
/// operation.
///
/// For the definitions of datasets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn delete_dataset(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDatasetRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/DeleteDataset",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.DatasetServiceV1",
"DeleteDataset",
),
);
self.inner.unary(req, path, codec).await
}
/// Undeletes a dataset by restoring a dataset which was deleted via this API.
///
/// For the definitions of datasets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// This operation is only possible for a week after the deletion occurred.
pub async fn undelete_dataset(
&mut self,
request: impl tonic::IntoRequest<super::UndeleteDatasetRequest>,
) -> std::result::Result<tonic::Response<super::Dataset>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/UndeleteDataset",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.DatasetServiceV1",
"UndeleteDataset",
),
);
self.inner.unary(req, path, codec).await
}
/// Sets the access control policy on the specified dataset. Replaces any
/// existing policy.
///
/// For the definitions of datasets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// See <a href="/iam/docs/managing-policies#setting_a_policy">Setting a
/// Policy</a> for more information.
pub async fn set_iam_policy(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::iam::v1::SetIamPolicyRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::iam::v1::Policy>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/SetIamPolicy",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.DatasetServiceV1",
"SetIamPolicy",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets the access control policy for the dataset. This is empty if the
/// policy or resource does not exist.
///
/// See <a href="/iam/docs/managing-policies#getting_a_policy">Getting a
/// Policy</a> for more information.
///
/// For the definitions of datasets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn get_iam_policy(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::iam::v1::GetIamPolicyRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::iam::v1::Policy>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/GetIamPolicy",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.DatasetServiceV1",
"GetIamPolicy",
),
);
self.inner.unary(req, path, codec).await
}
/// Returns permissions that a caller has on the specified resource.
/// See <a href="/iam/docs/managing-policies#testing_permissions">Testing
/// Permissions</a> for more information.
///
/// For the definitions of datasets and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
pub async fn test_iam_permissions(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::iam::v1::TestIamPermissionsRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::iam::v1::TestIamPermissionsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/TestIamPermissions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.DatasetServiceV1",
"TestIamPermissions",
),
);
self.inner.unary(req, path, codec).await
}
}
}
/// A reference is a canonical assembled DNA sequence, intended to act as a
/// reference coordinate space for other genomic annotations. A single reference
/// might represent the human chromosome 1 or mitochandrial DNA, for instance. A
/// reference belongs to one or more reference sets.
///
/// For more genomics resource definitions, see [Fundamentals of Google
/// Genomics](<https://cloud.google.com/genomics/fundamentals-of-google-genomics>)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reference {
/// The server-generated reference ID, unique across all references.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The length of this reference's sequence.
#[prost(int64, tag = "2")]
pub length: i64,
/// MD5 of the upper-case sequence excluding all whitespace characters (this
/// is equivalent to SQ:M5 in SAM). This value is represented in lower case
/// hexadecimal format.
#[prost(string, tag = "3")]
pub md5checksum: ::prost::alloc::string::String,
/// The name of this reference, for example `22`.
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
/// The URI from which the sequence was obtained. Typically specifies a FASTA
/// format file.
#[prost(string, tag = "5")]
pub source_uri: ::prost::alloc::string::String,
/// All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally
/// with a version number, for example `GCF_000001405.26`.
#[prost(string, repeated, tag = "6")]
pub source_accessions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// ID from <http://www.ncbi.nlm.nih.gov/taxonomy.> For example, 9606 for human.
#[prost(int32, tag = "7")]
pub ncbi_taxon_id: i32,
}
/// A reference set is a set of references which typically comprise a reference
/// assembly for a species, such as `GRCh38` which is representative
/// of the human genome. A reference set defines a common coordinate space for
/// comparing reference-aligned experimental data. A reference set contains 1 or
/// more references.
///
/// For more genomics resource definitions, see [Fundamentals of Google
/// Genomics](<https://cloud.google.com/genomics/fundamentals-of-google-genomics>)
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReferenceSet {
/// The server-generated reference set ID, unique across all reference sets.
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
/// The IDs of the reference objects that are part of this set.
/// `Reference.md5checksum` must be unique within this set.
#[prost(string, repeated, tag = "2")]
pub reference_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Order-independent MD5 checksum which identifies this reference set. The
/// checksum is computed by sorting all lower case hexidecimal string
/// `reference.md5checksum` (for all reference in this set) in
/// ascending lexicographic order, concatenating, and taking the MD5 of that
/// value. The resulting value is represented in lower case hexadecimal format.
#[prost(string, tag = "3")]
pub md5checksum: ::prost::alloc::string::String,
/// ID from <http://www.ncbi.nlm.nih.gov/taxonomy> (for example, 9606 for human)
/// indicating the species which this reference set is intended to model. Note
/// that contained references may specify a different `ncbiTaxonId`, as
/// assemblies may contain reference sequences which do not belong to the
/// modeled species, for example EBV in a human reference genome.
#[prost(int32, tag = "4")]
pub ncbi_taxon_id: i32,
/// Free text description of this reference set.
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
/// Public id of this reference set, such as `GRCh37`.
#[prost(string, tag = "6")]
pub assembly_id: ::prost::alloc::string::String,
/// The URI from which the references were obtained.
#[prost(string, tag = "7")]
pub source_uri: ::prost::alloc::string::String,
/// All known corresponding accession IDs in INSDC (GenBank/ENA/DDBJ) ideally
/// with a version number, for example `NC_000001.11`.
#[prost(string, repeated, tag = "8")]
pub source_accessions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReferenceSetsRequest {
/// If present, return reference sets for which the
/// [md5checksum][google.genomics.v1.ReferenceSet.md5checksum] matches exactly.
#[prost(string, repeated, tag = "1")]
pub md5checksums: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// If present, return reference sets for which a prefix of any of
/// [sourceAccessions][google.genomics.v1.ReferenceSet.source_accessions]
/// match any of these strings. Accession numbers typically have a main number
/// and a version, for example `NC_000001.11`.
#[prost(string, repeated, tag = "2")]
pub accessions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// If present, return reference sets for which a substring of their
/// `assemblyId` matches this string (case insensitive).
#[prost(string, tag = "3")]
pub assembly_id: ::prost::alloc::string::String,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of results to return in a single page. If unspecified,
/// defaults to 1024. The maximum value is 4096.
#[prost(int32, tag = "5")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReferenceSetsResponse {
/// The matching references sets.
#[prost(message, repeated, tag = "1")]
pub reference_sets: ::prost::alloc::vec::Vec<ReferenceSet>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReferenceSetRequest {
/// The ID of the reference set.
#[prost(string, tag = "1")]
pub reference_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReferencesRequest {
/// If present, return references for which the
/// [md5checksum][google.genomics.v1.Reference.md5checksum] matches exactly.
#[prost(string, repeated, tag = "1")]
pub md5checksums: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// If present, return references for which a prefix of any of
/// [sourceAccessions][google.genomics.v1.Reference.source_accessions] match
/// any of these strings. Accession numbers typically have a main number and a
/// version, for example `GCF_000001405.26`.
#[prost(string, repeated, tag = "2")]
pub accessions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// If present, return only references which belong to this reference set.
#[prost(string, tag = "3")]
pub reference_set_id: ::prost::alloc::string::String,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of results to return in a single page. If unspecified,
/// defaults to 1024. The maximum value is 4096.
#[prost(int32, tag = "5")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReferencesResponse {
/// The matching references.
#[prost(message, repeated, tag = "1")]
pub references: ::prost::alloc::vec::Vec<Reference>,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReferenceRequest {
/// The ID of the reference.
#[prost(string, tag = "1")]
pub reference_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasesRequest {
/// The ID of the reference.
#[prost(string, tag = "1")]
pub reference_id: ::prost::alloc::string::String,
/// The start position (0-based) of this query. Defaults to 0.
#[prost(int64, tag = "2")]
pub start: i64,
/// The end position (0-based, exclusive) of this query. Defaults to the length
/// of this reference.
#[prost(int64, tag = "3")]
pub end: i64,
/// The continuation token, which is used to page through large result sets.
/// To get the next page of results, set this parameter to the value of
/// `nextPageToken` from the previous response.
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
/// The maximum number of bases to return in a single page. If unspecified,
/// defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base
/// pairs).
#[prost(int32, tag = "5")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasesResponse {
/// The offset position (0-based) of the given `sequence` from the
/// start of this `Reference`. This value will differ for each page
/// in a paginated request.
#[prost(int64, tag = "1")]
pub offset: i64,
/// A substring of the bases that make up this reference.
#[prost(string, tag = "2")]
pub sequence: ::prost::alloc::string::String,
/// The continuation token, which is used to page through large result sets.
/// Provide this value in a subsequent request to return the next page of
/// results. This field will be empty if there aren't any additional results.
#[prost(string, tag = "3")]
pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod reference_service_v1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ReferenceServiceV1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ReferenceServiceV1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ReferenceServiceV1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
ReferenceServiceV1Client::new(InterceptedService::new(inner, interceptor))
}
/// Compress requests with the given encoding.
///
/// This requires the server to support it otherwise it might respond with an
/// error.
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
/// Enable decompressing responses.
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
/// Limits the maximum size of a decoded message.
///
/// Default: `4MB`
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
/// Limits the maximum size of an encoded message.
///
/// Default: `usize::MAX`
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
/// Searches for reference sets which match the given criteria.
///
/// For the definitions of references and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Implements
/// [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)
pub async fn search_reference_sets(
&mut self,
request: impl tonic::IntoRequest<super::SearchReferenceSetsRequest>,
) -> std::result::Result<
tonic::Response<super::SearchReferenceSetsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReferenceServiceV1/SearchReferenceSets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReferenceServiceV1",
"SearchReferenceSets",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a reference set.
///
/// For the definitions of references and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Implements
/// [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83).
pub async fn get_reference_set(
&mut self,
request: impl tonic::IntoRequest<super::GetReferenceSetRequest>,
) -> std::result::Result<tonic::Response<super::ReferenceSet>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReferenceServiceV1/GetReferenceSet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReferenceServiceV1",
"GetReferenceSet",
),
);
self.inner.unary(req, path, codec).await
}
/// Searches for references which match the given criteria.
///
/// For the definitions of references and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Implements
/// [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146).
pub async fn search_references(
&mut self,
request: impl tonic::IntoRequest<super::SearchReferencesRequest>,
) -> std::result::Result<
tonic::Response<super::SearchReferencesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReferenceServiceV1/SearchReferences",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReferenceServiceV1",
"SearchReferences",
),
);
self.inner.unary(req, path, codec).await
}
/// Gets a reference.
///
/// For the definitions of references and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Implements
/// [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158).
pub async fn get_reference(
&mut self,
request: impl tonic::IntoRequest<super::GetReferenceRequest>,
) -> std::result::Result<tonic::Response<super::Reference>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReferenceServiceV1/GetReference",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1.ReferenceServiceV1",
"GetReference",
),
);
self.inner.unary(req, path, codec).await
}
/// Lists the bases in a reference, optionally restricted to a range.
///
/// For the definitions of references and other genomics resources, see
/// [Fundamentals of Google
/// Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)
///
/// Implements
/// [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221).
pub async fn list_bases(
&mut self,
request: impl tonic::IntoRequest<super::ListBasesRequest>,
) -> std::result::Result<
tonic::Response<super::ListBasesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReferenceServiceV1/ListBases",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("google.genomics.v1.ReferenceServiceV1", "ListBases"),
);
self.inner.unary(req, path, codec).await
}
}
}