Skip to content

Commit

Permalink
fix table style
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jan 22, 2024
1 parent fa7b66c commit df9c252
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 14 deletions.
56 changes: 52 additions & 4 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,55 @@ <h1 id="eheat">eheat</h1>
</tr>
</tbody>
</table>
<p>Other non-lazied operations: | Operations | BPCells | BPCellsArray | Note | | —————– | —————- | ———————— | —————- | | row/col summarize | matrix_stats | matrix_stats | | | row summarize | rowSums,rowMeans | rowSums,rowMeans,rowVars | | | col summarize | colSums,colMeans | colSums,colMeans,colVars | | | Multiplication | %<em>% | %</em>% | For some methods | | Crossproduct | | crossprod | For some methods | | svd | svds | SpectraParam | |</p>
<p>Other non-lazied operations:</p>
<table>
<thead>
<tr class="header">
<th>Operations</th>
<th>BPCells</th>
<th>BPCellsArray</th>
<th>Note</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td>row/col summarize</td>
<td>matrix_stats</td>
<td>matrix_stats</td>
<td></td>
</tr>
<tr class="even">
<td>row summarize</td>
<td>rowSums,rowMeans</td>
<td>rowSums,rowMeans,rowVars</td>
<td></td>
</tr>
<tr class="odd">
<td>col summarize</td>
<td>colSums,colMeans</td>
<td>colSums,colMeans,colVars</td>
<td></td>
</tr>
<tr class="even">
<td>Multiplication</td>
<td>%*%</td>
<td>%*%</td>
<td>For some methods</td>
</tr>
<tr class="odd">
<td>Crossproduct</td>
<td></td>
<td>crossprod</td>
<td>For some methods</td>
</tr>
<tr class="even">
<td>svd</td>
<td>svds</td>
<td>SpectraParam</td>
<td></td>
</tr>
</tbody>
</table>
<h2 id="matrix-storage-format">Matrix Storage Format</h2>
<p>BPCells provide three format: 1. Directory of files 2. Hdf5 file 3. R object Details see: <a href="https://bnprks.github.io/BPCells/articles/web-only/bitpacking-format.html">https://bnprks.github.io/BPCells/articles/web-only/bitpacking-format.html</a></p>
<p><code>BPCellsArray</code> only implement the Directory of files format, which is used across the package of <code>BPCells</code>.</p>
Expand Down Expand Up @@ -821,7 +869,7 @@ <h2 id="matrix-storage-format">Matrix Storage Format</h2>
<span id="cb5-8"><a href="#cb5-8" aria-hidden="true"></a><span class="co">#&gt; Storage order: column major</span></span>
<span id="cb5-9"><a href="#cb5-9" aria-hidden="true"></a><span class="co">#&gt; </span></span>
<span id="cb5-10"><a href="#cb5-10" aria-hidden="true"></a><span class="co">#&gt; Queued Operations:</span></span>
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true"></a><span class="co">#&gt; 1. Load compressed matrix from directory /tmp/RtmpAq3VNF/BPCells26870138835a2e</span></span></code></pre></div>
<span id="cb5-11"><a href="#cb5-11" aria-hidden="true"></a><span class="co">#&gt; 1. Load compressed matrix from directory /tmp/RtmpJiXxC7/BPCells26938c5c1875ae</span></span></code></pre></div>
<p>If you do delayed operations with this assay, the class may be changed, that’s because all of BPCells operations are lazy, no real work is performed on the matrix until the result needs to be returned as an R object or written to disk. You can coerce it into a dense matrix or <code>dgCMatrix</code> to get a actual R object.</p>
<div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a><span class="kw">assay</span>(sce, <span class="st">&quot;counts&quot;</span>)[<span class="dv">1</span><span class="op">:</span><span class="dv">10</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">10</span>]</span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true"></a><span class="co">#&gt; 10 x 10 DelayedMatrix object with class BPCellsSubsetMatrix</span></span>
Expand All @@ -833,7 +881,7 @@ <h2 id="matrix-storage-format">Matrix Storage Format</h2>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true"></a><span class="co">#&gt; Storage order: column major</span></span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true"></a><span class="co">#&gt; </span></span>
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true"></a><span class="co">#&gt; Queued Operations:</span></span>
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true"></a><span class="co">#&gt; 1. Load compressed matrix from directory /tmp/RtmpAq3VNF/BPCells26870138835a2e</span></span>
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true"></a><span class="co">#&gt; 1. Load compressed matrix from directory /tmp/RtmpJiXxC7/BPCells26938c5c1875ae</span></span>
<span id="cb6-12"><a href="#cb6-12" aria-hidden="true"></a><span class="co">#&gt; 2. Select rows: 1, 2 ... 10 and cols: 1, 2 ... 10</span></span>
<span id="cb6-13"><a href="#cb6-13" aria-hidden="true"></a><span class="kw">as.matrix</span>(<span class="kw">assay</span>(sce, <span class="st">&quot;counts&quot;</span>)[<span class="dv">1</span><span class="op">:</span><span class="dv">10</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">10</span>])</span>
<span id="cb6-14"><a href="#cb6-14" aria-hidden="true"></a><span class="co">#&gt; Cell_001 Cell_002 Cell_003 Cell_004 Cell_005 Cell_006 Cell_007</span></span>
Expand Down Expand Up @@ -887,7 +935,7 @@ <h2 id="matrix-storage-format">Matrix Storage Format</h2>
<span id="cb8-9"><a href="#cb8-9" aria-hidden="true"></a><span class="co">#&gt; Storage order: column major</span></span>
<span id="cb8-10"><a href="#cb8-10" aria-hidden="true"></a><span class="co">#&gt; </span></span>
<span id="cb8-11"><a href="#cb8-11" aria-hidden="true"></a><span class="co">#&gt; Queued Operations:</span></span>
<span id="cb8-12"><a href="#cb8-12" aria-hidden="true"></a><span class="co">#&gt; 1. Load compressed matrix from directory /tmp/RtmpAq3VNF/BPCells26870138835a2e</span></span>
<span id="cb8-12"><a href="#cb8-12" aria-hidden="true"></a><span class="co">#&gt; 1. Load compressed matrix from directory /tmp/RtmpJiXxC7/BPCells26938c5c1875ae</span></span>
<span id="cb8-13"><a href="#cb8-13" aria-hidden="true"></a><span class="co">#&gt; 2. Scale columns by 0.984, 1.05 ... 1</span></span>
<span id="cb8-14"><a href="#cb8-14" aria-hidden="true"></a><span class="co">#&gt; 3. Transform log1p</span></span>
<span id="cb8-15"><a href="#cb8-15" aria-hidden="true"></a><span class="co">#&gt; 4. Scale by 1.44</span></span></code></pre></div>
Expand Down
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ Here is a summarized delayed operations in BPCells:
| log(1+x) | `log1p`,`log1p_slow` | `log1p`,`log1p_slow` |
| Power | `pow_slow`,`^` | `pow_slow`,`^` |

Other non-lazied operations: | Operations | BPCells | BPCellsArray |
Note | | —————– | —————- | ———————— | —————- | | row/col summarize |
matrix\_stats | matrix\_stats | | | row summarize | rowSums,rowMeans |
rowSums,rowMeans,rowVars | | | col summarize | colSums,colMeans |
colSums,colMeans,colVars | | | Multiplication | %*% | %*% | For some
methods | | Crossproduct | | crossprod | For some methods | | svd | svds
| SpectraParam | |
Other non-lazied operations:

| Operations | BPCells | BPCellsArray | Note |
| ----------------- | ---------------- | ------------------------ | ---------------- |
| row/col summarize | matrix\_stats | matrix\_stats | |
| row summarize | rowSums,rowMeans | rowSums,rowMeans,rowVars | |
| col summarize | colSums,colMeans | colSums,colMeans,colVars | |
| Multiplication | %\*% | %\*% | For some methods |
| Crossproduct | | crossprod | For some methods |
| svd | svds | SpectraParam | |

## Matrix Storage Format

Expand Down Expand Up @@ -175,7 +178,7 @@ assay(sce, "counts")
#> Storage order: column major
#>
#> Queued Operations:
#> 1. Load compressed matrix from directory /tmp/RtmpAq3VNF/BPCells26870138835a2e
#> 1. Load compressed matrix from directory /tmp/RtmpJiXxC7/BPCells26938c5c1875ae
```

If you do delayed operations with this assay, the class may be changed,
Expand All @@ -195,7 +198,7 @@ assay(sce, "counts")[1:10, 1:10]
#> Storage order: column major
#>
#> Queued Operations:
#> 1. Load compressed matrix from directory /tmp/RtmpAq3VNF/BPCells26870138835a2e
#> 1. Load compressed matrix from directory /tmp/RtmpJiXxC7/BPCells26938c5c1875ae
#> 2. Select rows: 1, 2 ... 10 and cols: 1, 2 ... 10
as.matrix(assay(sce, "counts")[1:10, 1:10])
#> Cell_001 Cell_002 Cell_003 Cell_004 Cell_005 Cell_006 Cell_007
Expand Down Expand Up @@ -260,7 +263,7 @@ assay(sce, "logcounts")
#> Storage order: column major
#>
#> Queued Operations:
#> 1. Load compressed matrix from directory /tmp/RtmpAq3VNF/BPCells26870138835a2e
#> 1. Load compressed matrix from directory /tmp/RtmpJiXxC7/BPCells26938c5c1875ae
#> 2. Scale columns by 0.984, 1.05 ... 1
#> 3. Transform log1p
#> 4. Scale by 1.44
Expand Down
1 change: 1 addition & 0 deletions vignettes/BPCellsArray.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Here is a summarized delayed operations in BPCells:


Other non-lazied operations:

| Operations | BPCells | BPCellsArray | Note |
| ----------------- | ---------------- | ------------------------ | ---------------- |
| row/col summarize | matrix_stats | matrix_stats | |
Expand Down

0 comments on commit df9c252

Please sign in to comment.