Skip to content

Commit 5e1c6a6

Browse files
committed
setup and usages were updated.
1 parent 9436894 commit 5e1c6a6

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Computational workflows for reproducing analysis in the study of Huang et al., 2
44
![Graphical abstract](./images/graphical_abstract.jpg)
55

66
#### Table of contents
7-
1. [Setup]()
8-
2. [General usage]()
7+
1. [Setup](./docs/setup_general_usage.md)
8+
2. [General usage](./docs/setup_general_usage.md)
99
3. Detailed tutorials
1010
* [Reads quality inspection with cumulative distribution function](./docs/cumulative_distribution_function.md)
1111
* [Alpha diversity analysis](./docs/alpha_diversity_analysis.md)
@@ -14,4 +14,5 @@ Computational workflows for reproducing analysis in the study of Huang et al., 2
1414
* [ComplexHeatmap plotting](./docs/make_ComplexHeatmap.md)
1515
* [Make mosaic plot](./docs/make_mosaic_plot.md)
1616
* [Machine learning analysis](./docs/machine_learning_analysis.md)
17-
* [Deviation plot, UpSet plot, Lollipop plot](./docs/several_plots.md)
17+
* [Deviation plot, UpSet plot, Lollipop plot](./docs/several_plots.md)
18+

docs/setup_general_usage.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## First time setup
2+
3+
While no pre-installation is required for running workflows in this repository, you first need to download the repository to your local computer:
4+
~~~bash
5+
git clone https://github.com/KunDHuang/KunDH-2024-CRM-MSM_metagenomics.git
6+
~~~
7+
8+
NOTE: As scripts provided in this repository depend on many third-party tools, we highly recommend [conda](https://conda.io/projects/conda/en/latest/index.html) environment for managing required dependencies which are listed in each of sections in the tutorials.
9+
10+
## General usages
11+
12+
This repository provides two types of utilities: 1) Python scripts and 2) Importable R functions
13+
14+
1) Python scripts are codes encapulated for executing specific analysis.
15+
Example: [visualizing cumulative distribution function.](../docs/cumulative_distribution_function.md)
16+
~~~bash
17+
$ cumulative_distribution_function.py --input_table <example_reads_stats.tsv> --output_figure <nr_QC_reads_pairs.svg> --value_header <nr_QC_reads_pairs> --palette_map <reads_stats_color_map.tsv>
18+
~~~
19+
20+
2) Importable R functions are R codes wrapped up for solving specific problems and should be reusable by just importing their scripts.
21+
22+
Example: [estimate PERMANOVA significance.](../docs/beta_diversity_analysis.md)
23+
24+
~~~R
25+
>source(file = "path_to_the_package/KunDH-2023-CRM-MSM_metagenomics/scripts/functions/beta_diversity_funcs.R")
26+
>est_permanova(mat = matrix,
27+
md = metadata,
28+
variable = "condom_use",
29+
covariables = c("Antibiotics_6mo", "HIV_status", "inflammatory_bowel_disease", "BMI_kg_m2_WHO", "diet"),
30+
nper = 999,
31+
to_rm = c("no_receptive_anal_intercourse"),
32+
by_method = "margin")
33+
34+
Df SumOfSqs R2 F Pr(>F)
35+
condom_use 4 1.2161 0.08194 1.5789 0.008 **
36+
Antibiotics_6mo 2 0.4869 0.03281 1.2643 0.160
37+
HIV_status 1 0.3686 0.02484 1.9146 0.030 *
38+
inflammatory_bowel_disease 1 0.2990 0.02015 1.5529 0.066 .
39+
BMI_kg_m2_WHO 5 1.8376 0.12382 1.9087 0.002 **
40+
diet 3 0.8579 0.05781 1.4853 0.036 *
41+
Residual 49 9.4347 0.63571
42+
Total 65 14.8412 1.00000
43+
---
44+
Signif. codes: 0***0.001**0.01*0.05.0.1 ‘ ’ 1
45+
~~~

images/graphical_abstract.jpg

324 KB
Loading

0 commit comments

Comments
 (0)