phe.utils.reader¶
| Date: | 3 June, 2016 |
|---|---|
| Author: | Public Health England |
-
class
ParallelVCFReader(vcfs)[source]¶ Bases:
objectRead multiple VCFs in parallel - one position at the time.
Methods
get_records()Generator of records, one position at the time. get_samples()Get the list of sample names from the VCFs. update([ids])Update records in the readers. -
get_records()[source]¶ Generator of records, one position at the time. If a position has more than 1 record in any of the readers, a list of all records with that position is returned. The user can deal appropriately with the records list.
Returns: - chrom: str
Chromosome
- pos: int
Position
- records: dict
Records in dictionary of lists for each sample.
{ "sample1": [record1, record2], "sample2": [record3] }
-