Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glm pca devel #21

Merged
merged 18 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ jobs:
which sincei
sincei --help
- name: Generate coverage report
if: matrix.os == 'ubuntu-latest'
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
pytest --cov=./
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage1.xml,./coverage2.xml,!./cache
flags: unittests
name: codecov-umbrella
verbose: true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

[![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)
[![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)

## Features

Expand Down
9 changes: 7 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ def get_version(path=VPATH):
"sphinx.ext.autosummary",
"sphinxarg.ext",
"sphinx_toolbox.collapse",
"nbsphinx",
]
# 'numpydoc'

# Do not execute tutorial notebooks
nbsphinx_execute = "never"

# This is needed to suppress autosummary reordering
numpydoc_show_class_members = False

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

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

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Add any paths that contain custom static files (such as style sheets) here,
Expand Down
12 changes: 12 additions & 0 deletions docs/content/tutorials.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
Tutorials
===========

Tutorials for using sincei on the command line
-----------------------------------------------

.. toctree::
:maxdepth: 1

tutorials/sincei_tutorial_sortChIC.rst
tutorials/sincei_tutorial_10x.rst
tutorials/sincei_tutorial_10xATAC.rst

Tutorials for using sincei inside python
-----------------------------------------

.. toctree::
:maxdepth: 1

tutorials/snmC2Tseq_preprocessing
tutorials/GLM_PCA_analysis
12 changes: 6 additions & 6 deletions docs/content/tutorials/sincei_tutorial_10x.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ and processed using the standard 10x genomics `cellranger-arc
workflow <https://support.10xgenomics.com/single-cell-multiome-atac-gex/software/pipelines/latest/algorithms/overview>`__.
Below is the structure of the output directory from the workflow:

.. code:: {bash}
.. code:: bash

<output_dir>/outs:
<output_di>/outs:
├── analysis
├── atac_cut_sites.bigwig
├── atac_fragments.tsv.gz
Expand Down Expand Up @@ -49,7 +49,7 @@ sincei. These files can also be produced as part of the
For convenience, we provide a subset of this data (only chromosome 2)
`here <>`__

.. code:: {bash}
.. code:: bash

mkdir 10x_multiome && wget -O 10x_multiome/10x_multiome_testdata.tar.gz https://figshare.com/ndownloader/files/41303289
tar -xvzf 10x_multiome/10x_multiome_testdata.tar.gz ## releases 7 files
Expand All @@ -65,7 +65,7 @@ sincei also allows you to extract per barcode count distributions,
indicating which barcodes should be removed. This can be done using the
``scFilerBarcodes`` tool.

.. code:: {bash}
.. code:: bash

barcodes=737K-arc-v1.txt # cellranger-arc barcodes in this case
for r in 1 2
Expand Down Expand Up @@ -95,13 +95,13 @@ of the barcode counts.
2. scATAC-seq analysis
----------------------

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

3. scRNA-seq analysis
---------------------

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

4. Joint analysis
Expand Down
20 changes: 10 additions & 10 deletions docs/content/tutorials/sincei_tutorial_10xATAC.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ using sincei (see the parent tutorial for explanation).

Define common bash variables:

.. code:: {bash}
.. code:: bash

# create dir
mkdir sincei_output/atac
Expand All @@ -39,7 +39,7 @@ quality cells in this data, such as:
- high level of secondary/supplementary alignments (filtered using
``--samFlagExclude/Include``)

.. code:: {bash}
.. code:: bash


for r in 1 2
Expand All @@ -65,7 +65,7 @@ quality cells in this data, such as:
visualized using the `MultiQC tool <https://multiqc.info/docs/>`__, to
select appropriate list of cells to include for counting.

.. code:: {bash}
.. code:: bash

multiqc sincei_output/atac/ # results in multiqc_report.html

Expand All @@ -85,7 +85,7 @@ count only high quality reads from our whitelist of barcodes.
We avoid counting reads in blacklisted regions of the human genome
(–blacklist).

.. code:: {bash}
.. code:: bash

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

.. code:: {bash}
.. code:: bash

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

.. code:: {bash}
.. code:: bash

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

.. code:: {bash}
.. code:: bash

scCombineCounts \
-i sincei_output/atac/scCounts_atac_peaks_filtered_rep1.loom \
Expand All @@ -183,7 +183,7 @@ would result in a total of >12K cells.
Finally, we will apply LSA on the filtered dataset to reduce the
dimentionality to 30 Topics, combined with louvain clustering.

.. code:: {bash}
.. code:: bash

scClusterCells -i sincei_output/atac/scCounts_atac_peaks_filtered.merged.loom \
-m LSA --clusterResolution 1 \
Expand All @@ -202,7 +202,7 @@ a biologically meaningful way.
We can color our UMAP output from ``scClusterCells`` with the cell-type
information based on FACS-sorting from sortChIC.

.. code:: {r}
.. code:: r

library(dplyr)
library(magrittr)
Expand Down Expand Up @@ -275,7 +275,7 @@ files, except that we can ask for a normalized bulk signal (specified
using ``--normalizeUsing`` option) . Below, we produce CPM-normalized
bigwigs with 1kb bins.

.. code:: {bash}
.. code:: bash

scBulkCoverage -p 20 --cellTag CB --normalizeUsing CPM --binSize 1000 \
--minMappingQuality 10 --samFlagInclude 64 --samFlagExclude 2048 \
Expand Down
2 changes: 1 addition & 1 deletion docs/content/tutorials/sincei_tutorial_sortChIC.rst
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ We can color our UMAP output from :ref:`scClusterCells` with the cell-type infor
ggsave(plot=pl, "sincei_output/UMAP_compared_withOrig.png", dpi=300, width = 11, height = 6)


.. image:: ./../images/UMAP_compared_withOrig.png
.. image:: ./../images/UMAP_compared_withOrig_sortChIC.png
:height: 800px
:width: 1600 px
:scale: 50 %
Expand Down
Loading
Loading