Skip to content

Commit

Permalink
Added example folder with example files (#7)
Browse files Browse the repository at this point in the history
* Added example folder with example files

* Update README

* update readme; change input to estimating-biomass

* update readme

* flake8 fixes

* add est_biomass.csv to example folder

* add est_biomass_output.csv to example folder

* updated estimating_biomass test

* flake8 fix

* update unit testing

* update unit tests

* flake8 fixes

* typo fix

* typo fix

* typo fix

* typo fix

* change unit test file paths

* flake8 fix

* fix filepath in tests

* flake8 fixes

* newer version of qiime2 links added
  • Loading branch information
dpear authored Jul 26, 2022
1 parent 4ac1745 commit 57e67de
Show file tree
Hide file tree
Showing 12 changed files with 2,346 additions and 61 deletions.
78 changes: 52 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,61 @@ pip install -e .

## Use

Computation assumes that the user has classified their 16S features against SILVA, and that the `FeatureTable[Frequency]` has been collapsed to the genus level. Please see the [`q2-feature-classifier`](https://docs.qiime2.org/2021.11/plugins/available/feature-classifier/classify-sklearn) for detail on how to perform taxonomy
classification, and the [`q2-taxa`](https://docs.qiime2.org/2021.11/plugins/available/taxa/collapse) plugin for information on collapsing to a taxonomic level. If you need more information on how to process your data, please refer to one of the relevant tutorials that can be found [here](https://docs.qiime2.org/2022.2/tutorials/).
Computation assumes that the user has classified their 16S features against SILVA, and that the `FeatureTable[Frequency]` has been collapsed to the genus level. Please see the [`q2-feature-classifier`](https://docs.qiime2.org/2022.2/plugins/available/feature-classifier/classify-sklearn/) for detail on how to perform taxonomy classification, and the [`q2-taxa`](https://docs.qiime2.org/2022.2/plugins/available/taxa/collapse/) plugin for information on collapsing to a taxonomic level. If you need more information on how to process your data, please refer to one of the relevant tutorials that can be found [here](https://docs.qiime2.org/2022.2/tutorials/). For these examples, data from the Fish Microbiome Project (FMP): [Fish microbiomes 101: disentangling the rules governing marine fish mucosal microbiomes across 101 species](https://www.biorxiv.org/content/10.1101/2022.03.07.483203v1) paper will be used, and can be found in the `example` folder.


## Obtaining a read count threshold
## Read Count Threshold

Computation of a minimum read count threshold can be performed with the
`read_count_threshold` plugin action. Test data can be found under the `testdata` folder.
In order to obtain a read count threshold, computation of a minimum read count threshold can be performed with the
`read-count-threshold` plugin action. Test data can be found under the `example` folder.

```
qiime katharoseq read_count_threshold \
--i-table example/example_table_genus.qza \ # a genus level table
--p-threshold 80 \
qiime katharoseq read-count-threshold \
--i-table example/fmp_collapsed_table.qza \
--m-positive-control-column-file example/fmp_metadata.tsv \
--m-positive-control-column-column control_rct \
--m-cell-count-column-file example/fmp_metadata.tsv \
--m-cell-count-column-column control_cell_into_extraction \
--p-positive-control-value control \
--p-control classic \
--p-positive-control-value katharoseq_control \ # name of controls in metadata
--m-positive-control-column-file example/simple_katharoseq_metadata.tsv \ # your metadata
--m-positive-control-column-column control_or_sample \ # sample type variable in metadata
--m-cell-count-column-file example/simple_katharoseq_metadata.tsv \
--m-cell-count-column-column max_cell_count \ # cell count variable in metadata
--o-visualization result.qzv
```
qiime katharoseq read_count_threshold \
--i-table example.qza \ # a_genus_level_table
--p-threshold 80 \
--p-control classic \
--p-positive-control-value name_of_controls_in_metadata \
--m-positive-control-column-file your_metadata.tsv \
--m-positive-control-column-column sample_type_variable_in_metadata \
--m-cell-count-column-file your_metadata.tsv \
--m-cell-count-column-column cell_count_variable_in_metadata \
--o-visualization result.qzv
```
--p-threshold 90 \
--o-visualization result_fmp_example.qzv
```

## Estimating Biomass

Estimate the biomass of samples using KatharoSeq controls. After obtaining a read count threshold using the action above, use the same metadata and collapsed table as input. The `--p-pcr-template-vol` and `--p-dna-template-vol` values are numeric values that should come from your experimental procedures.

```
qiime katharoseq estimating-biomass \
--i-table example/fmp_collapsed_table.qza \
--m-control-cell-extraction-file example/fmp_metadata.tsv \
--m-control-cell-extraction-column control_cell_into_extraction \
--p-min-total-reads 1315 \
--p-positive-control-value control \
--m-positive-control-column-file example/fmp_metadata.tsv \
--m-positive-control-column-column control_rct \
--p-pcr-template-vol 5 \
--p-dna-extract-vol 60 \
--m-extraction-mass-g-column extraction_mass_g \
--m-extraction-mass-g-file example/fmp_metadata.tsv \
--o-estimated-biomass estimated_biomass_fmp_rct
```

## Biomass Plot

Finally in order to visualize the results from `estimating-biomass`, run `biomass-plot`.

```
qiime katharoseq biomass-plot \
--i-table example/fmp_collapsed_table.qza \
--m-control-cell-extraction-file example/fmp_metadata_mod.tsv \
--m-control-cell-extraction-column control_cell_into_extraction \
--p-min-total-reads 1315 \
--p-positive-control-value control \
--m-positive-control-column-file example/fmp_metadata_mod.tsv \
--m-positive-control-column-column control_rct \
--o-visualization biomass_plot_fmp
```


Loading

0 comments on commit 57e67de

Please sign in to comment.