RNAseq matrix input for WGCNA analysis
1
0
Entering edit mode
20 months ago
cardon.chc • 0

Dear users,

I need to run a co-expression network analysis using the WGCNA package, however, I have a question regarding the RNAseq matrix input to initiate the analysis.

I have the gene count from RSEM, in which I generated a list of the TPM values through tximport that I used to run the differential expression analysis with DESeq2 before.

My question is: Can I use the imported gene count list from tximport to generate the matrix count to run the WGCNA? If yes, how to transform this list into the appropriate matrix format? If not, could someone, please show any example of to how create the matrix count from my RSEM gene count result to run the WGCNA analysis?

Following is the format of my gene count list from RSEM TPM gene count result imported with tximport:

tx_rsem $abundance ILWN_RNAseq_G002_ATCACG_Arachis_hypogaea_I801_L1 arahy.Tifrunner.gnm1.ann1.0002EG 0.00 arahy.Tifrunner.gnm1.ann1.0003EL 13.53 arahy.Tifrunner.gnm1.ann1.0008XH 4.98 arahy.Tifrunner.gnm1.ann1.002YPW 339.12 arahy.Tifrunner.gnm1.ann1.0034KJ 15.75

There are a total of 67000 genes and 132 samples.

Thank you very much in advance.

Regards,

Carlos

WGCNA • 693 views
ADD COMMENT
1
Entering edit mode
20 months ago
LChart 3.9k

You should be able to pass in $abundance to WGCNA methods directly:

library(tximportData)
library(tximport)
library(WGCNA)

dir <- system.file('extdata', package='tximportData')
samples <- read.table(file.path(dir, "samples.txt"), header = TRUE)
files <- file.path(dir, "rsem", samples$run, paste0(samples$run, ".genes.results.gz"))
names(files) <- paste0("sample", 1:6)
txi.rsem <- tximport(files, type = "rsem", txIn = FALSE, txOut = FALSE)

WGCNA::pickSoftThreshold(t(log(1+txi.rsem$abundance)))

You should probably filter genes on count, abundance, and variance prior to running WGCNA; but the mechanics should be straightforward. Are you hitting an error? If so please post it.

ADD COMMENT

Login before adding your answer.

Traffic: 2477 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6