In [1]:
from glstring.glstring import *
gls = ("HLA-A*01:01/HLA-A*01:02+HLA-A*24:02|HLA-A*01:03+HLA-A*24:03^"
"HLA-B*08:01+HLA-B*44:01/HLA-B*44:02^"
"HLA-C*01:02^"
"HLA-DRB5*01:01~HLA-DRB1*03:01+HLA-DRB1*04:07:01/HLA-DRB1*04:92")
ver = "3.23.0"
print('gls =', gls)
print('ver =', ver)
In [2]:
g = GlString(gls, ver)
print(g.gls)
In [3]:
print(g.ver)
In [4]:
g.locus_blocks()
Out[4]:
In [5]:
for locus_block in g.locus_blocks():
print(locus_block.gls)
In [6]:
g.locus_blocks()[0].gls
Out[6]:
In [7]:
g.locus_blocks()[0].ver
Out[7]:
In [8]:
g.genotypes()
Out[8]:
In [9]:
for genotype in g.genotypes():
print(genotype.gls)
In [10]:
for locus_block in g.locus_blocks():
print('-' * 40)
print(locus_block.gls)
for genotype in locus_block.genotypes():
print(' >', genotype.gls)
In [11]:
for locus_block in g.locus_blocks():
print('-'*40)
print(locus_block.gls)
for genotype in locus_block.genotypes():
print('>', genotype.gls)
for genotype_block in genotype.genotype_blocks():
print(' >', genotype_block.gls)
In [12]:
for locus_block in g.locus_blocks():
print('-'*40)
print(locus_block.gls)
for genotype_list in locus_block.genotype_lists():
print('->', genotype_list.gls)
for genotype_list_block in genotype_list.genotype_list_blocks():
print('-->', genotype_list_block.gls)
In [ ]:
In [ ]: