Skip to content

Commit 3f828b2

Browse files
committed
update docs [ci skip]
1 parent 9e30965 commit 3f828b2

2 files changed

Lines changed: 32 additions & 35 deletions

File tree

docs/source/examples.rst

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,30 @@ Analysis example
88
The following is an example of how to use ``ngs_toolkit`` in a ATAC-seq project.
99
While straightforward, it still allows considerable customization due to the modularity of the toolkit and the parametrization of most functions (this example uses default values everywhere nonetheless).
1010

11+
.. note::
12+
``ngs_toolkit`` from version 0.25.0 on uses the `PEP 2.0 specification <http://pep.databio.org/en/2.0.0/specification/>`_. If you have a PEP made in an earlier version, you must update it in order to use ``ngs_toolkit``>=0.25.0.
1113

12-
We have the following `PEP project <https://peppy.readthedocs.io>`_ config YAML file:
14+
15+
We have the following `PEP project <http://pep.databio.org/>`_ config YAML file:
1316

1417
.. code-block:: yaml
1518
16-
project_name: example_project
17-
project_description: example_project
19+
pep_version: "2.0.0"
20+
name: example_project
21+
description: example_project
1822
username: user
19-
email: user@cemm.oeaw.ac.at
20-
metadata:
21-
output_dir: /scratch/lab_bock/shared/projects/example_project
22-
results_subdir: data
23-
submission_subdir: submission
24-
pipeline_interfaces: /home/user/workspace/open_pipelines/pipeline_interface.yaml
25-
sample_table: /scratch/lab_bock/shared/projects/example_project/metadata/annotation.csv
26-
subsample_table: /scratch/lab_bock/shared/projects/example_project/metadata/sample_subannotation.csv
27-
comparison_table: /scratch/lab_bock/shared/projects/example_project/metadata/comparison_table.csv
23+
email: user@email.com
24+
25+
sample_table: annotation.csv
26+
subsample_table:
27+
comparison_table: comparison_table.csv
28+
29+
submission_subdir: submission
30+
results_subdir: data
31+
output_dir: example_project
32+
33+
pipeline_interfaces: /home/user/workspace/open_pipelines/pipeline_interface.yaml
34+
2835
sample_attributes:
2936
- sample_name
3037
- genotype
@@ -41,27 +48,25 @@ We have the following `PEP project <https://peppy.readthedocs.io>`_ config YAML
4148
derive:
4249
attributes: [data_source]
4350
sources:
51+
local: data/{sample_name}.bam
4452
bsf: /scratch/lab_bsf/samples/{flowcell}/{flowcell}_{lane}_samples/{flowcell}_{lane}#{BSF_name}.bam
45-
local: /tmp/tmptd4zmpiw/test_project/data/{sample_name}.bam
46-
trackhubs:
47-
trackhub_dir: /path/to/public_html/user/example_project/
48-
url: http://root-url.com/example_project
4953
5054
51-
The following sample annotation CSV file:
55+
56+
The following sample annotation CSV file, 'annotation.csv':
5257

5358
.. csv-table:: Annotation table for example
54-
:header: "sample_name", "genotype", "replicate", "organism", flowcell, lane
59+
:header: "sample_name", "protocol", "genotype", "replicate", "organism", flowcell, lane
5560

56-
"ATAC-seq_KOA_r1", "KO_A", "1", "human", "C0RQ31ACXXX", "1"
57-
"ATAC-seq_KOA_r2", "KO_A", "2", "human", "C0RQ31ACXXX", "1"
58-
"ATAC-seq_KOB_r1", "KO_B", "1", "human", "C0RQ31ACXXX", "1"
59-
"ATAC-seq_KOB_r2", "KO_B", "2", "human", "C0RQ31ACXXX", "1"
60-
"ATAC-seq_WT_r1", "WT", "1", "human", "C0RQ31ACXXX", "1"
61-
"ATAC-seq_WT_r2", "WT", "2", "human", "C0RQ31ACXXX", "1"
61+
"ATAC-seq_KOA_r1", "ATAC-seq", KO_A", "1", "human", "C0AXX", "1"
62+
"ATAC-seq_KOA_r2", "ATAC-seq", KO_A", "2", "human", "C0AXX", "1"
63+
"ATAC-seq_KOB_r1", "ATAC-seq", KO_B", "1", "human", "C0AXX", "1"
64+
"ATAC-seq_KOB_r2", "ATAC-seq", KO_B", "2", "human", "C0AXX", "1"
65+
"ATAC-seq_WT_r1", "ATAC-seq", WT", "1", "human", "C0AXX", "1"
66+
"ATAC-seq_WT_r2", "ATAC-seq", WT", "2", "human", "C0AXX", "1"
6267

6368

64-
And the following comparison table:
69+
And the following comparison table, 'comparison_table.csv':
6570

6671
.. csv-table:: Comparison table for example
6772
:header: "comparison_name", "comparison_side", "sample_name", "sample_group"
@@ -87,8 +92,7 @@ ATAC-seq analysis example
8792
from ngs_toolkit.atacseq import ATACSeqAnalysis
8893
8994
# Start project and analysis objects
90-
analysis = ATACSeqAnalysis(
91-
from_pep=os.path.join("metadata", "project_config.yaml"))
95+
analysis = ATACSeqAnalysis(from_pep="project_config.yaml")
9296
9397
# Generate consensus peak set and annotate it
9498
## get consensus peak set from all samples
@@ -117,10 +121,6 @@ ATAC-seq analysis example
117121
# # annotate dataframe with sample metadata
118122
analysis.accessibility = analysis.annotate_samples()
119123
120-
# Save analysis object
121-
analysis.to_pickle()
122-
123-
124124
# UNSUPERVISED ANALYSIS
125125
# # plot pairwise sample correlations,
126126
# # perform dimensionality reduction (MDS, PCA)
@@ -132,9 +132,6 @@ ATAC-seq analysis example
132132
# # differential analysis with DESeq2
133133
analysis.differential_analysis()
134134
135-
# # Save analysis object
136-
analysis.to_pickle()
137-
138135
# # plot scatter, volcano, MA, heatmaps on the differential regions
139136
# # by groups and with individual samples, with normalized values
140137
# # and scalled values (Z-score).

ngs_toolkit/config/default.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ preferences:
3434
# key:values under parameters are passed to seaborn.set
3535
parameters:
3636
context: "paper"
37-
style: "white"
37+
style: "ticks"
3838
palette: "colorblind"
3939
color_codes: True
4040
figure_saving:

0 commit comments

Comments
 (0)