aertslab / pySCENIC

pySCENIC is a lightning-fast python implementation of the SCENIC pipeline (Single-Cell rEgulatory Network Inference and Clustering) which enables biologists to infer transcription factors, gene regulatory networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
420 stars 179 forks source link

Failure to run export2loom #88

Closed jeppeseverens closed 5 years ago

jeppeseverens commented 5 years ago

Hello, I have been trying to run pySCENIC and I went through all the steps as noted in your tutorial pretty easily, thank you for that.

But now I want to export to a .loom file, to be able to analyse the results in R since I am more familiar with that language. But, I keep running in this issue with export2loom:


AttributeError Traceback (most recent call last)

in ----> 1 export2loom(ex_matrix, regulons, annotations, LOOM_FILE, title = "jeppe starmapped lepr+ mit20 feat1500", nomenclature = "mgi") C:\ProgramData\Miniconda3\lib\site-packages\pyscenic\export.py in export2loom(ex_mtx, regulons, out_fname, cell_annotations, tree_structure, title, nomenclature, num_workers, embeddings, auc_mtx, auc_thresholds, compress) 113 # Encode cell type clusters. 114 # The name of the column should match the identifier of the clustering. --> 115 name2idx = dict(map(reversed, enumerate(sorted(set(cell_annotations.values()))))) 116 clusterings = pd.DataFrame(data=ex_mtx.index.values, 117 index=ex_mtx.index, AttributeError: 'str' object has no attribute 'values' --------------------------------------------------------------------------------------- I have run the suggested function to check if the annotations object is a dictionary with str: str etc. Could you maybe help me?
jeppeseverens commented 5 years ago

I got it working by installing the github version and leaving out the annotations, thank you