Open ayavuzcakir opened 1 month ago
So, seems like there are some bugs in versions ~1.91/ 1.92.
"cell_type_specific_TF_RE_binding"
function requires chromosome specific "cell_population_TF_RE_binding.txt"
on v1.92.
But "TF_RE_binding"
function does not create chromosome-specific mat. file in v1.92. I checked the other versions and it is changed after version 1.69. So I will try that version
Yes, I ran into the same problem when running the GRN_infer.md tutorial, I tried to run the 1.69 version after reading your suggestions。
LL_net.cell_type_specific_TF_RE_binding(GRNdir,adata_RNA,adata_ATAC,genome,celltype,outdir,method)
but I still encountered new problems.
`ValueError Traceback (most recent call last)
Cell In[42], line 4
2 celltype='0'#use a string to assign your cell type
3 #method='LINGER'
----> 4 LL_net.cell_type_specific_TF_RE_binding(GRNdir,adata_RNA,adata_ATAC,genome,celltype,outdir,method)
File /media/ssd/anaconda3/envs/LINGER_2/lib/python3.10/site-packages/LingerGRN/LL_net.py:363, in cell_type_specific_TF_RE_binding(GRNdir, adata_RNA, adata_ATAC, genome, celltype, outdir, method) 361 for i in tqdm(range(23)): 362 chrN=chrom[i] --> 363 out=cell_type_specific_TF_RE_binding_chr(adata_RNA,adata_ATAC,GRNdir,chrN,genome,celltype,outdir,method) 364 #result=pd.concat([result,out],axis=1).fillna(0) 365 result = pd.concat([result, out], join='outer', axis=0)
File /media/ssd/anaconda3/envs/LINGER_2/lib/python3.10/site-packages/LingerGRN/LL_net.py:333, in cell_type_specific_TF_RE_binding_chr(adata_RNA, adata_ATAC, GRNdir, chrN, genome, celltype, outdir, method) 331 RE_cluster=RE_cluster/RE_cluster.mean() 332 RE_cluster = RE_cluster[:,None] --> 333 S = np.log(RE_cluster+0.1) + np.log(mat+TFbinding+0.1) + np.log(TF_cluster+0.1) 334 S = np.exp(S) 335 S.index=N_overlap
File /media/ssd/anaconda3/envs/LINGER_2/lib/python3.10/site-packages/pandas/core/generic.py:2016, in NDFrame.array_ufunc(self, ufunc, method, *inputs, **kwargs) 2012 @final 2013 def array_ufunc( 2014 self, ufunc: np.ufunc, method: str, *inputs: Any, **kwargs: Any ... 299 elif is_list_like(right) and not isinstance(right, (ABCSeries, ABCDataFrame)): 300 # GH 36702. Raise when attempting arithmetic with list of array-like. 301 if any(is_array_like(el) for el in right):
ValueError: Unable to coerce to Series/DataFrame, dimension must be <= 2: (39428, 1, 1039)` It's really confusing, have you ever had a similar problem?
Hi, Were you able to solve this one? I am getting the same error.
Yes, I ran into the same problem when running the GRN_infer.md tutorial, I tried to run the 1.69 version after reading your suggestions。
LL_net.cell_type_specific_TF_RE_binding(GRNdir,adata_RNA,adata_ATAC,genome,celltype,outdir,method)
but I still encountered new problems. `ValueError Traceback (most recent call last) Cell In[42], line 4 2 celltype='0'#use a string to assign your cell type 3 #method='LINGER' ----> 4 LL_net.cell_type_specific_TF_RE_binding(GRNdir,adata_RNA,adata_ATAC,genome,celltype,outdir,method)File /media/ssd/anaconda3/envs/LINGER_2/lib/python3.10/site-packages/LingerGRN/LL_net.py:363, in cell_type_specific_TF_RE_binding(GRNdir, adata_RNA, adata_ATAC, genome, celltype, outdir, method) 361 for i in tqdm(range(23)): 362 chrN=chrom[i] --> 363 out=cell_type_specific_TF_RE_binding_chr(adata_RNA,adata_ATAC,GRNdir,chrN,genome,celltype,outdir,method) 364 #result=pd.concat([result,out],axis=1).fillna(0) 365 result = pd.concat([result, out], join='outer', axis=0)
File /media/ssd/anaconda3/envs/LINGER_2/lib/python3.10/site-packages/LingerGRN/LL_net.py:333, in cell_type_specific_TF_RE_binding_chr(adata_RNA, adata_ATAC, GRNdir, chrN, genome, celltype, outdir, method) 331 RE_cluster=RE_cluster/RE_cluster.mean() 332 RE_cluster = RE_cluster[:,None] --> 333 S = np.log(RE_cluster+0.1) + np.log(mat+TFbinding+0.1) + np.log(TF_cluster+0.1) 334 S = np.exp(S) 335 S.index=N_overlap
File /media/ssd/anaconda3/envs/LINGER_2/lib/python3.10/site-packages/pandas/core/generic.py:2016, in NDFrame.array_ufunc(self, ufunc, method, *inputs, kwargs) 2012 @Final 2013 def array_ufunc*( 2014 self, ufunc: np.ufunc, method: str, inputs: Any, **kwargs: Any ... 299 elif is_list_like(right) and not isinstance(right, (ABCSeries, ABCDataFrame)): 300 # GH 36702. Raise when attempting arithmetic with list of array-like. 301 if any(is_array_like(el) for el in right):
ValueError: Unable to coerce to Series/DataFrame, dimension must be <= 2: (39428, 1, 1039)` It's really confusing, have you ever had a similar problem?
Hi,
When I run the following function,
LL_net.cell_type_specific_TF_RE_binding(GRNdir,adata_RNA,adata_ATAC,genome,celltype,outdir,method)# different from the previous version
I have the following error,I am using version 1.9.1 as shown in the tutorial. I checked the source code for "cell_type_specific_TF_RE_binding" function and it requires the chromosome specific txt.file,
"mat=pd.read_csv(outdir+chrN+'_cell_population_TF_RE_binding.txt',sep='\t',index_col=0,header=0)"
I had some errors similar to this, seems like the PBMC.md is not up to date, could you please help with it? Kind regards, Yavuz