Giter Club home page Giter Club logo

Comments (1)

AIBio avatar AIBio commented on July 19, 2024

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

from cellnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.