Created
April 17, 2014 11:24
-
-
Save flashton2003/10975460 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:b5d9c057e15441865c84a9422297988c0e93d5961f3da2e00ebd3be695766282" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This dictionary has all the 14 serotypes of salmonella in it. It has the different ebgs associated with each one and the different sts in each ebgs." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"sero_ebg_st = {'typhimurium':{1:{'19':140, '34':184, '35':0, '98':0, '99':0, '128':1, '137':0, '159':0, '204':0, '205':0, '209':0, '213':1, '302':0, '313':7, '323':2, '328':0, '332':0, '376':0, '394':0, '429':0, '456':0}, 26:{'15':0}, 54:{'13':0}, 138:{'36':11, 'SLV36':5}}, 'enteritidis':{4:{'11':329, '11SLV':7, '136':0, '168':0, '183':11, '310':0, '366':0, '460':0, '616':0, '640':0, '691':0, '745':0, '814':1, '1479':0}, 93:{'172':0, '180':0}, 32:{'74':1}}, 'agona':{54:{'13':29, '37':0, '1215':0, '1328':0}, 26:{'15':0}, 83:{'463':0}}, 'braenderup':{24:{'22': 5, '21':0, '194':0, '311':8}}, 'infantis':{31:{'32':22, 'SLV32':1, '41':0, '295':0, '1032':0}}, 'parab-java':{19:{'88':4, '127':0, '372':0}, 5:{'43':12, '86':0, '110':0, '149':4, '264':0, '265':0, '266':0, '267':0, '307':1, '325':0, '570':0, '772':0, '896':0}, 32:{'42':2, '423':3, '681':0, '733':0, '734':0}, 155:{'404':0, '679':0}, 59:{'28':2}}, 'kentucky':{164:{'314':3, 'SLV314':1, '832':0}, 56:{'198':10, '727':0}, 15:{'151':0, '152':0, '221':0, '318':0, '723':0}}, 'montevideo':{208:{'749':0, '1491':0}, 39:{'138':4, '748':0, '1518':0}, 4:{'4':3, '81':1, '195':1, '305':0, '316':6, '699':0, '1488':0, '1489':0, '1493':0, '1531':1, '1535':0, '1536':0, '1537':0}}, 'newport':{3:{'45':4, '46':1, '116':0, '121':0, '125':0, '131':0, '157':0, '158':0, '165':0, '184':0, '193':0, '201':0, '211':0, '350':0, '353':0, '355':0, '614':1, '1496':0}, 2:{'5':0, '115':0, '117':0, '118':7, 'SLV118':1, '119':0, '120':0, '122':0, '123':0, '163':0, '164':1, '167':1, '187':0, '189':0, '190':0, '199':0, '223':0, '345':0, '347':0, '351':0, '352':0, '354':0, '375':0}, 35:{'156':1, '166':2, '360':0}, 7:{'31':2, '132':0, '188':0, '191':0, '200':0, '346':0, '348':0, '349':0}, 154:{'807':0, '808':0}}, 'oranienburg':{203:{'1392':0, '1512':0, '1513':0, '1538':0}, 44:{'169':0, '174':4, '320':0, '1515':0, '1516':0, '1553':0}, 45:{'292':0}, 50:{'91':0, '1514':0}, 52:{'179':0}, 41:{'23':0, '47':0, '1522':0, '1523':0}}, 'paratyphi-a':{11:{'495':0, '85':19, 'SLV85':1, '479':0, '494':0, '129':10, '130':1}}, 'stanley':{29:{'29':12, 'DLV29':1, '51':0, 'SLV51':2, '182':0, '1027':0}}, 'typhi':{13:{'1':20, '2':10, 'SLV2':1, '3':0, '8':0, '890':0, '892':0, '911':0}}, 'virchow':{9:{'16':16, 'SLV16':1, 'TLV16':1, '38':0, '181':6, '303':0, '326':0, '359':2, '618':0, '648':1, '755':1}, 70:{'197':6, '333':0}}}" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [], | |
"prompt_number": 2 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"The below code will tell you how many E-burst groups there are in each serotype" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"for serotype in sero_ebg_st:\n", | |
" print serotype, '\\t', len(sero_ebg_st[serotype])" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"parab-java \t5\n", | |
"enteritidis \t3\n", | |
"typhimurium \t4\n", | |
"braenderup \t1\n", | |
"infantis \t1\n", | |
"stanley \t1\n", | |
"oranienburg \t6\n", | |
"virchow \t2\n", | |
"kentucky \t3\n", | |
"agona \t3\n", | |
"typhi \t1\n", | |
"newport \t5\n", | |
"paratyphi-a \t1\n", | |
"montevideo \t3\n" | |
] | |
} | |
], | |
"prompt_number": 6 | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"The below code will tell you the names of the EBGs associated with how many STs there are in each" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [ | |
"serotype_of_interest = 'typhimurium'\n", | |
"\n", | |
"for ebg in sero_ebg_st[serotype_of_interest]:\n", | |
" print ebg, '\\t', len(sero_ebg_st[serotype_of_interest][ebg])" | |
], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"stream": "stdout", | |
"text": [ | |
"1 \t21\n", | |
"26 \t1\n", | |
"138 \t2\n", | |
"54 \t1\n" | |
] | |
} | |
], | |
"prompt_number": 10 | |
}, | |
{ | |
"cell_type": "code", | |
"collapsed": false, | |
"input": [], | |
"language": "python", | |
"metadata": {}, | |
"outputs": [] | |
} | |
], | |
"metadata": {} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment