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
Sys.info()["nodename"] |
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
awk 'BEGIN{i=0}; {if ($1 == "Filename") {file=$2} else if ($1 ~ /[A|C|T|G]/ && length($1) > 40) {i+=1; print ">",file," ",i,"\n" $1 }}' < fastqc_data.txt |
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
for i in $(ls *.gz| cut -f 1,2 -d "_"| sort | uniq); do mkdir $i; mv ${i}*.gz $i; done |
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
# checks if script is being run on a machine with given name | |
# useful if code e.g. requires dynamic allocation of host-dependeten | |
# file paths | |
amILocal <- function(machinename = NULL){ | |
if(is.null(machinename)) stop("Machinename is missing") | |
m <- Sys.info()["nodename"] | |
mn <- unlist(lapply(strsplit(m, "\\."), function(x) x[1])) | |
if (mn == machinename) { | |
return(TRUE) | |
} else { |
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
awk 'BEGIN {OFS = "\t";} {$1="chr"$1; print $0}' < [input.bed] > [output.bed] |
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
awk 'BEGIN {OFS = "\t";} {gsub("chr", "", $1); print $0}' < mm10_rRNA.bed >temp.bed |
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
# preparing example data for clusters | |
MCF10_promoter_clusters <- as.data.frame(matrix(nrow = nrow(tab4), ncol = ncol(tab4))) | |
colnames(MCF10_promoter_clusters) <- colnames(MCF10_expression_data) | |
rownames(MCF10_promoter_clusters) <- rownames(MCF10_expression_data) | |
for (x in colnames(MCF10_promoter_clusters)){ | |
MCF10_promoter_clusters[,x] <- paste("cluster", sample(c(1:7), size = nrow(MCF10_promoter_clusters), replace = T), sep = "") | |
} | |
# example of plotting expession data by cluster group | |
MCF10_expression_data <- read.csv("MCF10_expression_data.csv", row.names = 1) |
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
require(gdata) | |
require(dtplyr) | |
require(ggplot2) | |
# setwd("~/OneDrive/Documents/ANU/Tremethick Lab/Students/Yichen - BSc Hons/") | |
# load the Excel sheet | |
# this presumes that the file is in the current working directory, you can check with getwd()... | |
dat <- read.xls("CTA HL summary.xlsx") |
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
for i in $(ls | cut -f 1 -d "_" | uniq | sort -n); do j=$(ls ${i}_*.gz); s1=$(echo $j | cut -f 1 -d " "); s2=$(echo $j | cut -f 2 -d " "); echo "[\"${s1}\", \"${s2}\"],"; done |
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
// getTrueName.c | |
// http://web.archive.org/web/20100110234300/http://www.macosxhints.com/dlfiles/getTrueName.txt | |
// | |
// DESCRIPTION | |
// Resolve HFS and HFS+ aliased files (and soft links), and return the | |
// name of the "Original" or actual file. Directories have a "/" | |
// appended. The error number returned is 255 on error, 0 if the file | |
// was an alias, or 1 if the argument given was not an alias | |
// | |
// BUILD INSTRUCTIONS |
OlderNewer