Skip to content

Instantly share code, notes, and snippets.

@aaronwolen
aaronwolen / output.txt
Last active April 11, 2024 14:23
tiledbsoma query stats
tiledbsoma.__version__ 1.5.0rc0.post289.dev1706826235
TileDB-Py tiledb.version() (0, 27, 1)
TileDB core version 2.21.1
libtiledbsoma version() libtiledb=2.21.1
python version 3.11.8.final.0
OS version Darwin 23.3.0
Checking tiledb...
@aaronwolen
aaronwolen / tiledb-batched-reads.R
Last active November 14, 2023 21:35
Example using TileDB-R's batched reader API.
#! /usr/bin/env Rscript
library(tiledb)
library(data.table)
library(nycflights13)
TILEDB_URI <- file.path(tempdir(), "tiledb-flights")
if (dir.exists(TILEDB_URI)) unlink(TILEDB_URI, recursive = TRUE)
STATS_DIR <- file.path(getwd(), "stats")
@aaronwolen
aaronwolen / README.md
Last active May 30, 2023 15:52
Quokka filters

Quokka Filters

@aaronwolen
aaronwolen / tiledb-dense-array-queries.md
Created April 7, 2023 14:56
Quick examples of querying dense arrays with TileDB-R

TileDB Dense Array Queries

Setup

Create a dense matrix random integers.

library(tiledb)
set.seed(123)
#!/usr/bin/env Rscript
library(docopt)
# Changelog
# ---------
# 0.1.1: Consolidate fragment metadata and commits after ingestion
# 0.1.0: Initial release
# docopt ------------------------------------------------------------------
@aaronwolen
aaronwolen / README.md
Last active July 11, 2022 12:52
allen-institute-merscope

README

Setup

Use conda to install the TileDB Python API and other dependencies.

mamba env create -f environment.yaml
conda activate aind-demo

Our starting point is raw counts in a sparse matrix, smat (4 genes, 5 cells):

   c1 c2 c3 c4 c5
g1  8  .  .  .  5
g2  .  5  7  .  .
g3  1  .  .  5  .
g4  8  .  .  7  .
13,15c13,17
< dtype=object)), ('real_start_pos', array([43338668, 43341403, 43341867, 43342848, 43342933, 43345733,
< 43346403, 43349192, 43350860, 43351009], dtype=uint32)), ('end_pos', array([43338668, 43341403, 43341867, 43342848, 43342934, 43345733,
< 43346403, 43349192, 43350860, 43351019], dtype=uint32)), ('qual', array([ 49.71, 50. , 50. , 50. , 50. , 49.27, 49.57, 46.14,
---
> dtype=object)), ('real_start_pos', array([ 393434177, 2913177362, 3658721541, 2359512986, 4034073792,
> 2945374281, 1320880414, 2723889732, 1316948380, 1664381440],
> dtype=uint32)), ('end_pos', array([ 393434177, 2913177168, 3658721541, 2359496344, 4034073792,
> 2408503627, 1320880152, 2723889732, 1325336600, 1664381440],
> dtype=uint32)), ('qual', array([ 49.71, 50. , 50. , 50. , 50. , 49.27, 49.57, 46.14,
@aaronwolen
aaronwolen / open_door_notification.yaml
Last active February 28, 2024 16:24
Home-Assistant Blueprint: Open Door Notifications
# version: 1.0.1
# changelog:
# - Support for multiple door sensors
# - Initial release
blueprint:
name: Open Door Notification
description: Send a notification when a door is left open.
domain: automation
input:
@aaronwolen
aaronwolen / retrieve-aws-credentials.py
Created March 9, 2022 20:24
retrieve-aws-credentials
# access aws credentials for a profile from ~/.aws/credentials
import boto3
profile = 'default'
session = boto3.Session(profile_name=profile)
credentials = session.get_credentials()
credentials.access_key
credentials.secret_key