This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Xenocell - Error in classify reads

Hello everyone, I'm trying to run Xenocell on my dataset. I have some problems executing the "classify reads" step. The command terminates after starting the classification ("terminate called after throwing an instance of 'std::ios_base::failure'"). and I don't know how to fix the error. Any help would be appreciated. Thank you!

(base) -bash-4.2$ singularity exec xenocell_1.0.sif xenocell.py classify_reads --transcript /scratch/path/fastq/S2_L001_R2_001.fastq.gz --barcode /scratch/path/fastq/S2_L001_R1_001.fastq.gz  --barcode_start 1 --barcode_length 16 --index /scratch/path/xenocell/xenome --output /scratch/path/xenocell/S2 --threads 16 --memory 70 --compression_level 1
##----------------------------------------------------------------------------##
## XenoCell: Classify reads and generate table of cellular barcodes.
##----------------------------------------------------------------------------##
## FASTQ file containing transcript:       /scratch/path/fastq/S2_L001_R2_001.fastq.gz
## FASTQ file containing cellular barcode: /scratch/path/fastq/S2_L001_R1_001.fastq.gz
## Barcode starting position:              1
## Length of cellular barcode:             16
## Path to Xenome index:                   /scratch/path/xenocell/xenome
## Output directory:                       /scratch/path/xenocell/S2
## Keep Xenome output files:               False
## Number of threads:                      16
## Memory in GB:                           70
## Compression level:                      1
##----------------------------------------------------------------------------##
[2023-03-15 08:48:52] De-compress FASTQ files before classifying...
[2023-03-15 09:10:32] Start classification...
terminate called after throwing an instance of 'std::ios_base::failure'
  what():  basic_ios::clear
Aborted
[2023-03-15 09:51:43] Fix FASTQ format...
sed: couldn't write 67 items to stdout: Disk quota exceeded
sed: couldn't write 150 items to stdout: Broken pipe
sed: couldn't write 66 items to stdout: Disk quota exceeded
sed: couldn't write 150 items to stdout: Broken pipe
[2023-03-15 09:51:43] Create list of read names to extract...
[2023-03-15 09:51:43] Extract reads...
[2023-03-15 09:58:03] Generate table of cellular barcodes and associated read counts...
Traceback (most recent call last):
  File "/XenoCell/python/xenocell.py", line 297, in <module>
    main()
  File "/XenoCell/python/xenocell.py", line 35, in main
    args.func(args)
  File "/XenoCell/python/classify_reads.py", line 96, in classify_reads
    df_barcodes_all = generate_barcode_table('fq_barcode_graft.fq', 'fq_barcode_host.fq', barcode_start_position, barcode_end_position)
  File "/XenoCell/python/classify_reads.py", line 240, in generate_barcode_table
    barcodes_graft.columns = ['barcode', 'graft']
  File "/opt/conda/lib/python3.7/site-packages/pandas/core/generic.py", line 5478, in __setattr__
    return object.__setattr__(self, name, value)
  File "pandas/_libs/properties.pyx", line 66, in pandas._libs.properties.AxisProperty.__set__
  File "/opt/conda/lib/python3.7/site-packages/pandas/core/generic.py", line 670, in _set_axis
    self._mgr.set_axis(axis, labels)
  File "/opt/conda/lib/python3.7/site-packages/pandas/core/internals/managers.py", line 221, in set_axis
    f"Length mismatch: Expected axis has {old_len} elements, new "
ValueError: Length mismatch: Expected axis has 1 elements, new values have 2 elements
xenocell pdx scrnaseq singularity-container

I wasn't sure if this is the initial problem since this message turns up later than the first error message

Did this fix your problem? I am having the same issue....

1 answer

XenoCell uses Xenome v1.0.1r which reads and writes only uncompressed FASTQs so addressing disk space is a critical issue. It will probably solve your problem.

Thanks, I'll give it a go and update this group!

Please do not add answers unless you're answering the top level post. Use Add Comment or Add Reply as appropriate instead. Every time you add an answer, the post gets an annoying bump so please stop doing that.

I've moved your post to the right spot this time - another moderator did this the last time. Please be more careful in the future.

That's a good catch, thank you. We will add this as a feature request for the next version of Xenome.

(There is a new version in active development. It's all being done during our limited spare time, so no promises on when.)

Are you one of the contributors to that repository? Please feel free to email me at ramrs at nyu dot edu if you’d rather not associate your username here to your GitHub identity. I’ve had a conversation with Roman Hilllje about contributing to XenoCell and a bit of Xenome in general.

Log in to answer this question.