goatools/anno/gpad_reader.py 1 location
|
@@ 180-189 (lines=10) @@
|
| 177 |
|
ifstrm = nopen(fin_gpad) |
| 178 |
|
for line in ifstrm: |
| 179 |
|
# Read header |
| 180 |
|
if ntgpadobj is None: |
| 181 |
|
if line[0] == '!': |
| 182 |
|
if ver is None and line[1:13] == 'gpa-version:': |
| 183 |
|
ver = line[13:].strip() |
| 184 |
|
hdrobj.chkaddhdr(line) |
| 185 |
|
else: |
| 186 |
|
self.hdr = hdrobj.get_hdr() |
| 187 |
|
if hdr_only: |
| 188 |
|
return ga_lst |
| 189 |
|
ntgpadobj = cx.namedtuple("ntgpadobj", " ".join(self.gpad_columns[ver])) |
| 190 |
|
# Read data |
| 191 |
|
if ntgpadobj is not None: |
| 192 |
|
flds = self._split_line(line) |
goatools/anno/gaf_reader.py 1 location
|
@@ 47-56 (lines=10) @@
|
| 44 |
|
with open(fin_gaf) as ifstrm: |
| 45 |
|
for lnum, line in enumerate(ifstrm, 1): |
| 46 |
|
# Read header |
| 47 |
|
if datobj is None: |
| 48 |
|
if line[0] == '!': |
| 49 |
|
if ver is None and line[1:13] == 'gaf-version:': |
| 50 |
|
ver = line[13:].strip() |
| 51 |
|
hdrobj.chkaddhdr(line) |
| 52 |
|
else: |
| 53 |
|
self.hdr = hdrobj.get_hdr() |
| 54 |
|
if hdr_only: |
| 55 |
|
return nts |
| 56 |
|
datobj = GafData(ver, **self.kws) |
| 57 |
|
# Read data |
| 58 |
|
if datobj is not None and line[0] != '!': |
| 59 |
|
# print(lnum, line) |