Skip to content

Instantly share code, notes, and snippets.

View alexpreynolds's full-sized avatar
👋
Hello

Alex Reynolds alexpreynolds

👋
Hello
  • Altius Institute for Biomedical Sciences
  • Seattle, WA USA
  • 12:56 (UTC -07:00)
View GitHub Profile
@alexpreynolds
alexpreynolds / intersect.pl
Last active May 22, 2017 20:38
Intersect two hash tables in Perl
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long;
my $fileA = undef;
my $fileB = undef;
my $result = GetOptions("fileA=s" => \$fileA, "fileB=s" => \$fileB);
@alexpreynolds
alexpreynolds / makefile
Created September 18, 2017 23:24
Compile and test an OpenMPI-capable version of MEME suite tools
SHELL:=/bin/bash
VERSION=4.12.0
MEME_VERSION=meme_${VERSION}
GS=/net/module/sw/ghostscript/9.19/bin/gs
CONVERT=/net/module/sw/ImageMagick/7.0.2-0/bin/convert
MPIDIR=/net/module/sw/openmpi/1.10.2
TEST_FASTA=${PWD}/../data/sequences.fa
RESULTS_DIR=${PWD}/../results
DEST_DIR=${RESULTS_DIR}/${MEME_VERSION}
@alexpreynolds
alexpreynolds / transcripts2mergedExons.awk
Created May 17, 2018 22:32
Convert transcripts to merged exons
BEGIN {
FS="\t";
old_chr = "chrN";
old_start = -1;
old_stop = -1;
old_id = "*";
old_score = "*";
old_strand = "*";
new_element_flag = 0;
}
@alexpreynolds
alexpreynolds / mergedExons2exonIntronList.awk
Created May 17, 2018 22:34
Convert merged exons to exon-intron list
BEGIN {
FS="\t";
old_chr = "chrN";
old_start = -1;
old_stop = -1;
old_id = "*";
old_score = "*";
old_strand = "*";
}
{
@alexpreynolds
alexpreynolds / exonIntronList2JunctionList.awk
Created May 17, 2018 22:34
Convert exon-intron list to junction list
BEGIN {
FS="\t";
old_chr = "chrN";
old_start = -1;
old_stop = -1;
old_id = "*";
old_score = "*";
old_strand = "*";
}
{
@alexpreynolds
alexpreynolds / localSeleniumTest.py
Last active October 5, 2018 12:08
Selenium Python binding test (Ubuntu 16)
#!/usr/bin/env python
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
import sys
import time
@alexpreynolds
alexpreynolds / LocalSeleniumTest.java
Created October 5, 2018 00:07
Selenium Java binding test
import java.io.IOException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.Test;
public class LocalSeleniumTest {
public static void main(String[] args) throws IOException, InterruptedException {
System.setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver");
@alexpreynolds
alexpreynolds / higlassTest.svg
Last active October 5, 2018 13:29
Test HiGlass SVG export
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexpreynolds
alexpreynolds / localPuppeteer.js
Created October 5, 2018 20:10
Puppeteer PNG + PDF export test
const puppeteer = require('puppeteer');
async function stall(stallTime = 3000) {
await new Promise(resolve => setTimeout(resolve, stallTime));
}
(async() => {
const width = 1024;
const height = 1280;
@alexpreynolds
alexpreynolds / localSeleniumTestPNG.py
Created October 5, 2018 21:00
Selenium Python binding PNG export test
#!/usr/bin/env python
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
import sys
import time
import base64