*This is a Community Tutorial for the Q2-dsfdr (Discrete False-Discovery Rate) (https://msystems.asm.org/content/2/6/e00092-17) within the qiime2-2018.6 release.*

# Why is Q2-dsfdr useful

Differential abundance testing is a critical task in microbiome studies that is complicated by the sparsity of data matrices. DS-FDR can achieve higher statistical power to detect significant findings in sparse and noisy microbiome data compared to the commonly used Benjamini-Hochberg procedure and other FDR-controlling procedures.

# How to install Q2-dsfdr

```
$ source activate <your qiime2 environment>
pip install git+https://github.com/biocore/dsFDR.git
pip install git+https://github.com/serenejiang/q2_dsfdr.git
qiime dev refresh-cache
```

# How to use Q2-dsfdr

### Download data used in this tutorial

metadata_rare2k.txt

deblur-feature-table.biom

### Convert feature table to qiime2 qza artifact

```
$ qiime tools import \
--input-path deblur-feature-table.biom \
--type 'FeatureTable[Frequency]' \
--source-format BIOMV210Format \
--output-path dblr_haddad.qza
```

### Select interested category to compare using DS-FDR

```
$ qiime dsfdr permutation-fdr \
--i-table dblr_haddad.qza \
--m-metadata-file metadata_rare2k.txt \
--m-metadata-column 'exposure_type' \
--o-visualization dsfdr.qzv \
--verbose
```

### Download the results

#### including a list of differential abundant taxa, test statistics and raw p-values

```
$ qiime tools view dsfdr.qzv
```

### Interpret the results

The first column of the results represent all the taxa in your data, and the second column with values of FALSE/TRUE indicate whether the corresponding taxa is found to be statistically significant between your interested groups. TRUE suggests statistically significant. The third column provides the values of test statistics for the testing on each taxa, which can be served as a proxy of the effect size. The fourth column is the raw p-values for each taxa. Note that these raw p-values were the p-values before FDR correction. The corrected p-values are not available for this DS-FDR method, as we use test statistics instead of p-values for the estimation of False Discovery Rate.

# Source Code

If you want to look deep into the DS-FDR method, the source code in python is available here