Skip to content

Commit 69925cc

Browse files
committed
2021.05
2 parents 8f37b8a + 4ac32fb commit 69925cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+4198
-396
lines changed

CHANGELOG.md

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

3+
Version 2021.05
4+
---------------
5+
6+
* Replaced vis.js for cytoscape.js to display the processing networks.
7+
* The commands available to users, originally only filtered by input type, are now also limited by the preparation type. The options are taken from the [recommended workflows](https://qiita.ucsd.edu/workflows/).
8+
* Added a new [spades](https://github.com/ablab/spades) assembly pipeline for "Genome Isolate".
9+
* Fixed the following issues: [#3070](https://github.com/qiita-spots/qiita/issues/3070), [#3089](https://github.com/qiita-spots/qiita/issues/3089), [#2968](https://github.com/qiita-spots/qiita/issues/2968), [#3102](https://github.com/qiita-spots/qiita/issues/3102), and [#3079](https://github.com/qiita-spots/qiita/issues/3079).
10+
11+
12+
Version 2021.03
13+
---------------
14+
15+
* Fixed [issue](https://github.com/qiita-spots/qtp-target-gene/issues/32) that left behind non gz per sample FASTQ files.
16+
* [Recommended Workflows](https://qiita-rc.ucsd.edu/workflows/) are now stored in the database.
17+
* Added a new button only for owners and admins within the Study page to display a list of all the Analyses generated with that study; helpful to clean up Studies and for general information.
18+
* The Qiita CI now runs as [GitHub Actions](https://github.com/qiita-spots/qiita/actions); moving away from Travis CI.
19+
* Prep information file object now stores its creation and modification timestamps.
20+
* Improved creation time for all information files via the to_dataframe() method.
21+
* Split the "other" category of the storage stats plot (https://qiita.ucsd.edu/stats/) into "other" and "biom" so biom can be its own category.
22+
* Added a processing_jobs property to qiita_db.software.Command to easily retrieve all jobs in the system that have ran the given command.
23+
* Fixed the following issues: [#3068](https://github.com/qiita-spots/qiita/issues/3068), [#3072](https://github.com/qiita-spots/qiita/issues/3072), [#3076](https://github.com/qiita-spots/qiita/issues/3076), and [#3070](https://github.com/qiita-spots/qiita/issues/3070).
324

425
Version 2021.03
526
---------------

README.rst

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Qiita (canonically pronounced *cheetah*)
33

44
|Build Status| |Coverage Status|
55

6-
Advances in sequencing, proteomics, transcriptomics and metabolomics are giving
6+
Advances in sequencing, proteomics, transcriptomics, metabolomics, and others are giving
77
us new insights into the microbial world and dramatically improving our ability
88
to understand their community composition and function at high resolution.
99
These new technologies are generating vast amounts of data, even from a single
@@ -17,16 +17,16 @@ compute resources to the global community, alleviating the technical burdens,
1717
such as familiarity with the command line or access to compute power, that are
1818
typically limiting for researchers studying microbial ecology.
1919

20-
Qiita is currently in beta status. We are very open to community
20+
Qiita is currently in production/stable status. We are very open to community
2121
contributions and feedback. If you're interested in contributing to Qiita,
2222
see `CONTRIBUTING.md <https://github.com/qiita-spots/qiita/blob/master/CONTRIBUTING.md>`__.
2323
If you'd like to report bugs or request features, you can do that in the
2424
`Qiita issue tracker <https://github.com/qiita-spots/qiita/issues>`__.
2525

2626
To install and configure your own Qiita server, see
27-
`INSTALL.md <https://github.com/qiita-spots/qiita/blob/master/INSTALL.md>`__.
27+
`INSTALL.md <https://github.com/qiita-spots/qiita/blob/master/INSTALL.md>`__. However, Qiita is not designed to be used locally but rather on a server, we therefore advise against installing your own version on a personal computer. Nevertheless, it can run just fine on a laptop or small computer for development and educational purposes. For example, for every single PR and release, we install Qiita from scratch as GitHub Actions, you can follow `these steps <https://github.com/qiita-spots/qiita/actions>`__.
2828

29-
For more specific details about qiita visit `the Qiita main site tutorial <https://qiita.microbio.me/static/doc/html/qiita-philosophy/index.html>`__.
29+
For more specific details about Qiita's philosophy and design visit `the Qiita main site tutorial <https://qiita.microbio.me/static/doc/html/qiita-philosophy/index.html>`__.
3030

3131
Current features
3232
----------------
@@ -39,9 +39,9 @@ Current features
3939
* Easy long-term sequence data deposition to the European Nucleotide Archive (ENA),
4040
part of the European Bioinformatics Institute (EBI) for private and public
4141
studies.
42-
* Raw data processing for `Target Gene, Metagenomic, Metabolomic and BIOM files <https://qiita.ucsd.edu/static/doc/html/processingdata/index.html#processing-recommendations>`. BIOM files can be added as new preparation files for downstream analyses; however, this cannot be made public.
43-
44-
* Basic downstream analyses using Qiime2.
42+
* Raw data processing for `Target Gene, Metagenomic, Metabolomic, Genome Isolates and BIOM files <https://qiita.ucsd.edu/static/doc/html/processingdata/index.html#processing-recommendations>`__. NOTE: BIOM files can be added as new preparation files for downstream analyses; however, this cannot be made public in the system.
43+
* Basic downstream analyses using QIIME 2. Note that Qiita produces qza/qzv in the analytical steps but you can also convert `non QIIME 2 artifacts <https://qiita.ucsd.edu/static/doc/html/faq.html#how-to-convert-qiita-files-to-qiime2-artifacts>`__.
44+
* Bulk download of `studies and artifacts <https://qiita.ucsd.edu/static/doc/html/downloading.html>`__.
4545
* Basic study search in the study listing page.
4646
* Complex metadata search via redbiom.
4747

@@ -55,20 +55,7 @@ Accepted raw files
5555
* Multiplexed FASTQ: forward, reverse (optional), and barcodes
5656
* Per sample FASTQ: forward and reverse (optional)
5757
* Multiplexed FASTA/qual files
58-
59-
Roadmap
60-
-------
61-
62-
The following is a non-exhaustive list of features that we plan to add in the
63-
future.
64-
65-
* Integration of other pipelines via artifacts. Processing of raw data in
66-
external sources. For example, metabolomics processing in
67-
`GNPS <http://gnps.ucsd.edu>`__ and data visualization in Qiita.
68-
* Creation of a REST API to query and access the data hosted by Qiita.
69-
* Improved analysis pipeline for target gene datasets.
70-
* Crowd-sourced metadata curation of existing studies: improve the metadata of
71-
existing studies by submitting a fix proposals to the authors of the study.
58+
* Per sample FASTA, only for "Full Length Operon"
7259

7360

7461
.. |Build Status| image:: https://github.com/qiita-spots/qiita/actions/workflows/qiita-ci.yml/badge.svg

qiita_core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# The full license is in the file LICENSE, distributed with this software.
77
# -----------------------------------------------------------------------------
88

9-
__version__ = "2021.03"
9+
__version__ = "2021.05"

qiita_db/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from . import user
2828
from . import processing_job
2929

30-
__version__ = "2021.03"
30+
__version__ = "2021.05"
3131

3232
__all__ = ["analysis", "artifact", "archive", "base", "commands",
3333
"environment_manager", "exceptions", "investigation", "logger",

qiita_db/artifact.py

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,8 +1214,10 @@ def _add_edge(edges, src, dest):
12141214
nodes[job.id] = ('job', job)
12151215

12161216
elif n_type == 'job':
1217-
# Ignore the generate summary jobs
1218-
if n_obj.command.name == 'Generate HTML summary':
1217+
# Ignore the generate summary and delete jobs
1218+
# (they don't create new artifacts)
1219+
if n_obj.command.name in {'Generate HTML summary',
1220+
'delete_artifact'}:
12191221
continue
12201222
jstatus = n_obj.status
12211223
# If the job is in success we don't need to do anything
@@ -1475,3 +1477,44 @@ def jobs(self, cmd=None, status=None, show_hidden=False):
14751477
qdb.sql_connection.TRN.add(sql, sql_args)
14761478
return [qdb.processing_job.ProcessingJob(jid)
14771479
for jid in qdb.sql_connection.TRN.execute_fetchflatten()]
1480+
1481+
@property
1482+
def get_commands(self):
1483+
"""Returns the active commands that can process this kind of artifact
1484+
1485+
Returns
1486+
-------
1487+
list of qiita_db.software.Command
1488+
The commands that can process the given artifact tyoes
1489+
"""
1490+
dws = []
1491+
with qdb.sql_connection.TRN:
1492+
# get all the possible commands
1493+
sql = """SELECT DISTINCT qiita.command_parameter.command_id
1494+
FROM qiita.artifact
1495+
JOIN qiita.parameter_artifact_type
1496+
USING (artifact_type_id)
1497+
JOIN qiita.command_parameter USING (command_parameter_id)
1498+
JOIN qiita.software_command ON (
1499+
qiita.command_parameter.command_id =
1500+
qiita.software_command.command_id)
1501+
WHERE artifact_id = %s AND active = True"""
1502+
if self.analysis is None:
1503+
sql += " AND is_analysis = False"
1504+
# get the workflows that match this artifact so we can filter
1505+
# the available commands based on the commands in the worflows
1506+
# for that artifact
1507+
dws = [w for w in qdb.software.DefaultWorkflow.iter()
1508+
if self.data_type in w.data_type]
1509+
else:
1510+
sql += " AND is_analysis = True"
1511+
1512+
qdb.sql_connection.TRN.add(sql, [self.id])
1513+
cids = set(qdb.sql_connection.TRN.execute_fetchflatten())
1514+
1515+
if dws:
1516+
cmds = {n.default_parameter.command.id
1517+
for w in dws for n in w.graph.nodes}
1518+
cids = cmds & cids
1519+
1520+
return [qdb.software.Command(cid) for cid in cids]

qiita_db/processing_job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ def _complete_artifact_transformation(self, artifacts_data):
12841284
if naming_params:
12851285
params = self.parameters.values
12861286
art_name = "%s %s" % (
1287-
out_name, ' '.join([str(params[p])
1287+
out_name, ' '.join([str(params[p]).split('/')[-1]
12881288
for p in naming_params]))
12891289
else:
12901290
art_name = out_name

qiita_db/software.py

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Command(qdb.base.QiitaObject):
6363

6464
@classmethod
6565
def get_commands_by_input_type(cls, artifact_types, active_only=True,
66-
exclude_analysis=True):
66+
exclude_analysis=True, prep_type=None):
6767
"""Returns the commands that can process the given artifact types
6868
6969
Parameters
@@ -94,8 +94,17 @@ def get_commands_by_input_type(cls, artifact_types, active_only=True,
9494
if exclude_analysis:
9595
sql += " AND is_analysis = False"
9696
qdb.sql_connection.TRN.add(sql, [tuple(artifact_types)])
97-
for c_id in qdb.sql_connection.TRN.execute_fetchflatten():
98-
yield cls(c_id)
97+
cids = set(qdb.sql_connection.TRN.execute_fetchflatten())
98+
99+
if prep_type is not None:
100+
dws = [w for w in qdb.software.DefaultWorkflow.iter()
101+
if prep_type in w.data_type]
102+
if dws:
103+
cmds = {n.default_parameter.command.id
104+
for w in dws for n in w.graph.nodes}
105+
cids = cmds & cids
106+
107+
return [cls(cid) for cid in cids]
99108

100109
@classmethod
101110
def get_html_generator(cls, artifact_type):
@@ -425,10 +434,14 @@ def create(cls, software, name, description, parameters, outputs=None,
425434
qdb.util.convert_to_id(at[0], 'artifact_type'),
426435
at[1]])
427436
else:
428-
sql_args.append(
429-
[pname, c_id,
430-
qdb.util.convert_to_id(at, 'artifact_type'),
431-
False])
437+
try:
438+
at_id = qdb.util.convert_to_id(at, 'artifact_type')
439+
except qdb.exceptions.QiitaDBLookupError:
440+
msg = (f'Error creating {software.name}, {name}, '
441+
f'{description} - Unknown artifact_type: '
442+
f'{at}')
443+
raise ValueError(msg)
444+
sql_args.append([pname, c_id, at_id, False])
432445

433446
sql = """INSERT INTO qiita.command_output
434447
(name, command_id, artifact_type_id,

qiita_db/support_files/qiita-db.html

Lines changed: 98 additions & 99 deletions
Large diffs are not rendered by default.

qiita_db/test/test_artifact.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,22 @@ def test_jobs_cmd_and_status(self):
603603
exp = []
604604
self.assertEqual(obs, exp)
605605

606+
def test_get_commands(self):
607+
# we will check only ids for simplicity
608+
# checking processing artifacts
609+
obs = [c.id for c in qdb.artifact.Artifact(1).get_commands]
610+
self.assertEqual(obs, [1])
611+
obs = [c.id for c in qdb.artifact.Artifact(2).get_commands]
612+
self.assertEqual(obs, [3])
613+
# this is a biom in processing, so no commands should be available
614+
obs = [c.id for c in qdb.artifact.Artifact(6).get_commands]
615+
self.assertEqual(obs, [])
616+
617+
# checking analysis object - this is a biom in analysis, several
618+
# commands should be available
619+
obs = [c.id for c in qdb.artifact.Artifact(8).get_commands]
620+
self.assertEqual(obs, [9, 10, 11, 12])
621+
606622

607623
@qiita_test_checker()
608624
class ArtifactTests(TestCase):

qiita_db/test/test_software.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ def test_get_commands_by_input_type(self):
7474
exp = [qdb.software.Command(1), qdb.software.Command(2), new_cmd]
7575
self.assertCountEqual(obs, exp)
7676

77+
obs = list(qdb.software.Command.get_commands_by_input_type(
78+
['FASTQ'], active_only=False, exclude_analysis=False,
79+
prep_type='Metagenomic'))
80+
exp = [qdb.software.Command(1), new_cmd]
81+
self.assertCountEqual(obs, exp)
82+
83+
obs = list(qdb.software.Command.get_commands_by_input_type(
84+
['FASTQ'], active_only=False, exclude_analysis=False,
85+
prep_type='18S'))
86+
exp = [qdb.software.Command(1)]
87+
self.assertCountEqual(obs, exp)
88+
7789
def test_get_html_artifact(self):
7890
with self.assertRaises(qdb.exceptions.QiitaDBError):
7991
qdb.software.Command.get_html_generator('BIOM')
@@ -329,6 +341,16 @@ def test_create_error(self):
329341
"This is a command for testing", self.parameters,
330342
self.outputs)
331343

344+
# the output type doesn't exist
345+
with self.assertRaisesRegex(ValueError, "Error creating QIIME, Split "
346+
"libraries - wrong output, This is a "
347+
"command for testing - Unknown "
348+
"artifact_type: BLA!"):
349+
qdb.software.Command.create(
350+
self.software, "Split libraries - wrong output",
351+
"This is a command for testing", self.parameters,
352+
{'out': 'BLA!'})
353+
332354
def test_create(self):
333355
# let's deactivate all current plugins and commands; this is not
334356
# important to test the creation but it is important to test if a

0 commit comments

Comments
 (0)