Skip to content

Commit

Permalink
enhancing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daviortega committed Feb 20, 2017
1 parent a2ffe59 commit e284110
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
10 changes: 0 additions & 10 deletions sampledata/cheaTags.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
Ac_xyl_7922|AX27061_2425|REF_ETEC:AX27061_2425
Al_die_2140|B5T_03398|YP_006822008.1
Al_mac_7736|I876_01960|YP_008194816.1
Al_mac_7736|I876_02000|YP_008194824.1
Al_sp._1413|ambt_16745|YP_004468656.1
Al_vin_90|Alvin_2238|YP_003444189.1
Az_vin_2457|AvCA6_24340|YP_007898455.1
Bo_per_2113|BN118_1442|YP_006626085.1
Ch_sal_1330|Csal_2024|YP_574074.1
Ci_kos_578|CKO_01061|YP_001452640.1
Vi_cho_319|VCA1095|NP_233475.1
Xa_alb_65|XALc_1369|YP_003375864.1
33 changes: 27 additions & 6 deletions tests/test_bitk3.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,12 @@ def test_getAseqFromMist22Gene():
""" Test if it can get Aseq from gene info in MiST22 and pass None if there \
is no protein info """
sampleFile = dataPath + 'mistGenes.json'
expected = ['ulF-SXsxtnFn7TYkYb3hnw', None]
expected = [
'ulF-SXsxtnFn7TYkYb3hnw',
None,
'AtBd-8mQw2yws-ZrpoEQWA',
'BhwWfyWEGmZ3vyzusAAn3g'
]
with open(sampleFile, 'r') as f:
genes = json.load(f)
results = []
Expand All @@ -159,7 +164,11 @@ def test_getMistIDFromMist22Gene():
""" Test if it can get internal protein gene ID from gene \
info in MiST22 """
sampleFile = dataPath + 'mistGenes.json'
expected = [333724, 333725]
expected = [
333724,
333725,
1113403,
241292]
with open(sampleFile, 'r') as f:
genes = json.load(f)
results = []
Expand All @@ -174,7 +183,12 @@ def test_getAccessionFromMist22Gene():
""" Test if it can get Accession from gene info in MiST22 \
and pass None if there is no protein info"""
sampleFile = dataPath + 'mistGenes.json'
expected = ['YP_003444191.1', None]
expected = [
'YP_003444191.1',
None,
'NP_233475.1',
'YP_003375864.1'
]
with open(sampleFile, 'r') as f:
genes = json.load(f)
results = []
Expand All @@ -188,7 +202,12 @@ def test_getAccessionFromMist22Gene():
def test_getLocusFromMist22Gene():
""" Test if it can get Locus from gene info in MiST22 """
sampleFile = dataPath + 'mistGenes.json'
expected = ['Alvin_2240', 'Alvin_2241']
expected = [
'Alvin_2240',
'Alvin_2241',
'VCA1095',
'XALc_1369'
]
with open(sampleFile, 'r') as f:
genes = json.load(f)
results = []
Expand All @@ -202,7 +221,7 @@ def test_getLocusFromMist22Gene():
def test_getGenomeIDFromMist22Gene():
""" Test if it can get GenomeID from gene info in MiST22 """
sampleFile = dataPath + 'mistGenes.json'
expected = [90, 90]
expected = [90, 90, 319, 65]
with open(sampleFile, 'r') as f:
genes = json.load(f)
results = []
Expand Down Expand Up @@ -325,7 +344,9 @@ def test_addBitk3tagTomist22GeneInfo(self):
sampleFile = dataPath + 'mistGenes.json'
expected = [
'Al_vin_90|Alvin_2240|YP_003444191.1',
'Al_vin_90|Alvin_2241|None'
'Al_vin_90|Alvin_2241|None',
'Vi_cho_319|VCA1095|NP_233475.1',
'Xa_alb_65|XALc_1369|YP_003375864.1'
]
with open(sampleFile, 'r') as f:
genes = json.load(f)
Expand Down

0 comments on commit e284110

Please sign in to comment.