Open Zymaniswenzai opened 3 years ago
regulonAUC <- importAUCfromText("aucell.csv")
I have figured it out. This R script can load the results from:
!pyscenic aucell \
sample.loom \
reg.csv \
--output aucell.csv \
--num_workers 20
Hi, after reading your answer, I want to ask you a question. when I finish the progress of pySCENIC, I got 3 csv files:
C11_adjacencies.txt C11_AUC.txt C11_adjacencies.txt
I got .loom by this script:
export2loom(ex_mtx = ex_matrix, auc_mtx = auc_mtx, regulons = [r.rename(r.name.replace('(',' (')) for r in regulons], out_fname = "./C11_DA.loom")
but when I load this .loom in R to do visualization , I got a Error :
pyScenicLoomFile <- file.path(pyScenicDir, "C11.loom") loom <- open_loom(pyScenicLoomFile, mode="r") regulons_incidMat <- get_regulons(loom)
Error in get_regulons(loom) :
The attribute 'MotifRegulons' is not available in this loom file. Possible values include: Regulons. Try setting the 'column.attr.name' argument to one of these values (i.e., get_regulons(loom, column.attr.name='Regulons')).
and this is the .loom
loom Class: H5File Filename: /mnt/12/C11_DA/SCENIC/pySCENIC/C11_DA.loom Access type: H5F_ACC_RDONLY Attributes: last_modified Listing: name obj_type dataset.dims dataset.type_class attrs H5I_GROUP
col_attrs H5I_GROUP col_graphs H5I_GROUP layers H5I_GROUP matrix H5I_DATASET 23686 x 35035 H5T_FLOAT row_attrs H5I_GROUP row_graphs H5I_GROUP
So can you tell me how you get the .loom and .csv file.
Hi,@ZJ-zoujing.
I didn't finish that step because it reported errors.
export2loom(ex_mtx = ex_matrix, auc_mtx = auc_mtx, regulons = [r.rename(r.name.replace('(',' (')) for r in regulons], out_fname = "./C11_DA.loom")
as you can see, I just run this step in R:
regulonAUC <- importAUCfromText("C11_AUC.txt")
But the results looked different from the one produced by SCENIC:
They did not have '_extended' like this pic:
Hi, Thank you for developing this great tool. And I need a little instruction in maybe the final step , after nearly a month of struggling, I finally got the output file through run these command lines:
I got both![image](https://user-images.githubusercontent.com/30076901/121653830-ad54f800-cacf-11eb-9c9e-24ef8204e669.png)
.loom
and.csv
file. I checked the.csv
file, it is like this:Can I get this type of picture from using this
.csv
file?The official tutorial is really confusing to me, since I started doing analysis on PCs and servers using SCENIC R packages. But the slow speed and failure to find a solution later prompted me to start looking into Python code, even though I had never used Python. In the process of trying to meet the same problem with #294. but so far do not know the solution. I've switched to another approach, where the code mentioned above gets a similar type of result to the one in R.
There are R code in scaling and visualization. I guess AUCell's output
.csv
file should be similar to regulonActivity_byCellType?regulonAUC <- regulonAUC[onlyNonDuplicatedExtended(rownames(regulonAUC)),] regulonActivity_byCellType <- sapply(split(rownames(cellInfo), cellInfo$CellType), function(cells) rowMeans(getAUC(regulonAUC)[,cells])) regulonActivity_byCellType_Scaled <- t(scale(t(regulonActivity_byCellType), center = T, scale=T)) ComplexHeatmap::Heatmap(regulonActivity_byCellType_Scaled1, name="Regulon activity")
And I also run
and get tSNE and UMAP text file, what can they do?
Thanks for any help!