Skip to content

Instantly share code, notes, and snippets.

View nerdstrike's full-sized avatar

Kieron Taylor nerdstrike

View GitHub Profile
@nerdstrike
nerdstrike / make_metadata_json_from_npg_irods_python.py
Created October 27, 2025 16:06
How one might create compliant metadata without directly writing to iRODS
#!/usr/bin/env python
# Find sample in warehouse, also find a study row
# Feed to npg_irods.metadata.lims.make_sample_metadata()
# Extract AVU objects and convert to JSON. They'll be turned back into AVUs later... but that's batching for you.
import json
import sqlalchemy
from npg.conf import IniData
from npg_irods.db import Config
#!/usr/bin/env perl
# perl simplify_aviti_runstats.pl RunStats.json
# Emits a file in the same location with the name slim_RunStats.json
use strict;
use warnings;
use JSON;
use File::Slurp qw/read_file write_file/;
my $file_name = shift;
@nerdstrike
nerdstrike / annotated_function_central.json
Last active April 23, 2021 11:02
Resource specifications in npg_seq_pipeline graph
{
"graph" : {
"label" : "NPG sequence pipeline job dependency graph",
"metadata": { "description": "Perhaps we could put pipeline defaults here?" },
"edges" : [...],
"nodes" : [
{
"id" : "pipeline_start",
"label" : "pipeline_start",
"metadata": {
@nerdstrike
nerdstrike / not_good.py
Created January 15, 2020 17:04
A one-file graphql server
import ariadne
from ariadne import QueryType, ObjectType, UnionType
import pymongo
from aiodataloader import DataLoader
from collections import defaultdict
config = {
'host': 'IPADDRESS',
'port': 'PORT',
'user': 'USER',
@nerdstrike
nerdstrike / Elasticsearch.pm
Last active January 11, 2019 15:41
Why no authenticate?
package Catalyst::Authentication::Store::ElasticSearch;
use strict;
use warnings;
use Moose;
use MooseX::NonMoose;
use Catalyst::Exception;
use Catalyst::Authentication::Store::ElasticSearch::User; # The default user storage class