CellNet icon indicating copy to clipboard operation
CellNet copied to clipboard

Beg you to help us reconstruct GRNs

Open AIBio opened this issue 3 years ago • 1 comments

Hi Patrick,

First, I really really really hope you could help me.

For now, I am working on a research topic and want to use CellNet to access similarity of transcriptome. But I cannot to use the pre-built GRNs you provieded in web-base tools. So I have to use home-made data to build a new GRNs. I followed the instructions written in Nature protocol and Platform-Agnostic CellNet and successfully classify query samples.

But, all values abount GRN status are NaN. I've tried many times, but it doesn't solve the problem.

Could you help me to check files and re-try to compute GRN status. Our files are provieded in my GitHub. (https://github.com/AIBio/Pictures_for_Markdown/blob/master/CellNet_files.zip)

If you wish, we can list you as a co-author on the paper.

Thank you again!!!!

Hanwen Yu

Best wishes

AIBio avatar Jul 08 '22 18:07 AIBio

Hi Dan,

About training and query data

Both data are TPM matrices of genes. I found an error in these files. So I re-upload the files in my GitHub (https://github.com/AIBio/Pictures_for_Markdown/blob/master/CellNet_files.zip).

Here is my code to run CellNet:

grnProp <- cn_make_grn(sampTab = stAll, expDat = expAll[iGenes,], species = 'Mm', tfs = mmTFs, holmSpec = 1e-04) cnProc <- cn_make_processor(expTrain = expAll, stTrain = stAll, ctGRNs = grnProp, dLevel = "description1", sidCol = "sample_id") cnRes1 <- cn_apply(as.matrix(na.omit(all.ge.tpm[iGenes,])), all.meta.cellnet, cnProc, dLevelQuery = "sample_id") bOrder <- c("Late2C", colnames(ge.tpm.raw$All_Toti)[1:14], "ICM") cn_barplot_grnSing(cnRes0, cnProc, "ICM", c("Late2C", "ICM"), bOrder, sidCol = "sample_id") rownames(all.meta.cellnet) <- as.vector(all.meta.cellnet$sample_id) tfScores <- cn_nis_all(cnRes1, cnProc, "ICM") plot_nis(tfScores, "ICM", all.meta.cellnet, "TLSCs.P12", dLevel = "description1", limitTo = 0)

Here is my code to run PACNet analysis:

Because I didn't have a GRN files for my samples. I have to reconstruct it. I have try to use the GRN file from CellNet output. But it didn't work.

grnAll <- utils_loadObject("CellNet_Rpks_output_grnProp_Mouse_pre-implantation_embryo_RS_Jul_08_2022.rda") cnProc <- utils_loadObject("CellNet_Rpks_output_cnProc_Mouse_pre-implantation_embryo_RS_Jul_08_2022.rda") grnAll <- grnAll trainNormParam <- cnProc[8:12] grnAll <- subsetGRNall(grnAll, iGenes) trainNormParam <- subsetTrainNormParam(trainNormParam, grnAll, iGenes) queryExpDat <- log(1+all.ge.tpm[iGenes,]) queryExpDat_ranked <- logRank(queryExpDat, base = 0) GRN_statusQuery <- ccn_queryGRNstatus(expQuery = as.data.frame(queryExpDat_ranked), grn_return = grnAll, trainNorm = trainNormParam, classifier_return = my_classifier, prune = TRUE)

Here is my code to reconstruct GRNs with PACNet:

Since PACNet doesn't seem to support mouse data, I changed the code of the "ccn_makeGRN" function:

grnProp.pa <- ccn_makeGRN_new(expTrain = expAll[iGenes,], stTrain = stAll, species = "Mm", dLevel = "description1", dLevelGK = "description6") trainNormParam <- ccn_trainNorm(expTrain = expAll[iGenes,], stTrain = stAll, subNets = grnProp[["ctGRNs"]][["geneLists"]],dLevel = "description1", sidCol = "sample_id")

Thank you again

Hanwen

Best wishes

AIBio avatar Jul 09 '22 00:07 AIBio