comparison resfinder/database_tests.md @ 0:a16d245332d6 draft default tip

Uploaded
author dcouvin
date Wed, 08 Dec 2021 01:46:07 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:a16d245332d6
1 # PhenoDB Test
2
3 It is not necessary to test the validity of a database that has just been
4 cloned. The main reason for running tests are to test a database that has been
5 altered. The tests run are by no mean exhaustive and will not guarantee a valid
6 database.
7
8 This file will test the validity of the databases installed in the default
9 locations. These are:
10 - [resfinder app dir]/db_resfinder
11 - [resfinder app dir]/db_pointfinder
12 Where [resfinder app dir] is the root directory of the ResFinder application.
13 You will find the "run_resfinder.py" file in this directory.
14
15 Run the following command to test validity of databases.
16
17 ```bash
18
19 python3 -m doctest database_test.md
20
21 ```
22
23 *Note*: Change the database locations to be tested by changing the first three
24 lines of the python code below in this file.
25
26 ```python
27
28 >>> db_resfinder = "db_resfinder/"
29 >>> db_pointfinder = "db_pointfinder/"
30 ```
31
32 ## Test phenotype.txt and resistens-overview.txt files
33
34 ```python
35
36 >>> from cge.phenotype2genotype.res_profile import PhenoDB
37
38 >>> phenodb = PhenoDB(
39 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
40 ... acquired_file="{}phenotypes.txt".format(db_resfinder),
41 ... point_file="{}campylobacter/resistens-overview.txt".format(db_pointfinder),
42
43 >>> phenodb = PhenoDB(
44 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
45 ... point_file="{}enterococcus_faecalis/resistens-overview.txt".format(db_pointfinder))
46
47 >>> phenodb = PhenoDB(
48 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
49 ... point_file="{}enterococcus_faecium/resistens-overview.txt".format(db_pointfinder))
50
51 >>> phenodb = PhenoDB(
52 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
53 ... point_file="{}escherichia_coli/resistens-overview.txt".format(db_pointfinder))
54
55 >>> phenodb = PhenoDB(
56 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
57 ... point_file="{}helicobacter_pylori/resistens-overview.txt".format(db_pointfinder))
58
59 >>> phenodb = PhenoDB(
60 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
61 ... point_file="{}klebsiella/resistens-overview.txt".format(db_pointfinder))
62
63 >>> phenodb = PhenoDB(
64 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
65 ... point_file="{}mycobacterium_tuberculosis/resistens-overview.txt".format(db_pointfinder))
66
67 >>> phenodb = PhenoDB(
68 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
69 ... point_file="{}neisseria_gonorrhoeae/resistens-overview.txt".format(db_pointfinder))
70
71 >>> phenodb = PhenoDB(
72 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
73 ... point_file="{}plasmodium_falciparum/resistens-overview.txt".format(db_pointfinder))
74
75 >>> phenodb = PhenoDB(
76 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
77 ... point_file="{}salmonella/resistens-overview.txt".format(db_pointfinder))
78
79 >>> phenodb = PhenoDB(
80 ... abclassdef_file="{}antibiotic_classes.txt".format(db_resfinder),
81 ... point_file="{}staphylococcus_aureus/resistens-overview.txt".format(db_pointfinder))
82
83
84 ```