Skip to content

Commit a36dc8a

Browse files
committed
Merge branch 'dev' of https://github.com/qiita-spots/qiita into dev
2 parents 3afba3a + e00ccf4 commit a36dc8a

File tree

14 files changed

+1649
-1506
lines changed

14 files changed

+1649
-1506
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Qiita changelog
22

3+
Version 2024.07
4+
---------------
5+
6+
Deployed on July 15th, 2024
7+
8+
* On June 14th, 2024 we modified the SPP to use ["fastp & minimap2 against GRCh38.p14 + Phi X 174 + T2T-CHM13v2.0, then Movi against GRCh38.p14, T2T-CHM13v2.0 + Human Pangenome Reference Consortium release 2023"](https://github.com/cguccione/human_host_filtration) to filter human-reads.
9+
* Full refactor of the [DB patching system](https://github.com/qiita-spots/qiita/blob/master/CONTRIBUTING.md#patch-91sql) to make sure that a new production deployment has a fully empty database.
10+
* Fully removed Qiimp from Qiita.
11+
* Users can now add `ORCID`, `ResearchGate` and/or `GoogleScholar` information to their profile and the creation (registration) timestamp is kept in the database. Thank you @jlab.
12+
* Admins can now track and purge non-confirmed users from the database via the GUI (`/admin/purge_users/`). Thank you @jlab.
13+
* Added `qiita.slurm_resource_allocations` to store general job resource usage, which can be populated by `qiita_db.util.update_resource_allocation_table`.
14+
* Added `qiita_db.util.resource_allocation_plot` to generate different models to allocate resources from a given software command based on previous jobs, thank you @Gossty !
15+
* The stats page map can be centered via the configuration file; additionally, the Help and Admin emails are defined also via the configuration files, thank you @jlab !
16+
* ``Sequel IIe``, ``Revio``, and ``Onso`` are now valid instruments for the ``PacBio_SMRT`` platform.
17+
* Added `current_human_filtering` to the prep-information and `human_reads_filter_method` to the artifact to keep track of the method that it was used to human reads filter the raw artifact and know if it's up to date with what is expected via the best practices.
18+
* Added `reprocess_job_id` to the prep-information so we keep track if a preparation has been reprocessed with another job.
19+
* Other general fixes, like [#3385](https://github.com/qiita-spots/qiita/pull/3385), [#3397](https://github.com/qiita-spots/qiita/pull/3397), [#3399](https://github.com/qiita-spots/qiita/pull/3399), [#3400](https://github.com/qiita-spots/qiita/pull/3400), [#3409](https://github.com/qiita-spots/qiita/pull/3409), [#3410](https://github.com/qiita-spots/qiita/pull/3410).
20+
21+
322
Version 2024.02
423
---------------
524

qiita_db/artifact.py

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,3 +1684,51 @@ def get_commands(self):
16841684
cids = cmds & cids
16851685

16861686
return [qdb.software.Command(cid) for cid in cids]
1687+
1688+
@property
1689+
def human_reads_filter_method(self):
1690+
"""The human_reads_filter_method of the artifact
1691+
1692+
Returns
1693+
-------
1694+
str
1695+
The human_reads_filter_method name
1696+
"""
1697+
with qdb.sql_connection.TRN:
1698+
sql = """SELECT human_reads_filter_method
1699+
FROM qiita.artifact
1700+
LEFT JOIN qiita.human_reads_filter_method
1701+
USING (human_reads_filter_method_id)
1702+
WHERE artifact_id = %s"""
1703+
qdb.sql_connection.TRN.add(sql, [self.id])
1704+
return qdb.sql_connection.TRN.execute_fetchlast()
1705+
1706+
@human_reads_filter_method.setter
1707+
def human_reads_filter_method(self, value):
1708+
"""Set the human_reads_filter_method of the artifact
1709+
1710+
Parameters
1711+
----------
1712+
value : str
1713+
The new artifact's human_reads_filter_method
1714+
1715+
Raises
1716+
------
1717+
ValueError
1718+
If `value` doesn't exist in the database
1719+
"""
1720+
with qdb.sql_connection.TRN:
1721+
sql = """SELECT human_reads_filter_method_id
1722+
FROM qiita.human_reads_filter_method
1723+
WHERE human_reads_filter_method = %s"""
1724+
qdb.sql_connection.TRN.add(sql, [value])
1725+
idx = qdb.sql_connection.TRN.execute_fetchflatten()
1726+
1727+
if len(idx) == 0:
1728+
raise ValueError(
1729+
f'"{value}" is not a valid human_reads_filter_method')
1730+
1731+
sql = """UPDATE qiita.artifact
1732+
SET human_reads_filter_method_id = %s
1733+
WHERE artifact_id = %s"""
1734+
qdb.sql_connection.TRN.add(sql, [idx[0], self.id])

qiita_db/support_files/patches/92.sql

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,18 @@ ALTER TABLE qiita.qiita_user ADD social_orcid character varying DEFAULT NULL;
4848
ALTER TABLE qiita.qiita_user ADD social_researchgate character varying DEFAULT NULL;
4949
ALTER TABLE qiita.qiita_user ADD social_googlescholar character varying DEFAULT NULL;
5050

51+
-- Jul 1, 2024
5152
-- Add human_reads_filter_method so we can keep track of the available methods
5253
-- and link them to the preparations
5354

54-
CREATE TABLE qiita.human_reads_filter_method (
55-
human_reads_filter_method_id bigint NOT NULL,
56-
human_reads_filter_method_method character varying NOT NULL,
57-
CONSTRAINT pk_human_reads_filter_method_id PRIMARY KEY (
58-
human_reads_filter_method_id )
59-
);
55+
CREATE TABLE qiita.human_reads_filter_method (
56+
human_reads_filter_method_id SERIAL PRIMARY KEY,
57+
human_reads_filter_method character varying NOT NULL
58+
);
6059

61-
ALTER TABLE qiita.prep_template
60+
ALTER TABLE qiita.artifact
6261
ADD human_reads_filter_method_id bigint DEFAULT NULL;
63-
ALTER TABLE qiita.prep_template
62+
ALTER TABLE qiita.artifact
6463
ADD CONSTRAINT fk_human_reads_filter_method
6564
FOREIGN KEY ( human_reads_filter_method_id )
6665
REFERENCES qiita.human_reads_filter_method ( human_reads_filter_method_id );
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- Just an empty SQL to allow the changes implemented in
2+
-- https://github.com/qiita-spots/qiita/pull/3403 to take effect
3+
SELECT 1;

qiita_db/support_files/patches/test_db_sql/92.sql

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,3 +942,13 @@ WHERE email = '[email protected]';
942942
INSERT INTO qiita.qiita_user VALUES ('[email protected]', 5, '$2a$12$gnUi8Qg.0tvW243v889BhOBhWLIHyIJjjgaG6dxuRJkUM8nXG9Efe', 'JustNow', 'NonVeriUser', '1634 Edgemont Avenue', '303-492-1984', NULL, NULL, NULL, false, NOW(), NULL, NULL, NULL);
943943
INSERT INTO qiita.qiita_user VALUES ('[email protected]', 5, '$2a$12$gnUi8Qg.0tvW243v889BhOBhWLIHyIJjjgaG6dxuRJkUM8nXG9Efe', 'Oldie', 'NonVeriUser', '172 New Lane', '102-111-1984', NULL, NULL, NULL, false, NOW() - INTERVAL '1 YEAR', NULL, NULL, NULL);
944944
INSERT INTO qiita.qiita_user VALUES ('[email protected]', 5, '$2a$12$gnUi8Qg.0tvW243v889BhOBhWLIHyIJjjgaG6dxuRJkUM8nXG9Efe', 'TooLate', 'NonVeriUser', '564 C Street', '508-492-222', NULL, NULL, NULL, false, NOW() - INTERVAL '30 DAY', NULL, NULL, NULL);
945+
946+
-- Jul 1, 2024
947+
-- Inserting a human_reads_filter_method and assigning it to the raw data in prep/artifact 1
948+
INSERT INTO qiita.human_reads_filter_method (
949+
human_reads_filter_method)
950+
VALUES (
951+
'The greatest human filtering method');
952+
UPDATE qiita.artifact
953+
SET human_reads_filter_method_id = 1
954+
WHERE artifact_id = 1;

0 commit comments

Comments
 (0)