Skip to content

Commit 8541307

Browse files
authored
Merge pull request #20 from sbslee/1.10.0-dev
1.10.0 dev
2 parents 9f6027d + d1d671f commit 8541307

28 files changed

+215
-249
lines changed

CHANGELOG.rst

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
Changelog
22
*********
33

4+
1.10.0 (2021-07-06)
5+
-------------------
6+
7+
* :issue:`14`, :issue:`17`: Add the ``group_order`` option to the :meth:`taxa_abundance_bar_plot` method.
8+
* Fix a minor bug in the :meth:`addbiplot` method when feature is 'Unassigned'.
9+
* Deprecate the :command:`count-reads` command.
10+
* :issue:`19`: Remove the ``artist_kwargs`` argument from the following methods:
11+
12+
- :meth:`ancom_volcano_plot`
13+
- :meth:`read_quality_plot`
14+
415
1.9.0 (2021-06-07)
5-
----------------------
16+
------------------
617

718
* Add publicly available datasets from QIIME 2 for tutorials.
819
* :issue:`14`: Add the ``group`` option to the :meth:`taxa_abundance_bar_plot` method. Using this option will create a bar for each group instead of each sample.

docs/dokdo_cli.rst

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -160,23 +160,3 @@ prepare-lefse
160160
SQLite 'WHERE' clause specifying sample metadata
161161
criteria.
162162
-h, --help Show this help message and exit.
163-
164-
count-reads
165-
-----------
166-
167-
.. code-block:: console
168-
169-
$ dokdo count-reads -h
170-
usage: dokdo count-reads -i PATH [-d TEXT] [-h]
171-
172-
Count the number of sequence reads from FASTQ. This command outputs two
173-
columns corresponding to the file name and read count, respectively.
174-
175-
Arguments:
176-
-i PATH, --fastq-path PATH
177-
Path to the input FASTQ file or to the input directory
178-
containing FASTQ files. [required]
179-
-d TEXT, --delimiter TEXT
180-
Delimiter used to separate the file name and read
181-
count. [default: '\t']
182-
-h, --help Show this help message and exit.

docs/images/ancom_volcano_plot.png

-19.6 KB
Binary file not shown.
11.6 KB
Loading
16.1 KB
Loading

docs/images/read_quality_plot.png

7.26 KB
Loading

docs/qiime2_cli.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ Differential Abundance
489489

490490
In QIIME 2, differential abundance of bacteria can be tested using the analysis of composition of microbiomes (ANCOM). After each ANCOM, we can make a volcano plot as shown below:
491491

492-
.. image:: images/ancom_volcano_plot.png
492+
.. image:: images/ancom_volcano_plot_1.png
493493

494494
where the x-axis is centered log-ratio (CLR) of relative abundance and the y-axis is the W value which represents the number of rejected null hypotheses. The W value will be explained in more detail below. If you are not familiar with the CLR transformation, it is defined as:
495495

dokdo/__main__.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -289,43 +289,6 @@ def main():
289289
help=help_msg
290290
)
291291

292-
count_reads_parser = subparsers.add_parser(
293-
"count-reads",
294-
add_help=False,
295-
help="Count the number of sequence reads from FASTQ.",
296-
description=("Count the number of sequence reads from FASTQ. "
297-
"This command outputs two columns corresponding "
298-
"to the file name and read count, respectively.")
299-
)
300-
301-
count_reads_parser._optionals.title = "Arguments"
302-
303-
count_reads_parser.add_argument(
304-
"-i",
305-
"--fastq-path",
306-
metavar="PATH",
307-
required=True,
308-
help=("Path to the input FASTQ file or to the input "
309-
"directory containing FASTQ files. [required]")
310-
)
311-
312-
count_reads_parser.add_argument(
313-
"-d",
314-
"--delimiter",
315-
metavar="TEXT",
316-
default="\t",
317-
help=("Delimiter used to separate the file name and read "
318-
"count. [default: '\\t']")
319-
)
320-
321-
count_reads_parser.add_argument(
322-
"-h",
323-
"--help",
324-
action="help",
325-
default=argparse.SUPPRESS,
326-
help=help_msg
327-
)
328-
329292
args = parser.parse_args()
330293
command = args.command
331294
delattr(args, "command")

dokdo/api/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from .num2sig import num2sig
55
from .wilcoxon import wilcoxon
66
from .mannwhitneyu import mannwhitneyu
7-
from .count_reads_one_file import count_reads_one_file
87

98
from .read_quality_plot import read_quality_plot
109
from .denoising_stats_plot import denoising_stats_plot
@@ -33,4 +32,4 @@
3332
'beta_scree_plot', 'beta_parallel_plot', 'distance_matrix_plot',
3433
'taxa_abundance_bar_plot', 'taxa_abundance_box_plot',
3534
'ancom_volcano_plot', 'addsig', 'regplot', 'addbiplot',
36-
'barplot', 'ordinate', 'pname', 'get_mf', 'count_reads_one_file']
35+
'barplot', 'ordinate', 'pname', 'get_mf']

dokdo/api/addbiplot.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,21 @@
66
from qiime2 import Artifact
77

88
def addbiplot(
9-
pcoa_results, taxonomy=None, dim=2, scale=1.0,
10-
count=5, fontsize=None, name_type='feature',
11-
level=None, ax=None, figsize=None
9+
pcoa_results, dim=2, scale=1.0, count=5, fontsize=None,
10+
name_type='feature', taxonomy=None, level=None, ax=None, figsize=None
1211
):
13-
"""Adds arrows (i.e. features) to a PCoA scatter plot.
12+
"""
13+
Draw arrows (features) to an existing PCoA plot.
1414
15-
This method can handle both 2D and 3D plots.
15+
This method supports both 2D and 3D plots.
1616
1717
Parameters
1818
----------
1919
pcoa_results : str or qiime2.Artifact
2020
Artifact file or object corresponding to
2121
PCoAResults % Properties('biplot').
22-
taxonomy : str or qiime2.Artifact
23-
Artifact file or object corresponding to FeatureData[Taxonomy].
24-
Required if ``name_type='taxon'`` or ```name_type='confidence'``.
2522
dim : [2, 3], default: 2
26-
Dimension of the input scatter plot.
23+
Dimension of the plot.
2724
scale : float, default: 1.0
2825
Scale for arrow length.
2926
count : int, default: 5
@@ -33,8 +30,12 @@ def addbiplot(
3330
name_type : ['feature', 'taxon', 'confidence'], default: 'feature'
3431
Determines the type of names displayed. Using 'taxon' and 'confidence'
3532
requires taxonomy.
33+
taxonomy : str or qiime2.Artifact
34+
Artifact file or object corresponding to FeatureData[Taxonomy].
35+
Required if ``name_type`` is 'taxon' or 'confidence'.
3636
level : int, optional
37-
Taxonomic rank to be displayed. Only use with ``name_type='taxon'```.
37+
Level of taxonomic rank to be displayed. This argument has an effect
38+
only when ``name_type`` is 'taxon'.
3839
ax : matplotlib.axes.Axes, optional
3940
Axes object to draw the plot onto, otherwise uses the current Axes.
4041
figsize : tuple, optional
@@ -47,9 +48,9 @@ def addbiplot(
4748
4849
See Also
4950
--------
50-
ordinate
51-
beta_2d_plot
52-
beta_3d_plot
51+
dokdo.api.ordinate
52+
dokdo.api.beta_2d_plot
53+
dokdo.api.beta_3d_plot
5354
5455
Examples
5556
--------
@@ -122,6 +123,8 @@ def addbiplot(
122123
feats = pd.concat([feats, tax_df], axis=1, join='inner')
123124

124125
def f(s):
126+
if s == 'Unassigned':
127+
return s
125128
ranks = list(s.split(';'))
126129
if level is None:
127130
return s

0 commit comments

Comments
 (0)