Skip to content

Instantly share code, notes, and snippets.

View cfljam's full-sized avatar

John McCallum cfljam

View GitHub Profile
@cfljam
cfljam / gist:8948348
Last active August 29, 2015 13:56
Minimalist Approach to Documentation
[cfljam@genome3 ~]$ cd /workspace2/genome_analysis/plant/Actinidia/chinensis/20Monkeys/
[cfljam@genome3 20Monkeys]$ pwd
/workspace2/genome_analysis/plant/Actinidia/chinensis/20Monkeys
[cfljam@genome3 20Monkeys]$ ls
Fastqc  Haplotyping  mappedtoHY  README.md  Reads  RedOrDead  SexSexSex  temp_opt
[cfljam@genome3 20Monkeys]$ cat > README.md

Analysis of Actinidia Whole Genome Sequencing 2013

@cfljam
cfljam / gist:9943916
Created April 2, 2014 21:49
Delete Un-named columns from a Pandas Dataframe read from Excel
DF.drop([Y for Y in DF.columns if re.compile('Unnamed*').match(Y)],1)
@cfljam
cfljam / new_gist_file.sh
Created May 16, 2014 21:59
Create a bed genome file from a compressed fast reference
zcat my_reference.fa.gz | awk -v OFS="\t" '/^>/{print substr($1,2),$2}' > my.genome
@cfljam
cfljam / In Silico PCR with IPCRESS.ipynb
Created June 2, 2014 08:36
Using IPCRESS for electronic PCR, and parsing output
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cfljam
cfljam / HRM Design from BSA RNASEQ Variants.ipynb
Created June 19, 2014 01:21
Design of HRM Assays for Validation of SNPs revealed by Poolseq
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cfljam
cfljam / .screenrc
Created July 9, 2014 07:03
.screenrc for Unix screen
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%=%{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
defscrollback 4242
@cfljam
cfljam / gist:1f4a8cfcb522eab3433d
Last active August 29, 2015 14:05
Shell Installation of Scientific Python for Vagrant
#!/bin/sh
sudo apt-get -y update
sudo apt-get -y install curl build-essential python-dev python-pip python-numpy python-scipy git
sudo pip install --upgrade distribute
sudo pip install --upgrade ipython[all]
sudo pip install --upgrade pyzmq jinja2 numpy tornado pandas scipy
## Primer design pre-requisites
sudo pip install Biopython
sudo pip install bcbio-gff
@cfljam
cfljam / Vagrantfile
Last active August 29, 2015 14:05
Using Vagrant Behind a Firewall
#### Place this in $HOME/.vagrant.d/ or append to the Vagrantfile there
## eidting the proxy user,pwd, address and port accordingly
Vagrant.configure('2') do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "http://proxy.my_org.com:8080"
config.proxy.https = "https://proxy.my_org.com:8080"
config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end
end
@cfljam
cfljam / new_gist_file.r
Created September 2, 2014 06:43
change terminal letter code in Kiwi item to lowercase
gsub("(.+)([A-Z])$","\\1\\L\\2",my_df$Pedigree_item, perl=TRUE)
@cfljam
cfljam / split_fasta
Created September 21, 2014 23:52
Split multi-fasta file into individual files
awk '/^>/{s=++d".fasta"} {print > s}'