Comments (1)
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)
- cn_salmon Error: cannot open compressed file 'geneToTrans_Homo_sapiens.GRCh38.80.exo_Jul_04_2015.R' HOT 5
- Problem running cn_make_processor HOT 4
- Error in "cn_make_grn" HOT 1
- Example on running locally HOT 1
- cn_salmon HOT 1
- Question: NIS scores for single cell data
- Origin of TF list for Homo sapiens HOT 1
- cn_apply() Error in predict.randomForest HOT 4
- Error at step 8 of the PROCEDURE HOT 1
- Error while running cn_barplot_grnSing
- interpreting NIS plot HOT 2
- Can't download the reference example HOT 5
- cn_apply: does not match
- STEP 6: Error in geneIndexList[[i]] : subscript out of bounds
- Unused argument in cn_salmon HOT 2
- Human training data HOT 2
- cn_salmon error HOT 1
- cn_salmon Error:arguments implying differing number of rows HOT 8
- Using CellNet downstream of salmon HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cellnet.