|
13 | 13 |
|
14 | 14 | class DistributedBed(SnpReader): |
15 | 15 | ''' |
16 | | - A class that implements the :class:`SnpReader` interface. It stores :class:`.Bed`-like data in pieces on storage. When requested, it retrieves requested parts of the data. |
| 16 | + A class that implements the :class:`SnpReader` interface. It stores :class:`.Bed`-like data in pieces on storage. When you request data, it retrieves only the needed pieces. |
17 | 17 |
|
18 | 18 | **Constructor:** |
19 | | - :Parameters: * **storage** (:class:`.FileCache` or string) -- Tells where the SNP data was stored. A :class:`.FileCache` instance can be given, which provides a |
20 | | - method to specify cluster-distributed storage. (:class:`.FileCache`'s will **not** be automatically erased and must be user managed.) |
21 | | - A string can be given and will be interpreted as the path of a local directory to use for storage. (The local |
22 | | - directory will **not** be automatically erased and so must be user managed.) |
23 | | - :type storage: :class:`.FileCache` or string. |
| 19 | + :Parameters: **storage** (string or :class:`.FileCache`) -- Tells where the DistirubtedBed data is stored. |
| 20 | + A string can be given and will be interpreted as the path to a directory. |
| 21 | + A :class:`.FileCache` instance can be given, which provides a method to specify cluster-distributed storage. |
| 22 | + :type storage: string or :class:`.FileCache` |
24 | 23 |
|
25 | 24 | ''' |
26 | 25 | def __init__(self, storage): |
@@ -95,25 +94,26 @@ def write(storage, snpreader, piece_per_chrom_count, updater=None, runner=None): |
95 | 94 | If some of the contents already exists in storage, it skips uploading that part of the contents. (To avoid this behavior, |
96 | 95 | clear the storage.) |
97 | 96 |
|
98 | | - :param storage: Tells where to upload SNP data. |
| 97 | + :param storage: Tells where to store SNP data. |
| 98 | + A string can be given and will be interpreted as the path of a local directory to use for storage. (The local |
| 99 | + directory will **not** be automatically erased and so must be user managed.) |
99 | 100 | A :class:`.FileCache` instance can be given, which provides a |
100 | 101 | method to specify cluster-distributed storage. (:class:`.FileCache`'s will **not** be automatically erased and must be user managed.) |
101 | 102 | If `None`, the storage will be in an automatically-erasing temporary directory. (If the TEMP environment variable is set, Python places the temp directory under it.) |
102 | | - A string can be given and will be interpreted as the path of a local directory to use for storage. (The local |
103 | | - directory will **not** be automatically erased and so must be user managed.) |
104 | | - :type storage: :class:`.FileCache` or None or string. |
| 103 | + |
| 104 | + :type storage: string or :class:`.FileCache` or None. |
105 | 105 |
|
106 | | - :param snpreader: A :class:`.Bed` or other :class:`.SnpReader` that with values of 0,1,2, or missing. |
107 | | - (Note that this differs from most other `write`methods that take a :class:`.SnpData`) |
| 106 | + :param snpreader: A :class:`.Bed` or other :class:`.SnpReader` with values of 0,1,2, or missing. |
| 107 | + (Note that this differs from most other `write` methods that take a :class:`.SnpData`) |
108 | 108 | :type snpreader: :class:`.SnpReader` |
109 | 109 |
|
110 | 110 | :param piece_per_chrom_count: The number of pieces in which to store the data from each chromosome. Data is split across |
111 | | - SNPs. If `piece_per_chrom_count` is set to 100 and 22 chromosomes are uploaded, then data will be stored in 2200 pieces. Later, when data is requested |
| 111 | + SNPs. For exmple, if `piece_per_chrom_count` is set to 100 and 22 chromosomes are uploaded, then data will be stored in 2200 pieces. Later, when data is requested |
112 | 112 | only the pieces necessary for the request will be downloaded to local storage. |
113 | 113 | :type piece_per_chrom_count: A number |
114 | 114 |
|
115 | | - :param updater: A single argument function to write logging message to. |
116 | | - :type updater: A lambda such as created by :func:`.log_in_place` |
| 115 | + :param updater: A single argument function to write logging message to, for example, the function created by :func:`.log_in_place`. |
| 116 | + :type updater: A function or lambda |
117 | 117 |
|
118 | 118 | :param runner: a :class:`.Runner`, optional: Tells how to run. |
119 | 119 | (Note that :class:`.Local` and :class:`.LocalMultProc` are good options.) |
|
0 commit comments