This file contains hidden or 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/perl | |
use warnings; | |
use strict; | |
use Cwd; | |
use File::Find; | |
#### | |
# FIND UNCOMPRESSED FILES | |
# Prints the full path of any files larger than 50mb which are uncompressed | |
# One file path per newline, so output can be piped to other tools, eg: | |
# perl find_uncompressed_files.pl | xargs gzip |
This file contains hidden or 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/perl | |
use warnings; | |
use strict; | |
############################################################# | |
# Name: Genome RE Sites # | |
# Author: Phil Ewels # | |
# Version 1.0 – 25/05/2011 # | |
# ————————————————————————————————————————————————————————— # | |
# Outputs a file with locations of restriction endonuclease # | |
# sites (not resulting fragments) # |
This file contains hidden or 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
setwd('C:/Your/Directory/Here') | |
files <- list.files(pattern="txt$") | |
i <- 0 | |
values <- list() | |
for(file in files) { | |
i <- i+1 | |
cc <- c(rep("NULL", 12), "numeric") | |
values[[i]] <- as.numeric(unlist(read.delim(file, colClasses = cc, skip=1, header = FALSE))) | |
} |
This file contains hidden or 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
<?php | |
// Outputting the widget area on your homepage | |
// Accomodates one to four active widget areas, fits bootstrap columns accordingly | |
// front-page.php | |
$widget_count = 0; | |
for ($i = 1; $i <= 4; $i++){ | |
if ( is_active_sidebar('homepage-widget-area-'.$i) ) $widget_count++; | |
} | |
if ( $widget_count > 0) { |
This file contains hidden or 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
# One command to extract them all | |
extract () { | |
if [ $# -ne 1 ] | |
then | |
echo "Error: No file specified." | |
return 1 | |
fi | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xvjf $1 ;; |
This file contains hidden or 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
<?php | |
if ( get_option( 'show_on_front' ) == 'posts' ) { | |
get_template_part( 'index' ); | |
} elseif ( 'page' == get_option( 'show_on_front' ) ) { | |
get_header(); | |
while ( have_posts() ) : the_post(); | |
This file contains hidden or 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/perl | |
use CGI::Carp qw(fatalsToBrowser); # pipe errors to the browser instead of the terminal for debugging | |
use warnings; | |
use strict; | |
use Data::Dumper; | |
#print Dumper(\%args); | |
print "Content-type: text/plain\n\n"; | |
############################################################# | |
# Name: Cytobands - Coordinates: Online Version # |
This file contains hidden or 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
#' --- | |
#' title: "SRA Sequencing Platform Analysis" | |
#' author: "Phil Ewels" | |
#' date: September 2014 | |
#' --- | |
#' The Sequence Read Archive [(SRA)](http://www.ncbi.nlm.nih.gov/sra) | |
#' contains the raw DNA-sequencing data for many published datasets. | |
#' We were interested in which sequencing platforms were prevalent, | |
#' or rather, how prevalent Illumina Sequencing is. We were specifically |
This file contains hidden or 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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="generator" content="pandoc" /> |
This file contains hidden or 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 | |
# Check bisulfite analysis results for any modes of failure that I can think of. | |
# Assumes data is processed by Cluster Flow / bismark and is in subdirectories. | |
# For a basic quick summary, just run: | |
# bash check_bismark_analysis.sh | |
# To filter which subdirectories are checked, pass a glob expression. For example: | |
# bash check_bismark_analysis.sh run2_* |
OlderNewer