A simple Docker Compose recipe for schollz/hostyoself.
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 | |
# Ollama Model Export Script | |
# Usage: bash ollama-export.sh vicuna:7b | |
# License: MIT (https://ncurl.xyz/s/o_o6DVqIR) | |
# https://gist.github.com/supersonictw/f6cf5e599377132fe5e180b3d495c553 | |
set -e | |
echo "Ollama Model Export Script" | |
echo "License: MIT (https://ncurl.xyz/s/RD0Yl5fSg)" |
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
#!/usr/bin/env python2.7 | |
# Export from Google App Engine Datastore Backup LevelDB format to JSON flat file | |
# Based on: https://gist.github.com/xlfe/af25f160256e4d52f499dee7e8fa212f | |
## | |
# 2024 instructions: | |
## | |
# Using the Google Cloud console (https://console.cloud.google.com), find "Firestore" | |
# and export your database to a Cloud Storage "Bucket". Download the content of the Bucket. |
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
#!/usr/bin/env python | |
### | |
# bam2fq_softclip.py | |
### | |
# A script for exploring soft-clipping of aligned reads. | |
# Extracts mapped reads from a BAM file as a FASTQ, but encodes 'soft-clipped' regions | |
# as lowercase. Soft-clipped regions can be quickly visualized in the terminal like: | |
# | |
# ./bam2fq_softclip.py aligned.bam | grep --color=always [atcg] |less -R |
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
#!/usr/bin/env python | |
import argparse | |
import pandas as pd | |
import re | |
import sys | |
from typing import Optional, List | |
import logging | |
import glob | |
import io |
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 | |
# Given a directory of fastq files, use bbmerge to find adapters sequences for every sample, | |
# align and find the consensus. | |
# Final consensus is in r1_adapter.consensus.fa and r2_adapter.consensus.fa - trim by hand | |
# if the automatic trimming up the the first 'n' isn't sensible | |
# Requires: bbmerge.sh (bbmap), muscle, emboss (cons) | |
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 | |
R_TMUX_SESSION_NAME="${R_TMUX_SESSION_NAME:-vscode-r}" | |
TMUX_CMD=$(command -v tmux) | |
if ! [ -x "$(command -v tmux)" ]; then | |
echo "Error: tmux is not installed." | |
exit 1 | |
fi |
Generates a heatmap plot showing the compression ratio of different block through a file.
Show interesting patterns in FASTQ files, and may be useful for diagnosing pathological or unusual data. I find using the zscore transformation for the plot is more informative.
Run like:
./compression_heatmap.py -b 1048576 -c rainbow -t zscore SRR11794587_2.fastq.gz
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 | |
# This script deinterleaves a FASTQ file generated by an MGI sequencer with two flowcell lanes | |
# where headers are in the format: @v300009551L1C002R003000000/1 with L1 or L2 indicating the lane | |
# This can be useful for some analyses since each lane can behave like a technical replicate (eg DADA2 error correction?) | |
set -e | |
set -o pipefail | |
input_fastq_gz="$1" # input FASTQ file | |
samplename="$(basename $input_fastq_gz .fastq.gz)" |
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
#!/usr/bin/env python | |
import os | |
import shutil | |
import re | |
import sys | |
import difflib | |
import argparse | |
def parse_ssh_config(config_path): |
NewerOlder