Skip to content

Instantly share code, notes, and snippets.

View alimanfoo's full-sized avatar

Alistair Miles alimanfoo

View GitHub Profile
@alimanfoo
alimanfoo / find_runs.py
Created November 5, 2017 23:53
Find runs of consecutive items in a numpy array.
import numpy as np
def find_runs(x):
"""Find runs of consecutive items in an array."""
# ensure array
x = np.asanyarray(x)
if x.ndim != 1:
raise ValueError('only 1D array supported')
@alimanfoo
alimanfoo / zarr-links.ipynb
Last active February 28, 2024 19:01
How to create links with zarr
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alimanfoo
alimanfoo / dsx_exon5_pi.csv
Last active October 19, 2020 21:48
dsx_pi_20201019.ipynb
chrom pos accessible pi
2R 48712957 True 0.0
2R 48712958 True 0.0
2R 48712959 True 0.0
2R 48712960 True 0.0
2R 48712961 True 0.0
2R 48712962 True 0.00042016568154848086
2R 48712963 True 0.0
2R 48712964 True 0.0
2R 48712965 True 0.0