aertslab / scenicplus

SCENIC+ is a python package to build gene regulatory networks (GRNs) using combined or separate single-cell gene expression (scRNA-seq) and single-cell chromatin accessibility (scATAC-seq) data.
Other
186 stars 29 forks source link

split_fragments_by_cell_type doesn't generate proper celltype.fragments.tsv.gz file #346

Closed cjiang310437 closed 7 months ago

cjiang310437 commented 7 months ago

Got an error while calling export_pseudobulk function. It seems that split_fragments_by_cell_type.py did not generate proper celltype.fragments.tsv.gz file. Can you please take a look, thanks!

2024-04-03 11:14:57,009 cisTopic INFO Splitting fragments by cell type. Splitting fragments ... Skipping contig GL000008.2 because it is not in the fragments file ... Processing contig chrY Traceback (most recent call last):

Cell In[101], line 1 bw_paths, bed_paths = export_pseudobulk(input_data = cell_data,

File ~/.conda/envs/scenicplus_cj/lib/python3.8/site-packages/pycisTopic/pseudobulk_peak_calling.py:162 in export_pseudobulk split_fragment_files_by_cell_type(

File ~/.conda/envs/scenicplus_cj/lib/python3.8/site-packages/scatac_fragment_tools/library/split/split_fragments_by_cell_type.py:92 in split_fragment_files_by_cell_type raise ValueError(f"Fragment file {path_to_fragment_file} does not exist.")

ValueError: Fragment file /tmp/AF1/Fullterm1_Multiome.fragments.tsv.gz does not exist.

cjiang310437 commented 7 months ago

Problem solved following this thread. https://github.com/aertslab/scenicplus/issues/314 column 'barcode' in the cell_data has to match the barcodes in the fragment file.