Skip to content

Instantly share code, notes, and snippets.

View ameintjes's full-sized avatar

Ayton Meintjes ameintjes

View GitHub Profile
@gnat
gnat / postgres_portable_no_install.md
Last active July 22, 2024 09:47
Postgres Standalone

🐘 Postgres Standalone

Why?

  • Localize your database into one single folder of your choosing.
  • No sudo / root requirement.
  • Run multiple Postgres at the same time on the same machine- Full bare metal performance.
  • Postgres is a great starter before moving to "slow single machine but horizontal scale": CockroachDB, ScyllaDB, etc.

Compile

@biemster
biemster / ESP32_blescan.py
Created January 17, 2023 12:20
simple ESP32 MicroPython Bluetooth LE scanner
import time
import bluetooth
from micropython import const
_IRQ_SCAN_RESULT = const(5)
_IRQ_SCAN_DONE = const(6)
def bt_irq(event, data):
if event == _IRQ_SCAN_RESULT:
# A single scan result.
addr_type, addr, connectable, rssi, adv_data = data
@lindenb
lindenb / FastGatk.java
Created June 9, 2021 08:37
Fast GATK: calling a small region for a large number of Bams with GATK HaplotypeCaller
/*
The MIT License (MIT)
Copyright (c) 2021 Pierre Lindenbaum
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@Krever
Krever / _README.md
Last active March 9, 2024 16:21
Yabai setup for i3wm users
@fpletz
fpletz / esphome-print-async.py
Last active February 23, 2024 00:47
aioesphomeapi minimal examples
#!/usr/bin/env python3
import aioesphomeapi
import asyncio
async def main():
loop = asyncio.get_running_loop()
cli = aioesphomeapi.APIClient(loop, "foobarhostname", 6053, "foobarpassword")
await cli.connect(login=True)
@donniecode1983
donniecode1983 / RoboCopyCommandExamples.txt
Created November 29, 2018 16:23
RoboCopyCommandExamples
Examples of Microsoft's Robocopy Syntax
#1 Simple copy
To copy contents of C:\UserFolder to C:\FolderBackup:
Robocopy C:\UserFolder C:\FolderBackup
This is the simplest usage for Robocopy
#2 Copy all content including empty directory
To copy all contents including empty directories of SourceFolder to DestinationFolder:
Robocopy C:\SourceDir C:\DestDir /E

Preimputation steps

Read the Sanger How-to page to make sure your vcf file meets all the requirements for Sanger imputation.

The preimputation steps for UMichigan and Sanger are relatively similar. The main difference is that VCF files are not split by chromosome under sanger imputation. I recommend carrying out the Michigan preimputation steps anyways. If you have already carried out the preimputation steps for U Mich imputation then the only other requirement will be to merge the chr.vcf files into one vcf file and sort the result.

#merge vcf files from list of files
bcftools concat --file-list ~/preimputation/vcf_list.txt -o merged.vcf
gzip merged.vcf
@elowy01
elowy01 / BCFtools cheat sheet
Last active June 29, 2024 05:24
BCFtools cheat sheet
*bcftools filter
*Filter variants per region (in this example, print out only variants mapped to chr1 and chr2)
qbcftools filter -r1,2 ALL.chip.omni_broad_sanger_combined.20140818.snps.genotypes.hg38.vcf.gz
*printing out info for only 2 samples:
bcftools view -s NA20818,NA20819 filename.vcf.gz
*printing stats only for variants passing the filter:
bcftools view -f PASS filename.vcf.gz
@dmig
dmig / mongod.json
Created May 13, 2018 06:10
lnav MongoDB log format
{
"mongod_log": {
"title": "MongoDB server log format",
"regex": {
"main": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}[,\\.]\\d+\\+\\d+)\\s+(?<level>\\w)\\s+(?<component>\\w+|-)\\s+\\[?(?<context>-?\\w+)?\\]\\s+(?<body>.*)$"
}
},
"level": {
"critical": "F",
@sbamin
sbamin / sracmd
Last active December 5, 2022 15:35
Interact with NCBI SRA using aspera ascp command line client
#!/bin/bash
## Wrapper to interact with NCBI SRA using aspera ascp command line interface
## v 2.5 | 04/2017
## @sbamin
# More info: http://download.asperasoft.com/download/docs/ascp/2.7/html/
# usage
show_help() {