Skip to content

Instantly share code, notes, and snippets.

Duncan Godwin drigodwin

Block or report user

Report or block drigodwin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View timestamp.js
var countdown_date = 1544634000000;
View index.cfm
<cfset greeting="hello world">
<cfoutput>#greeting#</cfoutput>
View gist:07d8bbdb81ae2de6e35afa663098799f
tpm <- function(counts, lengths) {
rate <- counts / lengths
rate / sum(rate) * 1e6
}
ftr.cnt <- read.table("counts.txt", sep="\t", stringsAsFactors=FALSE,
header=TRUE)
library(dplyr)
library(tidyr)
View gist:f2b2d13444f76ad467eb75c19af69ef7
fc <- featureCounts(file="esc.bam",annot.ext="../../../genomes/Mus_musculus/Ensembl/NCBIM37/Annotation/Genes/Mus_musculus.NCBIM37.58.gtf",isGTFAnnotationFile = TRUE,GTF.featureType = "CDS",GTF.attrType = "gene_id")
write.table(x=data.frame(fc$annotation[,c("GeneID","Length")],fc$counts,stringsAsFactors=FALSE),file="counts.txt",quote=FALSE,sep="\t",row.names=FALSE)
View gist:1778783b446795b1fcf99ba036e6956d
//========================== featureCounts setting ===========================\\
|| ||
|| Input files : 1 BAM file ||
|| P esc.bam ||
|| ||
|| Dir for temp files : . ||
|| Threads : 1 ||
|| Level : meta-feature level ||
|| Paired-end : no ||
|| Strand specific : no ||
View gist:2d642465a9a86b7ed4a27d2af42e711e
Status esc.bam
1 Assigned 7750622
2 Unassigned_Unmapped 0
3 Unassigned_MappingQuality 0
4 Unassigned_Chimera 0
5 Unassigned_FragmentLength 0
6 Unassigned_Duplicate 0
7 Unassigned_MultiMapping 21821282
8 Unassigned_Secondary 0
View test.gist
This is an empty test file
@drigodwin
drigodwin / resolv.gist
Last active Jun 18, 2019
Sets the nameserver to Google DNS
View resolv.gist
${r"sudo sed -i.bak '/^nameserver /{h;s/.*/nameserver 8\.8\.8\.8/};${x;/^$/{s//nameserver 8\.8\.8\.8/;H};x}' /etc/resolv.conf"}
View gist:365d39d216e6a56c634a5020496ef8f1
This file has been truncated, but you can view the full file.
2016-10-18 10:27:56,341 DEBUG 102 j.headers [er-LsPYHwKd-1111] >> GET https://cloudsoft2-lon.openstack.blueboxgrid.com:8774/v2/a0ade3ca76784719845363979dc1014e/os-security-groups HTTP/1.1
2016-10-18 10:27:56,341 DEBUG 102 j.headers [er-LsPYHwKd-1111] >> Accept: application/json
2016-10-18 10:27:56,341 DEBUG 102 j.headers [er-LsPYHwKd-1111] >> X-Auth-Token: 428b4d663e4943cdb13348ebe2dd169a
2016-10-18 10:28:02,322 DEBUG 102 j.headers [er-LsPYHwKd-1111] << HTTP/1.1 200 OK
2016-10-18 10:28:02,322 DEBUG 102 j.headers [er-LsPYHwKd-1111] << Date: Tue, 18 Oct 2016 09:28:02 GMT
2016-10-18 10:28:02,322 DEBUG 102 j.headers [er-LsPYHwKd-1111] << Connection: close
2016-10-18 10:28:02,322 DEBUG 102 j.headers [er-LsPYHwKd-1111] << X-Compute-Request-Id: req-7489d376-9d69-4618-99ea-0b2bee13c589
2016-10-18 10:28:02,323 DEBUG 102 j.headers [er-LsPYHwKd-1111] << Content-Type: application/json
2016-10-18 10:28:02,323 DEBUG 102 j.headers [er-LsPYHwKd-1111] << Content-Length: 164061
You can’t perform that action at this time.