annotate resfinder/cge/phenotype2genotype/phenotype.py @ 0:55051a9bc58d draft default tip

Uploaded
author dcouvin
date Mon, 10 Jan 2022 20:06:07 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
1 #!/usr/bin/env python3
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
2
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
3
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
4 class Phenotype():
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
5 """ A Phenotype object describes the antibiotics a feature/gene causes
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
6 resistance and susceptibility against.
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
7 unique_id: the id is used to locate the specified phenotype.
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
8 phenotype: Tuple of antibiotics that gene causes resistance toward.
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
9 ab_class: Class of resistance (e.g. Beta-Lactamase).
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
10 pub_phenotype: Tuple of published resistance (antibiotics).
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
11 pmid: Tuple of PubMed IDs of publications presenting resistance and
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
12 susceptibility.
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
13 susceptibility: Tuple of antibiotics that the gene is known to be
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
14 susceptibil towards.
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
15 gene_class: resistance gene class (e.g. class D)
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
16 notes: String containing other information on the resistance gene.
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
17 species: Species exceptions, where resistance is not observed. NOTE:
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
18 This information is not yet used for anything.
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
19 """
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
20 def __init__(self, unique_id, phenotype, ab_class, sug_phenotype,
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
21 pub_phenotype, pmid, susceptibile=(), gene_class=None,
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
22 notes="", species=None, res_mechanics=None):
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
23 self.unique_id = unique_id
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
24 self.phenotype = phenotype
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
25 self.ab_class = ab_class
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
26
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
27 self.sug_phenotype = sug_phenotype
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
28 self.pub_phenotype = pub_phenotype
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
29 self.pmid = pmid
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
30 self.susceptibile = susceptibile
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
31 self.gene_class = gene_class
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
32 self.notes = notes
55051a9bc58d Uploaded
dcouvin
parents:
diff changeset
33 self.species = species