Thursday, 16 September 2010

git-svn: a short summary in branching

When it comes to branching with git-svn my opinion is that it is best to keep all your branching local in git and track a single remote svn branch with your local master branch. If this cannot be achieved (e.g some remote svn branches already exist and you need to track them) then the following might help.

Creating branches:

To create both local and remote branches with git-svn, we need to create the remote branch and then track it with a local branch. Avoid ambiguity by using different names for your local and remote branches:



Deleting branches:

To delete branches, handle the local branches with git and the remotes ones with svn. You will also have to delete the references to the remote branches otherwise they keep showing up when you list all your local and remote branches:



I am sharing these notes because I've been through all this before and forgot how I achieved it last time! Furthermore this seems like something that can and probably has already been automated. I would like to know either way ;)

Wednesday, 25 August 2010

load yaml config file in ruby

If you ever want to load your config from a YAML file and omit the annoying step of opening the file, here's how:

Friday, 25 June 2010

testing github embedded links

not been here in a while, this is just a test of embedded links from github:

Friday, 19 February 2010

how to :use in clojure

It took me a while to figure this out ... the docs are not obvious enough ;) ... so I am writing this down here fore future reference. To import a function from a package do the following:


(ns my-namespace
(:use [clojure.contrib.str-utils2 :only (capitalize)]))


Here I am importing the clojure.contrib.str-utils2/capitalize into my-namespace.

Tuesday, 14 July 2009

Chimp Repeats

Uploaded the Chimp repeat data to my $WORK directory. Now I have to alter the experiment report files for easier parsing:


cd /lustre/work1/sanger/io1/2009-07-08_chimp_repeats
perl -i -plne 's/\t/,/g; s/\s+/_/g; s/[\(\)]//g; s/,/\t/g' OID2130?/experimental_report.txt


Now set up the jobs to parse the data:


perl -E 'say "ng42m_parser.pl -o sample_$_.txt -- $_" for @ARGV' OID2130? > parse_data_commands.txt
bsub -o load_repeats.%J.out -J 'load_repeats[1-3]%3' -q basement -R "select[mem>=3000] rusage[mem=3000]" -M3000000 'submit_job_array parse_data_commands.txt'


For future reference we might want to know the order ID to sample name mapping:


cut -f 1,12 OID2130?/experimental_report.txt | sort | uniq | grep -v 'ORDER_ID' > order_id_sample_mapping.txt



The Processed_data_files for orders 2130[78] were not gzipped. Thus this had to be rectified b/4 proceeding:


bsub -Ip 'gzip OID2130[78]/Processed_data_files/*.txt'

Thursday, 2 July 2009

Flip a matrix on its side

This is surprisingly (well not really) simple:


m <- matrix(...)
m <- t(m)


"t" for transpose

Sam suggests plotmath -- useful for mathmatical expressions.

Wednesday, 1 July 2009

mouse CGH

Will be trying to do the mouse CGH analysis the same way we did the 42 million analysis. So I will be using BigDB to store the data. Then will attempt to:

* quantile normalize
* median normalize
* GC normalize and
* wave normalize