wbtools 3.0.7__tar.gz → 3.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wbtools-3.0.7 → wbtools-3.0.8}/PKG-INFO +1 -1
- {wbtools-3.0.7 → wbtools-3.0.8}/setup.py +1 -1
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/db/afp.py +12 -11
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools.egg-info/PKG-INFO +1 -1
- {wbtools-3.0.7 → wbtools-3.0.8}/LICENSE +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/README.md +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/setup.cfg +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/config_reader.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/db/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/db/test_afp.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/db/test_antibody.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/db/test_expression.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/db/test_generic.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/lib/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/lib/entity_extraction/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/lib/entity_extraction/test_email_addresses.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/lib/entity_extraction/test_generic.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/lib/entity_extraction/test_new_variations.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/lib/test_literature_index.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/lib/test_scraping.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/lib/test_text_preprocessing.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/lib/test_text_similarity.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/literature/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/literature/test_corpus.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/tests/literature/test_paper.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/db/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/db/abstract_manager.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/db/antibody.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/db/dbmanager.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/db/expression.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/db/gene.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/db/generic.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/db/paper.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/db/person.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/email/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/email/generic.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/common.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/entity_extraction/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/entity_extraction/email_addresses.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/entity_extraction/ntt_extractor.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/entity_extraction/variations.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/literature_index/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/literature_index/abstract_index.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/literature_index/textpresso.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/text_preprocessing.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/nlp/text_similarity.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/scraping.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/lib/timeout.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/literature/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/literature/corpus.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/literature/paper.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/literature/person.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/utils/__init__.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools/utils/okta_utils.py +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools.egg-info/SOURCES.txt +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools.egg-info/dependency_links.txt +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools.egg-info/requires.txt +0 -0
- {wbtools-3.0.7 → wbtools-3.0.8}/wbtools.egg-info/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="wbtools",
|
|
8
|
-
version="3.0.
|
|
8
|
+
version="3.0.8",
|
|
9
9
|
author="Valerio Arnaboldi",
|
|
10
10
|
author_email="valearna@caltech.edu",
|
|
11
11
|
description="Interface to WormBase (www.wormbase.org) curation data, including literature management and NLP "
|
|
@@ -20,7 +20,8 @@ QUERY_PAPER_IDS_PARTIAL_SUBMISSION = "SELECT distinct afp_ve.joinkey FROM afp_ve
|
|
|
20
20
|
|
|
21
21
|
AFP_ENTITIES_SEPARATOR = " | "
|
|
22
22
|
AFP_IDS_SEPARATOR = ";%;"
|
|
23
|
-
|
|
23
|
+
PAP_AFP_EVIDENCE_CODE_GENE = "Inferred_automatically \"from author first pass afp_genestudied\""
|
|
24
|
+
PAP_AFP_EVIDENCE_CODE_SPECIES = "Inferred_automatically \"from author first pass afp_species\""
|
|
24
25
|
|
|
25
26
|
|
|
26
27
|
class WBAFPDBManager(AbstractWBDBManager):
|
|
@@ -436,17 +437,17 @@ class WBAFPDBManager(AbstractWBDBManager):
|
|
|
436
437
|
def set_pap_gene_list(self, paper_id, person_id):
|
|
437
438
|
with self.get_cursor() as curs:
|
|
438
439
|
curs.execute("SELECT * FROM pap_gene WHERE joinkey = %s AND pap_evidence = %s", (paper_id,
|
|
439
|
-
|
|
440
|
+
PAP_AFP_EVIDENCE_CODE_GENE))
|
|
440
441
|
res_pap = curs.fetchall()
|
|
441
442
|
if res_pap:
|
|
442
443
|
for res in res_pap:
|
|
443
444
|
curs.execute("INSERT INTO h_pap_gene (joinkey, pap_gene, pap_order, pap_curator, pap_evidence) "
|
|
444
445
|
"VALUES('{}', '{}', {}, '{}', '{}')".format(res[0], res[1], res[2], res[3], res[4]))
|
|
445
446
|
curs.execute("DELETE FROM pap_gene WHERE joinkey = '{}' AND pap_evidence = '{}'".format(
|
|
446
|
-
paper_id,
|
|
447
|
+
paper_id, PAP_AFP_EVIDENCE_CODE_GENE))
|
|
447
448
|
max_order = 0
|
|
448
449
|
curs.execute("SELECT MAX(pap_order) FROM pap_gene WHERE joinkey = '{}' AND pap_evidence <> '{}'"
|
|
449
|
-
.format(paper_id,
|
|
450
|
+
.format(paper_id, PAP_AFP_EVIDENCE_CODE_GENE))
|
|
450
451
|
res = curs.fetchone()
|
|
451
452
|
if res and res[0]:
|
|
452
453
|
max_order = int(res[0])
|
|
@@ -459,16 +460,16 @@ class WBAFPDBManager(AbstractWBDBManager):
|
|
|
459
460
|
for afp_id in afp_ids:
|
|
460
461
|
curs.execute("INSERT INTO pap_gene (joinkey, pap_gene, pap_order, pap_curator, pap_evidence) "
|
|
461
462
|
"VALUES('{}', '{}', {}, '{}', '{}')".format(paper_id, afp_id, max_order + 1,
|
|
462
|
-
person_id,
|
|
463
|
+
person_id, PAP_AFP_EVIDENCE_CODE_GENE))
|
|
463
464
|
curs.execute("INSERT INTO h_pap_gene (joinkey, pap_gene, pap_order, pap_curator, pap_evidence) "
|
|
464
465
|
"VALUES('{}', '{}', {}, '{}', '{}')".format(paper_id, afp_id, max_order + 1,
|
|
465
|
-
person_id,
|
|
466
|
+
person_id, PAP_AFP_EVIDENCE_CODE_GENE))
|
|
466
467
|
max_order += 1
|
|
467
468
|
|
|
468
469
|
def set_pap_species_list(self, paper_id, person_id):
|
|
469
470
|
with self.get_cursor() as curs:
|
|
470
471
|
curs.execute("SELECT * FROM pap_species WHERE joinkey = '{}' AND pap_evidence = '{}'".format(
|
|
471
|
-
paper_id,
|
|
472
|
+
paper_id, PAP_AFP_EVIDENCE_CODE_SPECIES))
|
|
472
473
|
res_pap = curs.fetchall()
|
|
473
474
|
if res_pap:
|
|
474
475
|
for res in res_pap:
|
|
@@ -476,10 +477,10 @@ class WBAFPDBManager(AbstractWBDBManager):
|
|
|
476
477
|
"pap_evidence) VALUES('{}', '{}', {}, '{}', '{}')".format(res[0], res[1],
|
|
477
478
|
res[2], res[3], res[4]))
|
|
478
479
|
curs.execute("DELETE FROM pap_species WHERE joinkey = '{}' AND pap_evidence = '{}'".format(
|
|
479
|
-
paper_id,
|
|
480
|
+
paper_id, PAP_AFP_EVIDENCE_CODE_SPECIES))
|
|
480
481
|
max_order = 0
|
|
481
482
|
curs.execute("SELECT MAX(pap_order) FROM pap_species WHERE joinkey = '{}' AND pap_evidence <> '{}'"
|
|
482
|
-
.format(paper_id,
|
|
483
|
+
.format(paper_id, PAP_AFP_EVIDENCE_CODE_SPECIES))
|
|
483
484
|
res = curs.fetchone()
|
|
484
485
|
if res and res[0]:
|
|
485
486
|
max_order = int(res[0])
|
|
@@ -493,10 +494,10 @@ class WBAFPDBManager(AbstractWBDBManager):
|
|
|
493
494
|
curs.execute("INSERT INTO pap_species (joinkey, pap_species, pap_order, pap_curator, pap_evidence) "
|
|
494
495
|
"VALUES('{}', '{}', {}, '{}', '{}')".format(paper_id, res_species_index[0],
|
|
495
496
|
max_order + 1, person_id,
|
|
496
|
-
|
|
497
|
+
PAP_AFP_EVIDENCE_CODE_SPECIES))
|
|
497
498
|
curs.execute("INSERT INTO h_pap_species (joinkey, pap_species, pap_order, pap_curator, "
|
|
498
499
|
"pap_evidence) VALUES('{}', '{}', {}, '{}', '{}')".format(
|
|
499
|
-
paper_id, res_species_index[0], max_order + 1, person_id,
|
|
500
|
+
paper_id, res_species_index[0], max_order + 1, person_id, PAP_AFP_EVIDENCE_CODE_SPECIES))
|
|
500
501
|
max_order += 1
|
|
501
502
|
|
|
502
503
|
def set_contributor(self, paper_id, person_id):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|