Skip to content

Instantly share code, notes, and snippets.

// Helper functions
// A list consists of any number of 'rule', separated by separator, and the last one is optional.
const list = (rule, separator) => seq(rule, repeat(seq(separator, rule)))
const NL = choice("\r\n", "\r", "\n")
const NLOPT = prec(-1, repeat(NL))
// in ascending order of precedence
const operator_table = [
@fwip
fwip / confetti.p8
Created July 27, 2019 23:32
an example on how to draw confetti in pico-8
function create_confetti()
v=1.4 --initial velocity
size=40
-- the center of the confetti
balloon_x=40
balloon_y=40
for i=1,100 do
local r=rnd(size) -- this is how far out from the center it starts
local n=rnd(1) -- this is the angle it goes at
confetti[i] = {
package locale
import (
"bufio"
"fmt"
"io"
"regexp"
"strconv"
"strings"
"unicode/utf8"
package main
import (
"encoding/csv"
"fmt"
"io"
"log"
"os"
)
#!/usr/bin/env python3
from Bio import SeqIO
from collections import defaultdict
import time
M = 7
Q = 10
#!/bin/bash
for fastq in $SAMPLE_NAME*.fastq.gz; do
zcat $fastq \
| awk '/Y/' \
`basename $fastq .gz` >filtered_
done
#include <iostream>
#include <vector>
#include <random>
std::random_device rd;
std::mt19937 rng(rd());
const int ITERATIONS = 300;
const int IN_SIZE = 1000000;
# Normal layout of a healthy read-pair.
fragment ========================================
fragment + adaptors ~~~========================================~~~
SE read --------->
PE reads R1---------> <---------R2
unknown gap ....................
#!/bin/bash
username="MYUSERNAME"
origPort="80"
midlPort="38080"
destPort="80"
midlHost="MYMIDDLEMAN"
destHost="MYDESTINATION"
qsub -cwd -N "u-H3MHT" -pe threads 8 -V -S /bin/bash <<'__FASTQ__'
set -x -e -o pipefail
cd "/net/glados/solexa_data/150109_NS500372_0058_AH3MHTBGXX"
bcl2fastq \
--input-dir "/net/glados/solexa_data/150109_NS500372_0058_AH3MHTBGXX/Data/Intensities/BaseCalls" \
--use-bases-mask "y36,I6n,y36" \
--output-dir "/net/glados/solexa_data/150109_NS500372_0058_AH3MHTBGXX/fastq" \