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
163 stars 27 forks source link

export_pseudobulk() does not work #349

Open Ashika-Jayanthy opened 2 months ago

Ashika-Jayanthy commented 2 months ago

The tutorial worked just fine on my laptop but I'm having issues with the export_pseudobulk command on. my data. I have the fragments.gz file as well as the index tbi file in the same folder. This is the error I'm getting:

bi [E::bgzf_uncompress] Inflate operation failed: 3 [E::bgzf_read_block] Invalid BGZF header at offset 138223691 thread '' panicked at src/split_fragments.rs:154:53: called Result::unwrap() on an Err value: TabixTruncatedRecord note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Ashika-Jayanthy commented 2 months ago

And when I use peak bed file from a different program directly into pycistopic qc, I get the following error:

Traceback (most recent call last): File "/usr/local/bin/pycistopic", line 8, in sys.exit(main()) ^^^^^^ File "/usr/local/lib/python3.11/site-packages/pycisTopic/cli/pycistopic.py", line 26, in main args.func(args) File "/usr/local/lib/python3.11/site-packages/pycisTopic/cli/subcommand/qc.py", line 233, in run_qc qc( File "/usr/local/lib/python3.11/site-packages/pycisTopic/cli/subcommand/qc.py", line 133, in qc fragments_df_pl = read_fragments_to_polars_df( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pycisTopic/fragments.py", line 353, in read_fragments_to_polars_df fragments_df_pl = read_bed_to_polars_df( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pycisTopic/fragments.py", line 281, in read_bed_to_polars_df pa.csv.read_csv( File "pyarrow/_csv.pyx", line 1261, in pyarrow._csv.read_csv File "pyarrow/_csv.pyx", line 1270, in pyarrow._csv.read_csv File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status OSError: zlib inflate failed: incorrect data check

It appears as if there's some issue with the compression but I don't have any such issues with the tutorial files.

ghuls commented 2 months ago

Your input file is very likely corrupt.

I assume decompressing the file with gzip will fail too:

# Try to decompress the file.
gzip -cd fragments.tsv.gz > fragments.tsv

# Check the last few lines.
tail fragments.tsv