Skip to content

Commit da8c9ee

Browse files
authored
Merge pull request #230 from asherpasha/dev
Updates
2 parents b4bb316 + 5853732 commit da8c9ee

38 files changed

Lines changed: 793 additions & 823 deletions

.github/workflows/bar-api.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
test:
1212

13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
strategy:
1515
matrix:
1616
python-version: [3.8, 3.9, 3.10.14, 3.11, 3.12]

api/resources/gene_information.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,16 @@ def get(self, species="", gene_id=""):
117117
# Get data
118118
rows = db.session.execute(db.select(database).where(database.gene == gene_id)).scalars().all()
119119
for row in rows:
120-
publications.append({"gene_id": row.gene, "author": row.author, "year": row.year, "journal": row.journal, "title": row.title, "pubmed": row.pubmed})
120+
publications.append(
121+
{
122+
"gene_id": row.gene,
123+
"author": row.author,
124+
"year": row.year,
125+
"journal": row.journal,
126+
"title": row.title,
127+
"pubmed": row.pubmed,
128+
}
129+
)
121130

122131
# Return results if there are data
123132
if len(publications) > 0:

api/resources/microarray_gene_expression.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ def get(self, species="", gene_id=""):
2828
return BARUtils.error_exit("Invalid gene id")
2929
else:
3030
return BARUtils.error_exit("Invalid species")
31-
subquery = db.select(AtAgiLookup.probeset).where(AtAgiLookup.agi == gene_id).order_by(AtAgiLookup.date.desc()).limit(1).subquery()
31+
subquery = (
32+
db.select(AtAgiLookup.probeset)
33+
.where(AtAgiLookup.agi == gene_id)
34+
.order_by(AtAgiLookup.date.desc())
35+
.limit(1)
36+
.subquery()
37+
)
3238

3339
sq_query = db.session.query(subquery)
3440
if sq_query.count() > 0:
@@ -37,7 +43,9 @@ def get(self, species="", gene_id=""):
3743
return BARUtils.error_exit("There are no data found for the given gene")
3844

3945
rows = db.session.execute(
40-
db.select(EcotypesSampleData.data_probeset_id, EcotypesSampleData.data_signal, EcotypesSampleData.data_bot_id).where(EcotypesSampleData.data_probeset_id == sq_result)
46+
db.select(
47+
EcotypesSampleData.data_probeset_id, EcotypesSampleData.data_signal, EcotypesSampleData.data_bot_id
48+
).where(EcotypesSampleData.data_probeset_id == sq_result)
4149
).all()
4250
final_json = {}
4351

@@ -46,7 +54,7 @@ def get(self, species="", gene_id=""):
4654
if row[2][5:8] not in final_json:
4755
final_json[row[2][5:8]] = WorldeFPUtils.wrap_json(row[2][5:8], row[2], row[1], row[0])
4856
elif row[2][5:8] in final_json:
49-
final_json[row[2][5:8]]['values'].update({row[2] : row[1]})
57+
final_json[row[2][5:8]]["values"].update({row[2]: row[1]})
5058
return BARUtils.success_exit(final_json)
5159
else:
5260
return BARUtils.error_exit("There are no data found for the given gene")

api/utils/world_efp_utils.py

Lines changed: 245 additions & 243 deletions
Large diffs are not rendered by default.

config/databases/annotations_lookup.sql

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
-- MySQL dump 10.13 Distrib 8.3.0, for Linux (x86_64)
1+
-- MySQL dump 10.13 Distrib 8.4.2, for Linux (x86_64)
22
--
33
-- Host: localhost Database: annotations_lookup
44
-- ------------------------------------------------------
5-
-- Server version 8.3.0
5+
-- Server version 8.4.2
66

77
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
88
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -48,23 +48,14 @@ LOCK TABLES `agi_alias` WRITE;
4848
INSERT INTO `agi_alias` VALUES ('At1g01010','ANAC001','2022-06-30'),('At1g01010','NAC001','2022-06-30'),('At1g01010','NTL10','2022-06-30'),('At1g01020','ARV1','2022-06-30');
4949
/*!40000 ALTER TABLE `agi_alias` ENABLE KEYS */;
5050
UNLOCK TABLES;
51-
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
52-
53-
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
54-
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
55-
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
56-
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
57-
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
58-
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
59-
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6051

6152
--
6253
-- Table structure for table `at_agi_lookup`
6354
--
6455

6556
DROP TABLE IF EXISTS `at_agi_lookup`;
6657
/*!40101 SET @saved_cs_client = @@character_set_client */;
67-
/*!40101 SET character_set_client = utf8 */;
58+
/*!50503 SET character_set_client = utf8mb4 */;
6859
CREATE TABLE `at_agi_lookup` (
6960
`probeset` varchar(60) NOT NULL,
7061
`agi` varchar(30) NOT NULL,
@@ -80,7 +71,7 @@ CREATE TABLE `at_agi_lookup` (
8071

8172
LOCK TABLES `at_agi_lookup` WRITE;
8273
/*!40000 ALTER TABLE `at_agi_lookup` DISABLE KEYS */;
83-
INSERT INTO `at_agi_lookup` VALUES ('261585_at','At1g01010','2010-12-20'),('261585_at','At1g01010','2009-07-29'),('261568_at','At1g01030','2010-12-20');
74+
INSERT INTO `at_agi_lookup` VALUES ('261568_at','At1g01030','2010-12-20'),('261585_at','At1g01010','2009-07-29'),('261585_at','At1g01010','2010-12-20');
8475
/*!40000 ALTER TABLE `at_agi_lookup` ENABLE KEYS */;
8576
UNLOCK TABLES;
8677
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -93,4 +84,4 @@ UNLOCK TABLES;
9384
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
9485
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
9586

96-
-- Dump completed on 2020-06-26 15:59:53
87+
-- Dump completed on 2024-07-29 11:30:25

config/databases/arabidopsis_ecotypes.sql

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
-- MySQL dump 10.13 Distrib 8.0.33, for Linux (x86_64)
1+
-- MySQL dump 10.13 Distrib 8.4.2, for Linux (x86_64)
22
--
33
-- Host: localhost Database: arabidopsis_ecotypes
44
-- ------------------------------------------------------
5-
-- Server version 8.0.33
5+
-- Server version 8.4.2
66

77
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
88
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -16,7 +16,7 @@
1616
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
1717

1818
--
19-
-- Current Database: `arabidopsis_ecotypes.sql`
19+
-- Current Database: `arabidopsis_ecotypes`
2020
--
2121

2222
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `arabidopsis_ecotypes` /*!40100 DEFAULT CHARACTER SET latin1 */ /*!80016 DEFAULT ENCRYPTION='N' */;
@@ -103,10 +103,10 @@ DROP TABLE IF EXISTS `sample_data`;
103103
CREATE TABLE `sample_data` (
104104
`sample_id` int unsigned NOT NULL DEFAULT '0',
105105
`proj_id` varchar(15) NOT NULL DEFAULT '0',
106-
`sample_file_name` tinytext DEFAULT NULL,
106+
`sample_file_name` tinytext,
107107
`data_probeset_id` varchar(30) DEFAULT NULL,
108108
`data_signal` float DEFAULT '0',
109-
`data_call` tinytext DEFAULT NULL,
109+
`data_call` tinytext,
110110
`data_p_val` float DEFAULT '0',
111111
`data_bot_id` varchar(16) DEFAULT NULL,
112112
KEY `data_probeset_id` (`data_probeset_id`)
@@ -119,10 +119,7 @@ CREATE TABLE `sample_data` (
119119

120120
LOCK TABLES `sample_data` WRITE;
121121
/*!40000 ALTER TABLE `sample_data` DISABLE KEYS */;
122-
INSERT INTO `sample_data` VALUES
123-
(1,'AIR:1008803961','ATGE_111_A.txt','261585_at',6.9,NULL,0,'ATGE_111_A'),
124-
(2,'AIR:1008803961','ATGE_111_B.txt','261585_at',6.55,NULL,0,'ATGE_111_B'),
125-
(3,'AIR:1008803961','ATGE_111_C.txt','261585_at',10,NULL,0,'ATGE_111_C');
122+
INSERT INTO `sample_data` VALUES (1,'AIR:1008803961','ATGE_111_A.txt','261585_at',6.9,NULL,0,'ATGE_111_A'),(2,'AIR:1008803961','ATGE_111_B.txt','261585_at',6.55,NULL,0,'ATGE_111_B'),(3,'AIR:1008803961','ATGE_111_C.txt','261585_at',10,NULL,0,'ATGE_111_C');
126123
/*!40000 ALTER TABLE `sample_data` ENABLE KEYS */;
127124
UNLOCK TABLES;
128125

@@ -153,10 +150,7 @@ CREATE TABLE `sample_general_info` (
153150

154151
LOCK TABLES `sample_general_info` WRITE;
155152
/*!40000 ALTER TABLE `sample_general_info` DISABLE KEYS */;
156-
INSERT INTO `sample_general_info` VALUES
157-
(1,'AIR:1008803961','1','3','Longitude/Latitude/Elevation: E11/N50 at ~300m','ATGE_111_A.txt','ATGE_111_A','ATGE_111_A'),
158-
(2,'AIR:1008803961','1','3','Longitude/Latitude/Elevation: E11/N50 at ~300m','ATGE_111_B.txt','ATGE_111_B','ATGE_111_B'),
159-
(3,'AIR:1008803961','1','3','Longitude/Latitude/Elevation: E11/N50 at ~300m','ATGE_111_C.txt','ATGE_111_C','ATGE_111_C'),
153+
INSERT INTO `sample_general_info` VALUES (1,'AIR:1008803961','1','3','Longitude/Latitude/Elevation: E11/N50 at ~300m','ATGE_111_A.txt','ATGE_111_A','ATGE_111_A'),(2,'AIR:1008803961','1','3','Longitude/Latitude/Elevation: E11/N50 at ~300m','ATGE_111_B.txt','ATGE_111_B','ATGE_111_B'),(3,'AIR:1008803961','1','3','Longitude/Latitude/Elevation: E11/N50 at ~300m','ATGE_111_C.txt','ATGE_111_C','ATGE_111_C');
160154
/*!40000 ALTER TABLE `sample_general_info` ENABLE KEYS */;
161155
UNLOCK TABLES;
162156
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -169,4 +163,4 @@ UNLOCK TABLES;
169163
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
170164
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
171165

172-
-- Dump completed on 2024-04-19 19:00:09, copied from klepikova.sql with modifications from Vincent
166+
-- Dump completed on 2024-07-29 11:30:25

config/databases/arachis.sql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
-- MySQL dump 10.13 Distrib 8.0.33, for Linux (x86_64)
1+
-- MySQL dump 10.13 Distrib 8.4.2, for Linux (x86_64)
22
--
33
-- Host: localhost Database: arachis
44
-- ------------------------------------------------------
5-
-- Server version 8.0.33
5+
-- Server version 8.4.2
66

77
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
88
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -44,7 +44,6 @@ CREATE TABLE `sample_data` (
4444
--
4545
-- Dumping data for table `sample_data`
4646
--
47-
-- WHERE: data_probeset_id='Adur10000_comp0_c0_seq1' and sample_id=1
4847

4948
LOCK TABLES `sample_data` WRITE;
5049
/*!40000 ALTER TABLE `sample_data` DISABLE KEYS */;
@@ -61,4 +60,4 @@ UNLOCK TABLES;
6160
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
6261
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6362

64-
-- Dump completed on 2023-06-07 14:01:07
63+
-- Dump completed on 2024-07-29 11:30:25

config/databases/brassica_rapa.sql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
-- MySQL dump 10.13 Distrib 8.0.33, for Linux (x86_64)
1+
-- MySQL dump 10.13 Distrib 8.4.2, for Linux (x86_64)
22
--
33
-- Host: localhost Database: brassica_rapa
44
-- ------------------------------------------------------
5-
-- Server version 8.0.33
5+
-- Server version 8.4.2
66

77
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
88
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -43,7 +43,6 @@ CREATE TABLE `sample_data` (
4343
--
4444
-- Dumping data for table `sample_data`
4545
--
46-
-- WHERE: data_probeset_id='BraA01g000010' and sample_id=1
4746

4847
LOCK TABLES `sample_data` WRITE;
4948
/*!40000 ALTER TABLE `sample_data` DISABLE KEYS */;
@@ -60,4 +59,4 @@ UNLOCK TABLES;
6059
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
6160
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6261

63-
-- Dump completed on 2023-06-13 23:13:08
62+
-- Dump completed on 2024-07-29 11:30:25

config/databases/cannabis.sql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
-- MySQL dump 10.13 Distrib 8.0.33, for Linux (x86_64)
1+
-- MySQL dump 10.13 Distrib 8.4.2, for Linux (x86_64)
22
--
33
-- Host: localhost Database: cannabis
44
-- ------------------------------------------------------
5-
-- Server version 8.0.33
5+
-- Server version 8.4.2
66

77
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
88
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -43,7 +43,6 @@ CREATE TABLE `sample_data` (
4343
--
4444
-- Dumping data for table `sample_data`
4545
--
46-
-- WHERE: data_probeset_id='AGQN03009284' and sample_id=1
4746

4847
LOCK TABLES `sample_data` WRITE;
4948
/*!40000 ALTER TABLE `sample_data` DISABLE KEYS */;
@@ -60,4 +59,4 @@ UNLOCK TABLES;
6059
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
6160
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6261

63-
-- Dump completed on 2023-06-07 14:37:50
62+
-- Dump completed on 2024-07-29 11:30:25

config/databases/dna_damage.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
-- MySQL dump 10.13 Distrib 8.0.32, for Linux (x86_64)
1+
-- MySQL dump 10.13 Distrib 8.4.2, for Linux (x86_64)
22
--
33
-- Host: localhost Database: dna_damage
44
-- ------------------------------------------------------
5-
-- Server version 8.0.32
5+
-- Server version 8.4.2
66

77
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
88
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -59,4 +59,4 @@ UNLOCK TABLES;
5959
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
6060
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6161

62-
-- Dump completed on 2023-03-29 19:21:29
62+
-- Dump completed on 2024-07-29 11:30:25

0 commit comments

Comments
 (0)