Hi,

if you don't have enough memory to store the entire TOM within RAM,
you cannot simply retrieve it and subset it.

There are 3 options for what you want to do:

1. If all genes are in the same block, calculate the TOM from the
block genes and subset it appropriately. This will exactly reproduce
the TOM used in network construction and module identification. If you
saved the block TOMs, you can read the relevant block TOM using the
function load() and convert it to matrix using as.matrix (the TOMs are
saved as distance structures to save disk space). Again, this will
only work if all genes you want to display are in the same block.

2. You can use the function vectorTOM to calculate the TOM of selected
genes. This calculation does not need as much memory, but will take a
long time. You will get the TOM of the selected genes directly. Since
this TOM is calculated with respect to all genes (not just block
genes), it will be slightly different from the TOM used for network
construction.

3. The simplest but worst approximation is to select the relevant
genes directly in the expression data and calculate TOM only from
these restricted expression data using TOMsimilarityFromExpression().
The resulting TOM should approximate the TOM used for network
construction fairly well but there may also be relevant discrepancies.

Best,

Peter


On Fri, May 23, 2014 at 2:37 PM, Garima [via R]
<ml-node+s789695n4691152...@n4.nabble.com> wrote:
> Hi,
>
> I have a similar problem. I used blockwise module construction for my huge
> dataset and saved TOM files. Can I somehow retrieve the combined TOM for
> whole dataset datExp, in order to plot MDSplot and heatmap for top hub or
> select genes genes using the following commonds given the WGCNA tutorial:
>
> nSelect = 400
> set.seed(10);
> select = sample(nGenes, size = nSelect);
> selectTOM = dissTOM[select, select];
>
> Thanks.
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://r.789695.n4.nabble.com/Error-during-working-with-wgcna-and-R-tp4635768p4691152.html
> To unsubscribe from Error during working with wgcna and R, click here.
> NAML




--
View this message in context: 
http://r.789695.n4.nabble.com/Error-during-working-with-wgcna-and-R-tp4635768p4691156.html
Sent from the R help mailing list archive at Nabble.com.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to