Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhang committed Sep 29, 2024
1 parent af733ad commit 2369f25
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# Single-cell genomics preprocessing package
# Single-cell genomics preprocessing package

This tool is an automated pipeline for preprocessing single-cell genomics data.
It is designed to take raw data (fastq files) from a variety of single-cell genomics
platforms and a seqspec file as input, and output a count matrix (RNA) or a fragment file (ATAC)
for downstream analysis.

The seqspec files for common platforms can be found here: https://github.com/IGVF/seqspec.
1 change: 1 addition & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ methods.
.. autosummary::
:toctree: _autosummary

make_genome_index
align
make_fragment

21 changes: 20 additions & 1 deletion python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@ use tikv_jemallocator::Jemalloc;
#[global_allocator]
static GLOBAL: Jemalloc = Jemalloc;

/// Create a genome index from a fasta file.
///
/// Parameters
/// ----------
///
/// fasta: Path
/// File path to the fasta file.
/// genome_prefix: Path
/// File path to the genome index.
#[pyfunction]
fn make_genome_index(
fasta: PathBuf,
genome_prefix: PathBuf,
) -> Result<()> {
FMIndex::new(fasta, genome_prefix).unwrap();
Ok(())
}

/// Align fastq reads to the reference genome and generate unique fragments.
///
/// Parameters
Expand All @@ -31,7 +49,7 @@ static GLOBAL: Jemalloc = Jemalloc;
/// seqspec: Path
/// File path to the sequencing specification, see https://github.com/pachterlab/seqspec.
/// genom_index: Path
/// File path to the genome index.
/// File path to the genome index. The genome index can be created by the `make_genome_index` function.
/// modality: str
/// The modality of the sequencing data, e.g., "rna" or "atac".
/// output_bam: Path | None
Expand Down Expand Up @@ -237,6 +255,7 @@ fn precellar(m: &Bound<'_, PyModule>) -> PyResult<()> {

m.add("__version__", env!("CARGO_PKG_VERSION"))?;

m.add_function(wrap_pyfunction!(make_genome_index, m)?)?;
m.add_function(wrap_pyfunction!(align, m)?)?;
m.add_function(wrap_pyfunction!(make_fragment, m)?)?;

Expand Down

0 comments on commit 2369f25

Please sign in to comment.