10XGenomics / cellranger

10x Genomics Single Cell Analysis
https://www.10xgenomics.com/support/software/cell-ranger
Other
366 stars 94 forks source link

possorted_genome_bam.bam file not found in cellranger output folder #212

Closed tangybat closed 1 year ago

tangybat commented 1 year ago

I am trying to run velocyto to generate loom files needed for scvelo analysis. It appears that I lack the "possorted_genome_bam.bam" file needed for velocyto that is supposed to be located in the cellranger output folder. Here is my code: (I was running it in a cluster)

#!/bin/sh
export HDF5_USE_FILE_LOCKING=FALSE
repeats="/velocyto/hg38_msk.gtf"
transcriptome="/velocyto/gencode.v43.annotation.gtf"
cellranger_output="/cellranger_output/NOThighp_10/"

/u/home/t/tangbria/.local/bin/velocyto run10x -m $repeats \
                $cellranger_output \
                $transcriptome

My code generated this error:

2023-04-22 11:18:39,382 - DEBUG - Using logic: Default 2023-04-22 11:18:39,402 - INFO - Read 2987 cell barcodes from /cellranger_output/NOThighp_10/outs/filtered_feature_bc_matrix/barcodes.tsv.gz 2023-04-22 11:18:39,402 - DEBUG - Example of barcode: AAACATGCAACTAACT and cell_id: NOThighp_10:AAACATGCAACTAACT-1 2023-04-22 11:18:39,414 - DEBUG - Peeking into /cellranger_output/NOThighp_10/outs/possorted_genome_bam.bam [E::hts_open_format] Failed to open file "/cellranger_output/NOThighp_10/outs/possorted_genome_bam.bam" : No such file or directory Traceback (most recent call last):

File "/u/home/t/tangbria/.local/bin/velocyto", line 33, in <module>
sys.exit(load_entry_point('velocyto==0.17.17', 'console_scripts', 'velocyto')())
  File "/u/home/t/tangbria/.local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/u/home/t/tangbria/.local/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/u/home/t/tangbria/.local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/u/home/t/tangbria/.local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/u/home/t/tangbria/.local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/u/home/t/tangbria/.local/lib/python3.9/site-packages/velocyto/commands/run10x.py", line 112, in run10x
    return _run(bamfile=(bamfile, ), gtffile=gtffile, bcfile=bcfile, outputfolder=outputfolder,
  File "/u/home/t/tangbria/.local/lib/python3.9/site-packages/velocyto/commands/_run.py", line 159, in _run
    exincounter.peek(bamfile[0])
  File "/u/home/t/tangbria/.local/lib/python3.9/site-packages/velocyto/counter.py", line 135, in peek
    fin = pysam.AlignmentFile(bamfile)  # type: pysam.AlignmentFile
  File "pysam/libcalignmentfile.pyx", line 751, in pysam.libcalignmentfile.AlignmentFile.__cinit__
  File "pysam/libcalignmentfile.pyx", line 950, in pysam.libcalignmentfile.AlignmentFile._open
FileNotFoundError: [Errno 2] could not open alignment file `/cellranger_output/NOThighp_10/outs/possorted_genome_bam.bam`: No such file or directory

The cellranger output folder has an outs subfolder that contains "atac_possorted_bam.bam" and "gex_possorted_bam.bam" files but no possorted_genome_bam.bam file. Am I missing this file in my folder?

elehnert10x commented 1 year ago

Thank you for your interest in Cell Ranger. GitHub Issues are not monitored by our support team. Please e-mail support@10xgenomics.com for support with Cell Ranger or visit our documentation site at https://www.10xgenomics.com/support/software/cell-ranger.