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 | |
# Usage: deinterleave_fastq.sh < interleaved.fastq f.fastq r.fastq [compress] | |
# | |
# Deinterleaves a FASTQ file of paired reads into two FASTQ | |
# files specified on the command line. Optionally GZip compresses the output | |
# FASTQ files using pigz if the 3rd command line argument is the word "compress" | |
# | |
# Can deinterleave 100 million paired reads (200 million total | |
# reads; a 43Gbyte file), in memory (/dev/shm), in 4m15s (255s) | |
# |
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 bash | |
##### | |
# Set default command line options | |
##### | |
USERNAME_PREFIX=user | |
USERNAME_SUFFIX_START=1 | |
USERNAME_SUFFIX_END=100 | |
USERNAME_SUFFIX_ZERO_PADDING_LENGTH=4 |
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 | |
# Usage: interleave_fastq.sh f.fastq r.fastq > interleaved.fastq | |
# | |
# Interleaves the reads of two FASTQ files specified on the | |
# command line and outputs a single FASTQ file of STDOUT. | |
# | |
# Can interleave 100 million paired reads (200 million total | |
# reads; a 2 x 22Gbyte files), in memory (/dev/shm), in 6m54s (414s) | |
# | |
# Latest code: https://gist.github.com/4544979 |
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 | |
# You should clone this gist to obtain the installation and patch file | |
# and then run it locally, after changing the below settings to something | |
# suitable for your system. Something like this: | |
# sudo apt-get install -y ssh | |
# cd | |
# scp -r nhaigh@bioserver:git/sysadmin/generic/gitorious_install ./ | |
# Edit the settings below, then run the following as root: | |
# cd gitorious_install && sh ./install.sh | |
# |
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/awk | |
# Takes output of "samtools depth" and reformats into grouped bedgraph format: | |
# samtools depth -r ${loc} -Q 1 --reference $fasta $bam | mawk -f scripts/depth2bedgraph.awk > /tmp/my.bedgraph | |
# Example input: | |
#chr1 26 2 | |
#chr1 27 2 | |
#chr1 28 2 | |
#chr1 29 5 | |
#chr1 30 5 | |
#chr1 31 5 |
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 | |
# Bash script to download a bunch of *.sra files from the NCBI SRA, using | |
# the aspera client, and extract FASTQ data using the SRA Toolkit. | |
max_bandwidth_mbps=50 | |
# These SRA files are for the durum genome | |
files=( | |
'SRR567512.sra' | |
'SRR567559.sra' |
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
"fmtDetailValue_Dbxref" : "function(dbxref){if(typeof dbxref!='string'){return dbxref}var dbid=dbxref.split(':');var prefix='';switch(dbid[0].toLowerCase()){case 'interpro':prefix='http://www.ebi.ac.uk/interpro/entry/';break;case 'pfam':prefix='http://pfam.sanger.ac.uk/family/';break;case 'reactome':prefix='http://www.reactome.org/content/detail/';break;case 'unipathway':prefix='http://www.grenoble.prabi.fr/obiwarehouse/unipathway/upa?upid=';break;case 'kegg':prefix='http://www.genome.jp/kegg-bin/show_pathway?ec';break;case 'prositepatterns':prefix='http://prosite.expasy.org/';break;case 'prositeprofiles':prefix='http://prosite.expasy.org/cgi-bin/prosite/PSView.cgi?ac=';break;case 'smart':prefix='http://smart.embl-heidelberg.de/smart/do_annotation.pl?BLAST=DUMMY&DOMAIN=';break;case 'superfamily':prefix='http://supfam.org/SUPERFAMILY/cgi-bin/scop.cgi?sunid=';dbid[1]=dbid[1].replace('SSF','');break;case 'gene3d':prefix='http://www.cathdb.info/version/latest/superfamily/';dbid[1]=dbid[2];break;case 'pirsf':prefi |
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 perl | |
use strict; | |
use warnings; | |
my $bed_file = shift @ARGV; | |
my $suffix_fmt = '_part%01d'; | |
open(my $bed_fh, '<', $bed_file) || die "Couldn't open BED file: $!\n"; | |
my %cut_positions; |
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 | |
sudo apt-get update && sudo apt-get -y dist-upgrade | |
urls=( | |
'https://github.com/pypa/pip.git' | |
'git://github.com/openstack-dev/pbr.git' | |
'git://github.com/iguananaut/d2to1.git' | |
'https://github.com/kelp404/six.git' | |
'https://github.com/openstack/python-glanceclient.git' | |
'https://github.com/openstack/python-keystoneclient.git' |
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 | |
# First setup everything needed for connecting to it via an NX connection | |
wget https://gist.github.com/nathanhaigh/4007406/raw/40717e3031bec9efccc3dfcc38c3a50c222d29d9/NXServer.sh | |
chmod +x NXServer.sh | |
./NXServer.sh | |
apt-get -y install libreoffice-java-common htop sysstat git xclip dos2unix | |
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz | |
tar xzf install-tl-unx.tar.gz && rm install-tl-unx.tar.gz |
NewerOlder