Skip to content

Commit

Permalink
Rename the module to DafJL to satisfy Julia package name requirement.
Browse files Browse the repository at this point in the history
  • Loading branch information
orenbenkiki committed Sep 20, 2024
1 parent fa7d1c3 commit 0d36c37
Show file tree
Hide file tree
Showing 89 changed files with 3,274 additions and 3,286 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "Daf"
name = "DafJL"
uuid = "1375bf9c-a47d-45a1-aad5-626dd8629d98"
authors = ["Oren Ben-Kiki <[email protected]>"]
version = "0.1.0"
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# DAF - Data in Axes in Formats

The `Daf.jl` package provides a uniform generic interface for accessing 1D and 2D data arranged along some set of axes.
The `DafJL` package provides a uniform generic interface for accessing 1D and 2D data arranged along some set of axes.
This is a much-needed generalization of the [AnnData](https://github.com/scverse/anndata) functionality. Unlike other
generalizations (e.g., [Muon](https://github.com/scverse/mudata)), `Daf` attempts to provide a simple generic unified 1D
and 2D data storage, which can be used for "any" purpose, not necessarily scRNA and/or ATAC data, though such use cases
were the driving force for the development of `Daf.`
were the driving force for the development of `Daf`.

The key features of `Daf` are:

Expand All @@ -26,13 +26,13 @@ The key features of `Daf` are:
- There is explicit control over 2D data layout (row or column major), and support for both dense and sparse matrices,
both of which are crucial for performance.
- This is implemented in Julia, as a seed for efficient computation pipelines (which are hard to implement in Python
without resorting to using C/C++ code). WIP: a [Daf.py](https://pypi.org/project/daf/) Python package, which
is a thin wrapper around `Daf.jl` allowing efficient (zero-copy) access to the data using `numpy`, `scipy` and
without resorting to using C/C++ code). WIP: a [DafPY](https://pypi.org/project/dafpy/) Python package, which
is a thin wrapper around `DafJL` allowing efficient (zero-copy) access to the data using `numpy`, `scipy` and
`pandas` vector and matrix types. WIP: Implement a similar R package using
[JuliaCall](https://libraries.io/cran/JuliaCall) to allow direct access to `Daf.jl` from R
[JuliaCall](https://libraries.io/cran/JuliaCall) to allow direct access to `DafJL` from R
code.

See the [v0.1.0 documentation](https://tanaylab.github.io/Daf.jl/v0.1.0) for details.
See the [v0.1.0 documentation](https://tanaylab.github.io/DafJL/v0.1.0) for details.

## Status

Expand Down Expand Up @@ -125,9 +125,9 @@ interoperability with legacy computation pipelines.

## Installation

Just `Pkg.add("Daf")`, like installing any other Julia package.
Just `Pkg.add("DafJ")`, like installing any other Julia package.

To install the Python `Daf` [package](https://github.com/tanaylab/Daf.py), just `pip install daf`, like installing any
To install the Python `Daf` [package](https://github.com/tanaylab/DafPY), just `pip install dafpy`, like installing any
other Python package.

TODO: To install the R wrappers...
Expand Down
6 changes: 3 additions & 3 deletions deps/aqua.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
push!(LOAD_PATH, ".")

using Aqua
using Daf
Aqua.test_ambiguities([Daf])
Aqua.test_all(Daf; ambiguities = false, unbound_args = false, deps_compat = false)
using DafJL
Aqua.test_ambiguities([DafJL])
Aqua.test_all(DafJL; ambiguities = false, unbound_args = false, deps_compat = false)
2 changes: 1 addition & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
println("Building Daf...")
println("Building DafJL...")
4 changes: 2 additions & 2 deletions deps/document.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ global_logger(detect_problems)

push!(LOAD_PATH, ".")

using Daf
using DafJL
using Pkg

PROJECT_TOML = Pkg.TOML.parsefile(joinpath(@__DIR__, "..", "Project.toml"))
Expand All @@ -36,7 +36,7 @@ makedocs(;
source = "../src",
clean = true,
doctest = true,
modules = [Daf],
modules = [DafJL],
highlightsig = true,
sitename = "$(NAME).jl v$(VERSION)",
draft = false,
Expand Down
4 changes: 2 additions & 2 deletions deps/jet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ global_logger(detect_problems)
push!(LOAD_PATH, ".")

using JET
using Daf
using DafJL

println(report_package("Daf"))
println(report_package("DafJL"))

if seen_problems
exit(1)
Expand Down
2 changes: 1 addition & 1 deletion deps/static_analysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ language_server.global_env.symbols = symbols
language_server.global_env.extended_methods = SymbolServer.collect_extended_methods(language_server.global_env.symbols)
language_server.global_env.project_deps = collect(keys(language_server.global_env.symbols))

file = StaticLint.loadfile(language_server, abspath("src/Daf.jl"))
file = StaticLint.loadfile(language_server, abspath("src/DafJL.jl"))
StaticLint.semantic_pass(LanguageServer.getroot(file))

global errors = 0
Expand Down
2 changes: 1 addition & 1 deletion docs/v0.1.0/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-09-20T10:36:03","documenter_version":"1.5.0"}}
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-09-20T12:57:28","documenter_version":"1.5.0"}}
40 changes: 20 additions & 20 deletions docs/v0.1.0/adapters.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Adapters · Daf.jl v0.1.0
<title>Adapters · DafJL.jl v0.1.0
</title>
<meta name="title" content="Adapters · Daf.jl v0.1.0"/>
<meta property="og:title" content="Adapters · Daf.jl v0.1.0"/>
<meta property="twitter:title" content="Adapters · Daf.jl v0.1.0"/>
<meta name="description" content="Documentation for Daf.jl v0.1.0."/>
<meta property="og:description" content="Documentation for Daf.jl v0.1.0."/>
<meta property="twitter:description" content="Documentation for Daf.jl v0.1.0."/>
<meta name="title" content="Adapters · DafJL.jl v0.1.0"/>
<meta property="og:title" content="Adapters · DafJL.jl v0.1.0"/>
<meta property="twitter:title" content="Adapters · DafJL.jl v0.1.0"/>
<meta name="description" content="Documentation for DafJL.jl v0.1.0."/>
<meta property="og:description" content="Documentation for DafJL.jl v0.1.0."/>
<meta property="twitter:description" content="Documentation for DafJL.jl v0.1.0."/>
<script data-outdated-warner src="assets/warner.js">
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/>
Expand Down Expand Up @@ -44,11 +44,11 @@
<div id="documenter">
<nav class="docs-sidebar">
<a class="docs-logo" href="index.html">
<img src="assets/logo.svg" alt="Daf.jl v0.1.0 logo"/>
<img src="assets/logo.svg" alt="DafJL.jl v0.1.0 logo"/>
</a>
<div class="docs-package-name">
<span class="docs-autofit">
<a href="index.html">Daf.jl v0.1.0
<a href="index.html">DafJL.jl v0.1.0
</a>
</span>
</div>
Expand Down Expand Up @@ -220,7 +220,7 @@
</ul>
</nav>
<div class="docs-right">
<a class="docs-navbar-link" href="https://github.com/tanaylab/Daf.jl/blob/main{path}?plain=1#L{line}" title="View the repository on GitHub">
<a class="docs-navbar-link" href="https://github.com/tanaylab/DafJL.jl/blob/main{path}?plain=1#L{line}" title="View the repository on GitHub">
<span class="docs-icon fa-brands">
</span>
<span class="docs-label is-hidden-touch">GitHub
Expand All @@ -245,8 +245,8 @@ <h1 id="Adapters">
<header>
<a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring">
</a>
<a class="docstring-binding" id="Daf.Adapters" href="#Daf.Adapters">
<code>Daf.Adapters
<a class="docstring-binding" id="DafJL.Adapters" href="#DafJL.Adapters">
<code>DafJL.Adapters
</code>
</a>
<span class="docstring-category">Module
Expand All @@ -257,7 +257,7 @@ <h1 id="Adapters">
<p>Adapt
<code>Daf
</code> data to a
<a href="computations.html#Daf.Computations.@computation">
<a href="computations.html#DafJL.Computations.@computation">
<code>@computation
</code>
</a>.
Expand All @@ -269,8 +269,8 @@ <h1 id="Adapters">
<header>
<a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring">
</a>
<a class="docstring-binding" id="Daf.Adapters.adapter" href="#Daf.Adapters.adapter">
<code>Daf.Adapters.adapter
<a class="docstring-binding" id="DafJL.Adapters.adapter" href="#DafJL.Adapters.adapter">
<code>DafJL.Adapters.adapter
</code>
</a>
<span class="docstring-category">Function
Expand Down Expand Up @@ -325,19 +325,19 @@ <h1 id="Adapters">
</code>. If the
<code>computation
</code> was annotated by
<a href="computations.html#Daf.Computations.@computation">
<a href="computations.html#DafJL.Computations.@computation">
<code>@computation
</code>
</a>, then its
<a href="contracts.html#Daf.Contracts.Contract">
<a href="contracts.html#DafJL.Contracts.Contract">
<code>Contract
</code>
</a> will be explicitly documented so you will know exactly what to provide.
</li>
<li>Chain this read-only view with an empty
<code>capture
</code> writable data set (by default,
<a href="memory_format.html#Daf.MemoryFormat.MemoryDaf">
<a href="memory_format.html#DafJL.MemoryFormat.MemoryDaf">
<code>MemoryDaf
</code>
</a>) and pass the result to the
Expand All @@ -353,7 +353,7 @@ <h1 id="Adapters">
</code> to create a view of the output, and copy this subset to the original
<code>daf
</code> data set, using (using
<a href="copies.html#Daf.Copies.copy_all!">
<a href="copies.html#DafJL.Copies.copy_all!">
<code>copy_all!
</code>
</a>,
Expand Down Expand Up @@ -392,7 +392,7 @@ <h1 id="Adapters">
</code>
</pre>
<p>This idiom allows
<a href="computations.html#Daf.Computations.@computation">
<a href="computations.html#DafJL.Computations.@computation">
<code>@computation
</code>
</a> functions to use clear generic names for their inputs and outputs, and still apply them to arbitrary data sets that use more specific names. One can even invoke the same computation with different parameter values, and store the different results in the same data set under different names.
Expand Down
56 changes: 28 additions & 28 deletions docs/v0.1.0/anndata_format.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>AnnData Format · Daf.jl v0.1.0
<title>AnnData Format · DafJL.jl v0.1.0
</title>
<meta name="title" content="AnnData Format · Daf.jl v0.1.0"/>
<meta property="og:title" content="AnnData Format · Daf.jl v0.1.0"/>
<meta property="twitter:title" content="AnnData Format · Daf.jl v0.1.0"/>
<meta name="description" content="Documentation for Daf.jl v0.1.0."/>
<meta property="og:description" content="Documentation for Daf.jl v0.1.0."/>
<meta property="twitter:description" content="Documentation for Daf.jl v0.1.0."/>
<meta name="title" content="AnnData Format · DafJL.jl v0.1.0"/>
<meta property="og:title" content="AnnData Format · DafJL.jl v0.1.0"/>
<meta property="twitter:title" content="AnnData Format · DafJL.jl v0.1.0"/>
<meta name="description" content="Documentation for DafJL.jl v0.1.0."/>
<meta property="og:description" content="Documentation for DafJL.jl v0.1.0."/>
<meta property="twitter:description" content="Documentation for DafJL.jl v0.1.0."/>
<script data-outdated-warner src="assets/warner.js">
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/>
Expand Down Expand Up @@ -44,11 +44,11 @@
<div id="documenter">
<nav class="docs-sidebar">
<a class="docs-logo" href="index.html">
<img src="assets/logo.svg" alt="Daf.jl v0.1.0 logo"/>
<img src="assets/logo.svg" alt="DafJL.jl v0.1.0 logo"/>
</a>
<div class="docs-package-name">
<span class="docs-autofit">
<a href="index.html">Daf.jl v0.1.0
<a href="index.html">DafJL.jl v0.1.0
</a>
</span>
</div>
Expand Down Expand Up @@ -220,7 +220,7 @@
</ul>
</nav>
<div class="docs-right">
<a class="docs-navbar-link" href="https://github.com/tanaylab/Daf.jl/blob/main{path}?plain=1#L{line}" title="View the repository on GitHub">
<a class="docs-navbar-link" href="https://github.com/tanaylab/DafJL.jl/blob/main{path}?plain=1#L{line}" title="View the repository on GitHub">
<span class="docs-icon fa-brands">
</span>
<span class="docs-label is-hidden-touch">GitHub
Expand All @@ -245,8 +245,8 @@ <h1 id="AnnData-Format">
<header>
<a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring">
</a>
<a class="docstring-binding" id="Daf.AnnDataFormat" href="#Daf.AnnDataFormat">
<code>Daf.AnnDataFormat
<a class="docstring-binding" id="DafJL.AnnDataFormat" href="#DafJL.AnnDataFormat">
<code>DafJL.AnnDataFormat
</code>
</a>
<span class="docstring-category">Module
Expand Down Expand Up @@ -313,7 +313,7 @@ <h1 id="AnnData-Format">
</code> data as
<code>AnnData
</code>, we pick two specific axes and rename them to &quot;obs&quot; and &quot;var&quot;, pick a specific matrix property of these axes and rename it to &quot;X&quot;, and
<a href="matrix_layouts.html#Daf.MatrixLayouts.relayout!">
<a href="matrix_layouts.html#DafJL.MatrixLayouts.relayout!">
<code>relayout!
</code>
</a> it if needed so
Expand Down Expand Up @@ -400,21 +400,21 @@ <h1 id="AnnData-Format">
</code> invariant that all accessed data is column-major, at least for square matrices. This is bad because the invariant greatly simplifies
<code>Daf
</code> client code. Forcing clients to check the data layout and calling
<a href="matrix_layouts.html#Daf.MatrixLayouts.relayout!">
<a href="matrix_layouts.html#DafJL.MatrixLayouts.relayout!">
<code>relayout!
</code>
</a> would add a lot of error-prone boilerplate to our users.
</li>
<li>We can
<a href="matrix_layouts.html#Daf.MatrixLayouts.relayout!">
<a href="matrix_layouts.html#DafJL.MatrixLayouts.relayout!">
<code>relayout!
</code>
</a> the data when copying it between
<code>AnnData
</code> and
<code>Daf
</code>. This is bad because it would force us to duplicate the data. More importantly, there is typically a good reason for the layout of the data. For example, assume a directed graph between cells. A common way to store is is to have a square matrix where each row contains the weights of the edges originating in one cell, connecting it to all other cells. This allows code to efficiently &quot;loop on all cells; loop on all outgoing edges&quot;. If we
<a href="matrix_layouts.html#Daf.MatrixLayouts.relayout!">
<a href="matrix_layouts.html#DafJL.MatrixLayouts.relayout!">
<code>relayout!
</code>
</a> the data, then such a loop would become extremely inefficient.
Expand All @@ -441,7 +441,7 @@ <h1 id="AnnData-Format">
</code> with the row-major data from
<code>AnnData
</code> and if asked for the outher layout, will
<a href="matrix_layouts.html#Daf.MatrixLayouts.relayout!">
<a href="matrix_layouts.html#DafJL.MatrixLayouts.relayout!">
<code>relayout!
</code>
</a> it (and store/cache the result).
Expand All @@ -453,8 +453,8 @@ <h1 id="AnnData-Format">
<header>
<a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring">
</a>
<a class="docstring-binding" id="Daf.AnnDataFormat.anndata_as_daf" href="#Daf.AnnDataFormat.anndata_as_daf">
<code>Daf.AnnDataFormat.anndata_as_daf
<a class="docstring-binding" id="DafJL.AnnDataFormat.anndata_as_daf" href="#DafJL.AnnDataFormat.anndata_as_daf">
<code>DafJL.AnnDataFormat.anndata_as_daf
</code>
</a>
<span class="docstring-category">Function
Expand All @@ -478,7 +478,7 @@ <h1 id="AnnData-Format">
</code> as a
<code>Daf
</code> data set, specifically using a
<a href="memory_format.html#Daf.MemoryFormat.MemoryDaf">
<a href="memory_format.html#DafJL.MemoryFormat.MemoryDaf">
<code>MemoryDaf
</code>
</a>. This doesn&#39;t duplicate matrices or vectors, but acts as a view containing references to the same ones. Adding and/or deleting data in the view using the
Expand Down Expand Up @@ -530,8 +530,8 @@ <h1 id="AnnData-Format">
<header>
<a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring">
</a>
<a class="docstring-binding" id="Daf.AnnDataFormat.daf_as_anndata" href="#Daf.AnnDataFormat.daf_as_anndata">
<code>Daf.AnnDataFormat.daf_as_anndata
<a class="docstring-binding" id="DafJL.AnnDataFormat.daf_as_anndata" href="#DafJL.AnnDataFormat.daf_as_anndata">
<code>DafJL.AnnDataFormat.daf_as_anndata
</code>
</a>
<span class="docstring-category">Function
Expand Down Expand Up @@ -600,20 +600,20 @@ <h2 id="Index">
</h2>
<ul>
<li>
<a href="anndata_format.html#Daf.AnnDataFormat">
<code>Daf.AnnDataFormat
<a href="anndata_format.html#DafJL.AnnDataFormat">
<code>DafJL.AnnDataFormat
</code>
</a>
</li>
<li>
<a href="anndata_format.html#Daf.AnnDataFormat.anndata_as_daf">
<code>Daf.AnnDataFormat.anndata_as_daf
<a href="anndata_format.html#DafJL.AnnDataFormat.anndata_as_daf">
<code>DafJL.AnnDataFormat.anndata_as_daf
</code>
</a>
</li>
<li>
<a href="anndata_format.html#Daf.AnnDataFormat.daf_as_anndata">
<code>Daf.AnnDataFormat.daf_as_anndata
<a href="anndata_format.html#DafJL.AnnDataFormat.daf_as_anndata">
<code>DafJL.AnnDataFormat.daf_as_anndata
</code>
</a>
</li>
Expand Down
Loading

0 comments on commit 0d36c37

Please sign in to comment.