@@ -48,21 +48,30 @@ Import `pyard` package.
4848import pyard
4949```
5050
51- The cache size of pre-computed reductions can be changed from the default of 1000 (_ not working_ : will be fixed in a later release.)
52- ``` python
53- pyard.max_cache_size = 1_000_000
54- ```
5551
5652Initialize ` ARD ` object with a version of IMGT HLA database
5753
5854``` python
59- ard = pyard.ARD(3290 )
55+ import pyard
56+
57+ ard = pyard.init(' 3510' )
58+ ```
59+
60+ The cache size of pre-computed reductions can be changed from the default of 1000
61+ ``` python
62+ import pyard
63+
64+ max_cache_size = 1_000_000
65+ ard = pyard.init(' 3510' , cache_size = max_cache_size)
66+
6067```
6168
6269You can specify a different directory for the cached data.
6370
6471``` python
65- ard = pyard.ARD(' 3290' , data_dir = ' /tmp/py-ard' )
72+ import pyard.ard
73+
74+ ard = pyard.init(' 3510' , data_dir = ' /tmp/py-ard' )
6675```
6776
6877You can choose to refresh the MAC code for current IMGT HLA database version
@@ -74,7 +83,9 @@ ard.refresh_mac_codes()
7483The default initialization is to use the latest IMGT HLA database
7584
7685``` python
77- ard = pyard.ARD()
86+ import pyard
87+
88+ ard = pyard.init()
7889```
7990
8091### Reduce Typings
@@ -84,13 +95,13 @@ Reduce a single locus HLA Typing.
8495``` python
8596allele = " A*01:01:01"
8697
87- ard.redux_gl (allele, ' G' )
98+ ard.redux (allele, ' G' )
8899# >>> 'A*01:01:01G'
89100
90- ard.redux_gl (allele, ' lg' )
101+ ard.redux (allele, ' lg' )
91102# >>> 'A*01:01g'
92103
93- ard.redux_gl (allele, ' lgx' )
104+ ard.redux (allele, ' lgx' )
94105# >>> 'A*01:01'
95106```
96107
@@ -99,14 +110,14 @@ Reduce an ambiguous GL String
99110``` python
100111# Reduce GL String
101112#
102- ard.redux_gl (" A*01:01/A*01:01N+A*02:AB^B*07:02+B*07:AB" , " G" )
113+ ard.redux (" A*01:01/A*01:01N+A*02:AB^B*07:02+B*07:AB" , " G" )
103114# 'B*07:02:01G+B*07:02:01G^A*01:01:01G+A*02:01:01G/A*02:02'
104115```
105116
106117You can also reduce serology based typings.
107118
108119``` python
109- ard.redux_gl (' B14' , ' lg' )
120+ ard.redux (' B14' , ' lg' )
110121# >>> 'B*14:01g/B*14:02g/B*14:03g/B*14:04g/B*14:05g/B*14:06g/B*14:08g/B*14:09g/B*14:10g/B*14:11g/B*14:12g/B*14:13g/B*14:14g/B*14:15g/B*14:16g/B*14:17g/B*14:18g/B*14:19g/B*14:20g/B*14:21g/B*14:22g/B*14:23g/B*14:24g/B*14:25g/B*14:26g/B*14:27g/B*14:28g/B*14:29g/B*14:30g/B*14:31g/B*14:32g/B*14:33g/B*14:34g/B*14:35g/B*14:36g/B*14:37g/B*14:38g/B*14:39g/B*14:40g/B*14:42g/B*14:43g/B*14:44g/B*14:45g/B*14:46g/B*14:47g/B*14:48g/B*14:49g/B*14:50g/B*14:51g/B*14:52g/B*14:53g/B*14:54g/B*14:55g/B*14:56g/B*14:57g/B*14:58g/B*14:59g/B*14:60g/B*14:62g/B*14:63g/B*14:65g/B*14:66g/B*14:68g/B*14:70Qg/B*14:71g/B*14:73g/B*14:74g/B*14:75g/B*14:77g/B*14:82g/B*14:83g/B*14:86g/B*14:87g/B*14:88g/B*14:90g/B*14:93g/B*14:94g/B*14:95g/B*14:96g/B*14:97g/B*14:99g/B*14:102g'
111122```
112123
0 commit comments