Monday, May 4, 2015

Looking for CpG site enrichment

I had a seemingly easy bioinformatics task - find out if a given set of genomics region are enriched for some genomic feature - like CTCF binding (in comparison to a background set).

The below is from fumbling through a bunch of help pages online.. the first page was this one that lists a bunch of tools (I ended up using bedtools fisher)
  1. dump out genomic locations for target and background set (I was using CpG sites in gene bodies on the 450k array).
    1. sort the bed files using ./sortbed -i from bedtools. 
  2. create a genome file and sort it: "
    1. mysql --user=genome --host=genome-mysql.cse.ucsc.edu -A -e "select chrom, size from hg19.chromInfo"  > hg19.genome 
      • thanks to Samad's post
    2. then sort that file with plain sort
  3. download the tract of interest from usc genome table browser in bed format (from biostars)
    1. http://genome-test.cse.ucsc.edu/cgi-bin/hgTables?command=start
    2. select bed format
    3. sort the bed files using ./sortbed -i from bedtools again
  4. run 
    1. bedtools fisher -a target -b download_tract -g hg19.sorted.genome
    2. bedtools fisher -a background -b download_tract -g hg19.sorted.genome
    3. use the output to compute a p-value that takes into account the background results (using hypergeometric test)
It would be nice if there was an app that would do this for me, and iterate a bunch of tracts. There is tools like GREAT but those seem to be gene centric.

This was in part inspired by this work on distal SNP-CpG relations - Lemire et al. describe there methods in the "SNP and CpG site annotations" section.

This Galaxy based tool - genomic hyperbrowser might be an easier way of doing things.

Update: the Forge tool seems to do what I want but for DNAse I sites only

Monday, February 9, 2015

Nexus 4 with dead zone on screen

I recently fought with a android nexus 4 that had water damage to the digitizer. So touches would not register for the bottom part of the screen a (a cm or more).

I tried many things but in the end I ended up flashing to android 4.4, rooting it and then using xposed framework to increase the size of the navigation bar using it's dimens module. xposed doesn't work yet on lolipop / android 5.0  but maybe it will soon. Also, with xposed - you need to take a few steps to make sure it's installed and the dimens module is checked on.

During the process I found that the screen rotation app helped alot. Specifically set orientation  -I forget the setting, but getting that installed is key. Also handy soft keys helped a lot.

So now my navigation bar is so big that it blocks out the dead part of the touch screen.. but I loose screen real esatate though.. also the back button seems to trigger search for some reason.. not sure why.