Skip to content

Commit 4eacef7

Browse files
authored
Merge pull request #21 from vivekbhr/glm_pca_devel
Glm pca devel
2 parents bb91292 + d194f93 commit 4eacef7

17 files changed

+2221
-57
lines changed

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,18 @@ jobs:
4444
which sincei
4545
sincei --help
4646
- name: Generate coverage report
47+
if: matrix.os == 'ubuntu-latest'
4748
run: |
4849
pip install pytest
4950
pip install pytest-cov
50-
pytest --cov=./ --cov-report=xml
51+
pytest --cov=./
5152
- name: Upload coverage to Codecov
53+
if: matrix.os == 'ubuntu-latest'
5254
uses: codecov/codecov-action@v3
5355
with:
5456
token: ${{ secrets.CODECOV_TOKEN }}
55-
directory: ./coverage/reports/
5657
env_vars: OS,PYTHON
5758
fail_ci_if_error: true
58-
files: ./coverage1.xml,./coverage2.xml,!./cache
5959
flags: unittests
6060
name: codecov-umbrella
6161
verbose: true

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## sincei: A user-friendly toolkit for QC, counting, clustering and plotting of single-cell (epi)genomics data.
66

7-
[![DOI](https://zenodo.org/badge/271841139.svg)](https://zenodo.org/badge/latestdoi/271841139) [![Documentation Status](https://readthedocs.org/projects/sincei/badge/?version=latest)](https://sincei.readthedocs.io/en/latest/?badge=latest) [![PyPI Version](https://img.shields.io/pypi/v/sincei.svg?style=plastic)](https://pypi.org/project/sincei/) [![test](https://github.com/vivekbhr/sincei/actions/workflows/test.yml/badge.svg)](https://github.com/vivekbhr/sincei/actions/workflows/test.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
7+
[![DOI](https://zenodo.org/badge/271841139.svg)](https://zenodo.org/badge/latestdoi/271841139) [![Documentation Status](https://readthedocs.org/projects/sincei/badge/?version=latest)](https://sincei.readthedocs.io/en/latest/?badge=latest) [![PyPI Version](https://img.shields.io/pypi/v/sincei.svg?style=plastic)](https://pypi.org/project/sincei/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![test](https://github.com/vivekbhr/sincei/actions/workflows/test.yml/badge.svg)](https://github.com/vivekbhr/sincei/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/vivekbhr/sincei/graph/badge.svg?token=VRTMITHHBI)](https://codecov.io/gh/vivekbhr/sincei)
88

99
## Features
1010

docs/conf.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,13 @@ def get_version(path=VPATH):
5555
"sphinx.ext.autosummary",
5656
"sphinxarg.ext",
5757
"sphinx_toolbox.collapse",
58+
"nbsphinx",
5859
]
5960
# 'numpydoc'
6061

62+
# Do not execute tutorial notebooks
63+
nbsphinx_execute = "never"
64+
6165
# This is needed to suppress autosummary reordering
6266
numpydoc_show_class_members = False
6367

@@ -74,12 +78,13 @@ def get_version(path=VPATH):
7478

7579
# The theme to use for HTML and HTML Help pages. See the documentation for
7680
# a list of builtin themes.
77-
html_theme = 'sphinx_rtd_theme'
81+
html_theme = "sphinx_rtd_theme"
7882
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
7983

8084
if not on_rtd: # only import and set the theme if we're building docs locally
8185
import sphinx_rtd_theme
82-
html_theme = 'sphinx_rtd_theme'
86+
87+
html_theme = "sphinx_rtd_theme"
8388
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
8489

8590
# Add any paths that contain custom static files (such as style sheets) here,

docs/content/tutorials.rst

+12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
Tutorials
22
===========
33

4+
Tutorials for using sincei on the command line
5+
-----------------------------------------------
6+
47
.. toctree::
58
:maxdepth: 1
69

710
tutorials/sincei_tutorial_sortChIC.rst
811
tutorials/sincei_tutorial_10x.rst
912
tutorials/sincei_tutorial_10xATAC.rst
13+
14+
Tutorials for using sincei inside python
15+
-----------------------------------------
16+
17+
.. toctree::
18+
:maxdepth: 1
19+
20+
tutorials/snmC2Tseq_preprocessing
21+
tutorials/GLM_PCA_analysis

docs/content/tutorials/sincei_tutorial_10x.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ and processed using the standard 10x genomics `cellranger-arc
1919
workflow <https://support.10xgenomics.com/single-cell-multiome-atac-gex/software/pipelines/latest/algorithms/overview>`__.
2020
Below is the structure of the output directory from the workflow:
2121

22-
.. code:: {bash}
22+
.. code:: bash
2323
24-
<output_dir>/outs:
24+
<output_di>/outs:
2525
├── analysis
2626
├── atac_cut_sites.bigwig
2727
├── atac_fragments.tsv.gz
@@ -49,7 +49,7 @@ sincei. These files can also be produced as part of the
4949
For convenience, we provide a subset of this data (only chromosome 2)
5050
`here <>`__
5151

52-
.. code:: {bash}
52+
.. code:: bash
5353
5454
mkdir 10x_multiome && wget -O 10x_multiome/10x_multiome_testdata.tar.gz https://figshare.com/ndownloader/files/41303289
5555
tar -xvzf 10x_multiome/10x_multiome_testdata.tar.gz ## releases 7 files
@@ -65,7 +65,7 @@ sincei also allows you to extract per barcode count distributions,
6565
indicating which barcodes should be removed. This can be done using the
6666
``scFilerBarcodes`` tool.
6767

68-
.. code:: {bash}
68+
.. code:: bash
6969
7070
barcodes=737K-arc-v1.txt # cellranger-arc barcodes in this case
7171
for r in 1 2
@@ -95,13 +95,13 @@ of the barcode counts.
9595
2. scATAC-seq analysis
9696
----------------------
9797

98-
Please follow - :doc:`this tutorial <sincei_tutorial_10xATAC>` for further analysis of scATAC-seq
98+
Please follow :doc:`this tutorial <sincei_tutorial_10xATAC>` for further analysis of scATAC-seq
9999
samples from the above data.
100100

101101
3. scRNA-seq analysis
102102
---------------------
103103

104-
Please follow `this tutorial <>`__ for further analysis of scRNA-seq
104+
Please follow :doc: `this tutorial <sincei_tutorial_10xATAC>` for further analysis of scRNA-seq
105105
samples from the above data.
106106

107107
4. Joint analysis

docs/content/tutorials/sincei_tutorial_10xATAC.rst

+10-10
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ using sincei (see the parent tutorial for explanation).
1212

1313
Define common bash variables:
1414

15-
.. code:: {bash}
15+
.. code:: bash
1616
1717
# create dir
1818
mkdir sincei_output/atac
@@ -39,7 +39,7 @@ quality cells in this data, such as:
3939
- high level of secondary/supplementary alignments (filtered using
4040
``--samFlagExclude/Include``)
4141

42-
.. code:: {bash}
42+
.. code:: bash
4343
4444
4545
for r in 1 2
@@ -65,7 +65,7 @@ quality cells in this data, such as:
6565
visualized using the `MultiQC tool <https://multiqc.info/docs/>`__, to
6666
select appropriate list of cells to include for counting.
6767

68-
.. code:: {bash}
68+
.. code:: bash
6969
7070
multiqc sincei_output/atac/ # results in multiqc_report.html
7171
@@ -85,7 +85,7 @@ count only high quality reads from our whitelist of barcodes.
8585
We avoid counting reads in blacklisted regions of the human genome
8686
(–blacklist).
8787

88-
.. code:: {bash}
88+
.. code:: bash
8989
9090
## merge intervals from 2 peaks bed files
9191
for f in cellranger_output_rep*/outs/atac_peaks.bed; do awk '{if(NR>51) {print $0}}' $f >> repmerged.bed; done
@@ -122,7 +122,7 @@ statistics at region and cell level (labelled as .regions.tsv and
122122
visualized using the `MultiQC tool <https://multiqc.info/docs/>`__, to
123123
select appropriate metrics to filter out the unwanted cells/regions.
124124

125-
.. code:: {bash}
125+
.. code:: bash
126126
127127
# list the metrics we can use to filter cells/regions
128128
for r in 1 2; do scCountQC -i sincei_output/atac/scCounts_atac_peaks_rep${r}.loom --describe; done
@@ -140,7 +140,7 @@ cells with <500 and >10000 detected bins (``--filterRegionArgs``). Also,
140140
we exclude the regions that are detected in too few cells (<100) or in
141141
>90% of cells (``--filterCellArgs``).
142142

143-
.. code:: {bash}
143+
.. code:: bash
144144
145145
for r in 1 2
146146
do scCountQC -i sincei_output/atac/scCounts_atac_peaks_rep${r}.loom \
@@ -167,7 +167,7 @@ counts can now be combined for downstream analysis. We provide a tool
167167
common features. Concatenating the filtered cells for the 2 replicates
168168
would result in a total of >12K cells.
169169

170-
.. code:: {bash}
170+
.. code:: bash
171171
172172
scCombineCounts \
173173
-i sincei_output/atac/scCounts_atac_peaks_filtered_rep1.loom \
@@ -183,7 +183,7 @@ would result in a total of >12K cells.
183183
Finally, we will apply LSA on the filtered dataset to reduce the
184184
dimentionality to 30 Topics, combined with louvain clustering.
185185

186-
.. code:: {bash}
186+
.. code:: bash
187187
188188
scClusterCells -i sincei_output/atac/scCounts_atac_peaks_filtered.merged.loom \
189189
-m LSA --clusterResolution 1 \
@@ -202,7 +202,7 @@ a biologically meaningful way.
202202
We can color our UMAP output from ``scClusterCells`` with the cell-type
203203
information based on FACS-sorting from sortChIC.
204204

205-
.. code:: {r}
205+
.. code:: r
206206
207207
library(dplyr)
208208
library(magrittr)
@@ -275,7 +275,7 @@ files, except that we can ask for a normalized bulk signal (specified
275275
using ``--normalizeUsing`` option) . Below, we produce CPM-normalized
276276
bigwigs with 1kb bins.
277277

278-
.. code:: {bash}
278+
.. code:: bash
279279
280280
scBulkCoverage -p 20 --cellTag CB --normalizeUsing CPM --binSize 1000 \
281281
--minMappingQuality 10 --samFlagInclude 64 --samFlagExclude 2048 \

docs/content/tutorials/sincei_tutorial_sortChIC.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ We can color our UMAP output from :ref:`scClusterCells` with the cell-type infor
188188
ggsave(plot=pl, "sincei_output/UMAP_compared_withOrig.png", dpi=300, width = 11, height = 6)
189189
190190
191-
.. image:: ./../images/UMAP_compared_withOrig.png
191+
.. image:: ./../images/UMAP_compared_withOrig_sortChIC.png
192192
:height: 800px
193193
:width: 1600 px
194194
:scale: 50 %

0 commit comments

Comments
 (0)