Tuesday, May 27, 2014

RNA extraction - insoluble gel-like pellet

The Llama and I were working on some RNA extractions recently from a series of developmental stages in sorghum. Our lab's typical RNA extraction protocol (a GITC-phenol-chloroform based protocol; TRIzol and friends) worked fine for the developmentally younger tissue samples, but all of the more mature tissue samples ended up with a fairly large, insoluble, gel-like pellet at the end of the extraction. We initially believed the pellet to be RNA that we hadn't properly de-salted or that we had over-dried, leading to decreased solubility. However, additional de-salting, heating, physical beating, etc. never managed to resolubilize the pellet. After quite a bit of troubleshooting we determined that the insoluble pellet was starch (or at least some kind of carbohydrate) that, due to its high abundance in the tissues, wasn't removed during the extraction (of note, I had also occasionally run into a similar problem in Neurospora).

Once we had an idea that it might be a starch problem, the Llama found some specific extraction protocols to deal with high-starch tissues. The protocol from Wang et al. (2011) seems to work well enough in our hands, and we no longer have the insoluble pellet problem (although many of our samples are, unfortunately, fairly transcriptionally quiescent, so the yields aren't that high).

In summary, an insoluble, gel-like pellet at the end of an RNA extraction may be starch carry-over. A somewhat cloudy aqueous phase during the extraction (or, more extreme, a completely gelatinized aqueous phase) is a good indicator that you might run into this problem. The SDS and multiple extractions in the Wang et al. (2011) protocol seem to solve the problem.

Saturday, May 10, 2014

Modify PLINK to accept a new organism

06/10/14 Edit: It looks like PLINK is undergoing renewed development; a new version of PLINK (1.90) is in beta and has new flags that render this post unnecessary (see the --chr-set and --autosome-num flags)
----------------------------------------------------------------------------------------------------------------------------------
By default PLINK has a few different organisms basically hardcoded, but it isn't too much work to add your organism provided you can compile the code from source (note the compiler version issue resolved in this previous post).

Credit goes to this post from the biostars forum.

To modify PLINK to take a different organism, you'll need to modify the files listed below (switching the name of your organism of interest for Sorghum/sorghum). Add the relevant line near the other similar lines (e.g. the ones for dog, human, horse, etc.):

In helper.h, around line 195, add:
void defineSorghumChromosomes();
In helper.cpp, around line 1674,   add:
void defineSorghumChromosomes() {
//copy the function for a relevant species to here (e.g. rice) and change the chromosome number accordingly for your organism.
//in my case I also changed haploid to false.
}
In options.h, around line 578, add:
static bool species_sorghum;
In options.cpp, around line 467, add:
bool par::species_sorghum = false;
In plink.cpp, around line 167, add:
else if (par::species_sorghum) defineSorghumChromosomes();
In parse.cpp, around line 3536, add:
if (a.find("--sorghum")) par::species_sorghum = true;
After compilation, you can designate your added species when invoking PLINK (e.g. --sorghum) at the command line.

Friday, May 9, 2014

Downgrade g++ compiler on Ubuntu (compilation of PLINK and redeclaration errors)

I wanted to make a few modifications to the PLINK source code so that we can have it work with our organism for some GWAS. I was unable to compile with g++ version 4.7.2 since the PLINK code base redeclares variables after a previous declaration, and 4.7 does not permit variables to be redeclared. The easiest way around this was to downgrade compilers, since g++ 4.6 permits redeclaration. On Ubuntu this was as easy as:
sudo apt-get install g++-4.6
and specifying g++-4.6 as the compiler in the Makefile. This doesn't change the default version invoked with g++ (i.e. g++ -v at the CL still returns 4.7).

In summary:
g++ v4.7 stops with errors:
sets.cpp: In member function ‘vector_t Set::profileTestScore()’:
sets.cpp:771:37: error: redeclaration of ‘std::vector<individual>::iterator i’
sets.cpp:703:12: error: ‘int i’ previously declared here
g++ v4.6 proceeds with a few warnings