This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requires libtiff command line tools to be installed (tiffinfo/tiffset) | |
# this is only intended to be run on SVS files from Versa scanners which display as bright pink | |
# ideally this should be run before importing to OMERO | |
# the recommended pre-import workflow is: | |
# 1. Make sure Bio-Formats command line tools are available. | |
# See https://docs.openmicroscopy.org/bio-formats/latest/users/comlinetools/index.html | |
# 2. Use "showinf -crop 0,0,512,512" on the SVS file to verify that it is bright pink. | |
# 3. Back up the SVS file. | |
# 4. Run this script to update the file in-place ("./svs-fix-colors.sh /path/to/file.svs"). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ashlar.fileseries import FileSeriesReader | |
from ashlar.reg import EdgeAligner, Mosaic, PyramidWriter | |
import numpy as np | |
import pandas as pd | |
import skimage.exposure, skimage.filters, skimage.io | |
import sys | |
import tifffile | |
input_tif_path = sys.argv[1] | |
pattern = "20231124_203726_S1_C902_P99_N99_F{series}.TIF" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
params { | |
config_profile_description = 'HMS O2 profile.' | |
config_profile_contact = 'Jeremy Muhlich' | |
config_profile_url = 'https://...' | |
singularity_cache_dir = '/n/groups/lsp/mcmicro/singularity' | |
} | |
process { | |
executor = "slurm" | |
queue = { task.time < 12.h ? 'short' : task.time < 5.d ? 'medium' : 'long' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from ashlar.reg import EdgeAligner, Mosaic, PyramidWriter | |
from ashlar.scripts.ashlar import build_reader, HelpFormatter | |
import networkx as nx | |
parser = argparse.ArgumentParser( | |
description='Stitch one multi-tile image with strict stage path following', | |
formatter_class=HelpFormatter, | |
) | |
parser.add_argument( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from ashlar import reg, transform | |
import ashlar.scripts.ashlar as ascript | |
from magicgui import magicgui | |
import napari | |
import numpy as np | |
import skimage | |
import sys | |
from typing import List |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bibtexparser | |
from pylatexenc.latex2text import LatexNodes2Text | |
import sys | |
import yaml | |
lt = LatexNodes2Text() | |
with open(sys.argv[1]) as f: | |
db = bibtexparser.load(f) | |
for e in db.entries: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# usage: ome-tiff-set-resolution.py [-h] image size | |
# | |
# Set physical pixel dimensions in an OME-TIFF | |
# | |
# positional arguments: | |
# image OME-TIFF file to modify | |
# size pixel width in microns | |
# | |
# optional arguments: | |
# -h, --help show this help message and exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import re | |
import importlib | |
import time | |
from pysb.simulator import ScipyOdeSimulator | |
import pysb.bng | |
import numpy as np | |
def benchmark(model, sim_kwargs): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "start" | |
for ((i=1; i<=32000; i++)); do | |
echo "STDERR $i" >&2 | |
done | |
echo "normal 1" | |
sleep 1 | |
for ((i=1; i<=32000; i++)); do | |
echo "STDERR $i" >&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import io | |
import warnings | |
import xml.etree.ElementTree | |
import tifffile | |
if len(sys.argv) != 2: | |
print(f"Usage: ometiff-channel-names.py input.ome.tif") | |
print("Print the channel names for the first image in an OME-TIFF file.") | |
sys.exit(1) |
NewerOlder