At long last (1.5yrs since the first submission attempt to be exact), the research I worked on as a post-doctoral fellow has been published!
Click on the image above to head over to the article for some light reading. A lot of work went into this paper, and there are many to thank who don't appear in the author list - basically everyone in my former lab. On a fun note, the model we developed and just about all the figures were produced in R. Quite the conversion, since I started this work as a big proponent for Matlab.
2013/01/21
2013/01/08
Overly Honest Methods
A friend of mine shared this on Facebook - A curated list of tweets tagged #overlyhonestmethods. Basically, how science is really done behind that sparkly-smarty-pants curtain.
http://storify.com/BeckiePort/overlyhonestmethods
http://storify.com/BeckiePort/overlyhonestmethods
2012/12/31
Really filter by date in Picasa 3
I've been managing my photos in Google's Picasa since 2009. I personally think it's a good application with all the social connectivity I need (Facebook, Google+). I expected that Google, being a company built on information and search, would have made the search bar in Picasa as robust as their web search bar. Unfortunately, not so.
If you use any of Google's web products, you should be familiar with searching by dates using keys like...
Yes, Picasa naturally organizes photos in date named folders. However, this convenience is lost when importing instant uploads from Google+, which just drops a pile of photos/videos into one "Instant Uploads" folder.
What the Picasa search bar does do is index all text fields/tags in your photos. If EXIF data is saved with your photos, there is a field called "Camera Date" which holds the date (according to the camera) that the photo was taken. This field is formatted as:
yyyy:mm:dd hh:mm:ss
(where hours are in 24-hr format)
So, if you want to search for June 2012 photos, type:
2012:06
into the search bar. So, while this works to grab photos from a specific month, there still isn't a way to find photos from a specific date range. Hopefully, this will be a new feature in an upcoming release.
If you use any of Google's web products, you should be familiar with searching by dates using keys like...
- date:
- between:
- before:
- after:
Yes, Picasa naturally organizes photos in date named folders. However, this convenience is lost when importing instant uploads from Google+, which just drops a pile of photos/videos into one "Instant Uploads" folder.
What the Picasa search bar does do is index all text fields/tags in your photos. If EXIF data is saved with your photos, there is a field called "Camera Date" which holds the date (according to the camera) that the photo was taken. This field is formatted as:
yyyy:mm:dd hh:mm:ss
(where hours are in 24-hr format)
So, if you want to search for June 2012 photos, type:
2012:06
into the search bar. So, while this works to grab photos from a specific month, there still isn't a way to find photos from a specific date range. Hopefully, this will be a new feature in an upcoming release.
2012/12/04
My Job Just Got Shiny-er
Today I went to the RStudio site to post a feature request. I noticed up in the top navigation a link called "Shiny". I like things that are shiny. It turns out Shiny is a new package the RStudio team has developed for easily making reactive web applications from R code.
One of the tools I built at my current job is a web application that uses R as the server side analysis engine with A LOT of HMTL/CSS and AJAX tomfoolery in the browser to make things responsive a pretty.
From the looks of it, the shiny new Shiny package will significantly reduce the UI development time. In fact, it appears to make web UI development more like UI development in desktop python apps using [insert your favorite toolkit here] (note: so far I mostly have experience with wx).
Ever since I started using R (back in 2007) I often lamented the lack of a way to create easy to use GUIs that could encapsulate complex analysis scripts for non-R users. In MATLAB, this is done using GUIDE or low level uicontrol() functions. In 2009, RGG looked promising, and I also found SciViews-R, but I never really had/invested the time to look deeper into either of these tools. Besides, doing things from the comfort of a web browser is all the rage these days (and certainly makes deploying app updates easier).
I'm looking forward to testing this out!
One of the tools I built at my current job is a web application that uses R as the server side analysis engine with A LOT of HMTL/CSS and AJAX tomfoolery in the browser to make things responsive a pretty.
From the looks of it, the shiny new Shiny package will significantly reduce the UI development time. In fact, it appears to make web UI development more like UI development in desktop python apps using [insert your favorite toolkit here] (note: so far I mostly have experience with wx).
Ever since I started using R (back in 2007) I often lamented the lack of a way to create easy to use GUIs that could encapsulate complex analysis scripts for non-R users. In MATLAB, this is done using GUIDE or low level uicontrol() functions. In 2009, RGG looked promising, and I also found SciViews-R, but I never really had/invested the time to look deeper into either of these tools. Besides, doing things from the comfort of a web browser is all the rage these days (and certainly makes deploying app updates easier).
I'm looking forward to testing this out!
2012/10/30
Opinion: iPhone vs Android
A friend of mine is finally joining the smartphone using masses and asked to the general Facebook public what type they should get, iPhone or Android (or other). Here's what I posted in response.
I'm an Android user and will upgrade to another Android when the time comes. I have plenty of iPhone toting friends, and yes, the iPhone is a decent piece of hardware. It is an mobile "experience" that is carefully constructed and controlled by one company - Apple. Therein lies why I won't get an iPhone.
Apple has a knack for keeping people locked to their products. Get an iPhone and you have to get apps that are in the Apple App store, get music/books from Apple's iTunes Store. The iPhone 5 uses a proprietary, and expensive, charging/data sync cable that only Apple sells (and is currently not licensing to third parties). Upgrading iOS has the tendency to remove apps made by companies Apple doesn't like (e.g. Google, as is the case with iOS 6 replacing Google Maps with the poorly excuted Apple Maps). I just don't like that sort of micromanaging - especially by a company who's only after my money.
I won't say that Google/Android is better for everyone. I just know it's better for how I want to use my phone. I like how flexible and customizable it is. I like that it can be useable from a free upgrade phone to a premium one that would cost me $300.
Ultimately, by the numbers iPhones and (premium) Android phones are equivalent. On both you can check your email, post on Facebook, check the weather/traffic, take photos, and occasionally make a phone call. I really depends on who bothers you less as they look over your shoulder - Apple or Google.
2012/10/09
Making Color Ramps in Matlab
When visualizing an array of data in a heatmap, a good color map makes a world of difference.
Thanks to my work in 'omics (i.e. transcriptomics - microarrays and RNASeq) I've looked at a lot of heatmaps over the past couple of years, and generated quite a few to boot. Back in my Matlab heavy grad school days, I was generally happy with the default 'jet' color scheme (which given it's double rainbow-eseque aesthetics would make some individuals on this planet overly emotional). Suffice it to say, I was a bit wary of straying far from the available maps (the others I used semi-regularly were "bone", "gray", and "hot").
Today I needed to create a nice color ramp in a GUI tool I've developed in Matlab for a dataset that spanned [-Inf, Inf]. Ideally, it should have three color stops:
If I were generating this ramp in R it would be quite trivial with the colorRampPalette() function:
The above line would create a function bky.ramp() that you could use to specify a ramping palette of arbitrary length for a heatmap() (or any other plotting function):
Doing this in Matlab is similar, but a tad more obscure. If you look at the help for the colormap() function it says:
If you're the type that likes to encapsulate things in reusable functions (which I am), you end up with something like this:
Thanks to my work in 'omics (i.e. transcriptomics - microarrays and RNASeq) I've looked at a lot of heatmaps over the past couple of years, and generated quite a few to boot. Back in my Matlab heavy grad school days, I was generally happy with the default 'jet' color scheme (which given it's double rainbow-eseque aesthetics would make some individuals on this planet overly emotional). Suffice it to say, I was a bit wary of straying far from the available maps (the others I used semi-regularly were "bone", "gray", and "hot").
Today I needed to create a nice color ramp in a GUI tool I've developed in Matlab for a dataset that spanned [-Inf, Inf]. Ideally, it should have three color stops:
- a "cool" color for extreme negative values
- a neutral color for 0
- a "hot" color for extreme positive values
- blue
- black
- yellow
If I were generating this ramp in R it would be quite trivial with the colorRampPalette() function:
bky.ramp = colorRampPalette(c('blue', 'black', 'yellow'))
The above line would create a function bky.ramp() that you could use to specify a ramping palette of arbitrary length for a heatmap() (or any other plotting function):
heatmap(X, col=bky.ramp(256))
Doing this in Matlab is similar, but a tad more obscure. If you look at the help for the colormap() function it says:
A colormap is an m-by-3 matrix of real numbers between 0.0 and 1.0. Each row is an RGB vector that defines one color. The kth row of the colormap defines the kth color, where map(k,:) = [r(k) g(k) b(k)]) specifies the intensity of red, green, and blue.I know that the colors I need are:
colormap(map) sets the colormap to the matrix map. If any values in map are outside the interval [0 1], you receive the error Colormap must have values in [0,1].
- blue = [0 0 1]
- black = [0 0 0]
- yellow = [1 1 0]
interp1 1-D interpolation (table lookup)In its simplest invocation, it does linear interpolation between supplied points in Y over points XI. How is this used to create a BKY color ramp with 256 levels? Like so:
YI = interp1(X,Y,XI) interpolates to find YI, the values of the
underlying function Y at the points in the array XI. X must be a
vector of length N.
If Y is a vector, then it must also have length N, and YI is the
same size as XI. If Y is an array of size [N,D1,D2,...,Dk], then
the interpolation is performed for each D1-by-D2-by-...-Dk value
in Y(i,:,:,...,:).
If XI is a vector of length M, then YI has size [M,D1,D2,...,Dk].
If XI is an array of size [M1,M2,...,Mj], then YI is of size
[M1,M2,...,Mj,D1,D2,...,Dk].
bkyramp = interp1([blue; black; yellow], linspace(1,3,256));
If you're the type that likes to encapsulate things in reusable functions (which I am), you end up with something like this:
2012/06/27
Rant: Format This!
Submitting papers for publication is a painful process in many many many ways. One of the most common modes of torture is having to reformat your manuscript from one set of guidelines to another. Here I feature one shiny bit of ludicrousness that really makes me wonder where journal editors priorities are.
Seriously folks. It's 2012. Let *.doc and Microsoft Equation 3.0 die already. While your at it, let's figure out a universal formatting guideline to submit with. All of science will thank you.
Math Equations and DOCX
If your manuscript is or will be in DOCX and contains equations, you must follow the instructions below to make sure that your equations are editable when the file enters production.
If you have not yet composed your article, you can ensure that the equations in your DOCX file remain editable in DOC by enabling “Compatibility Mode” before you begin. To do this, open a new document and save as Word 97-2003 (*.doc). Several features of Word 2007/10 will now be inactive, including the built-in equation editing tool. You can insert equations in one of the two ways listed below.
If you have already composed your article as DOCX and used its built-in equation editing tool, your equations will become images when the file is saved down to DOC. To resolve this problem, re-key your equations in one of the two following ways.
If, when saving your final document, you see a message saying “Equations will be converted to images,” your equations are no longer editable and PLoS will not be able to accept your file.
- Use MathType to create the equation. MathType is the recommended method for creating equations.
- Go to Insert > Object > Microsoft Equation 3.0 and create the equation.
Seriously folks. It's 2012. Let *.doc and Microsoft Equation 3.0 die already. While your at it, let's figure out a universal formatting guideline to submit with. All of science will thank you.
Subscribe to:
Posts (Atom)