-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtest-essex.py
executable file
·22 lines (21 loc) · 1018 Bytes
/
test-essex.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python
#=========================================================================
# This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
# License (GPL) version 3, as described at www.opensource.org.
# Copyright (C)2016 William H. Majoros ([email protected]).
#=========================================================================
from __future__ import (absolute_import, division, print_function,
unicode_literals, generators, nested_scopes, with_statement)
from builtins import (bytes, dict, int, list, object, range, str, ascii,
chr, hex, input, next, oct, open, pow, round, super, filter, map, zip)
from EssexParser import EssexParser
import sys
BASE="/Users/bmajoros/python/test/data"
filename=BASE+"/HG00096-1-subset.essex"
parser=EssexParser(filename)
while(True):
root=parser.nextElem()
if(not root): break
#root.printXML(sys.stdout); print("\n")
elem=root.pathQuery("reference-transcript/variants")
if(elem): elem.printXML(sys.stdout); print("\n")