velocyto.py icon indicating copy to clipboard operation
velocyto.py copied to clipboard

ERRORS when running velocyto: ERROR - This is an older version of cellranger, cannot check if the output are ready, make sure of this yourself! ERROR - Can not locate the barcodes.tsv file!

Open AsyaTiho opened this issue 1 year ago • 2 comments

Good afternoon Velocyto team, I know many users run into this issue, but I could not fix it by what was offered in the community. I am running velocyto in conda environment recommended by 10X genomics. My Cell Ranger output directory consists of the following files: file directory for the velocyto 10x files

**- analysis (untared and ungziped folder)

  • filtered_feature_bc_matrix (untared and ungziped folder)
  • barcodes.tsv (ungiziped)
  • features.tsv
  • filtered_feature_bc_matrix.h5
  • molecule_info.h5
  • possorted_genome_bam.bam
  • raw_feature_bc_matrix.h5
  • web_summary.html**

I am running the following command: velocyto run10x /home/agera4/RNAvelocityHCI003GM/outs /home/agera4/genes.gtf

This is the errors I am getting:

2023-03-24 15:01:38,904 - ERROR - This is an older version of cellranger, cannot check if the output are ready, make sure of this yourself 2023-03-24 15:01:38,905 - ERROR - Can not locate the barcodes.tsv file! Traceback (most recent call last): File "/home/agera4/.conda/envs/tutorial/bin/velocyto", line 11, in sys.exit(cli()) File "/home/agera4/.conda/envs/tutorial/lib/python3.6/site-packages/click/core.py", line 1128, in call return self.main(*args, **kwargs) File "/home/agera4/.conda/envs/tutorial/lib/python3.6/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/agera4/.conda/envs/tutorial/lib/python3.6/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/agera4/.conda/envs/tutorial/lib/python3.6/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/agera4/.conda/envs/tutorial/lib/python3.6/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/agera4/.conda/envs/tutorial/lib/python3.6/site-packages/velocyto/commands/run10x.py", line 91, in run10x bcfile = bcmatches[0] IndexError: list index out of range

What should I do to fix it?

AsyaTiho avatar Mar 24 '23 20:03 AsyaTiho

Hi AsyaTiho,

I had similar issue. I was using the data provided by 10x Genomics tutorial. https://www.10xgenomics.com/resources/analysis-guides/trajectory-analysis-using-10x-Genomics-single-cell-gene-expression-data Command: velocyto run10x /scratch/s167561/trajectory_analysis/ /scratch/s167561/reference/10X_references/refdata-gex-GRCh38-2020-A/genes/genes.gtf

Have you figured out how to fix it?

Thanks, Yan

Error information: 2023-04-25 14:06:49,230 - ERROR - This is an older version of cellranger, cannot check if the output are ready, make sure of this yourself 2023-04-25 14:06:49,230 - ERROR - Can not locate the barcodes.tsv file! Traceback (most recent call last): File "/home/s167561/mambaforge/envs/trajectory/bin/velocyto", line 11, in sys.exit(cli()) File "/home/s167561/mambaforge/envs/trajectory/lib/python3.6/site-packages/click/core.py", line 1128, in call return self.main(*args, **kwargs) File "/home/s167561/mambaforge/envs/trajectory/lib/python3.6/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/s167561/mambaforge/envs/trajectory/lib/python3.6/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/s167561/mambaforge/envs/trajectory/lib/python3.6/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/s167561/mambaforge/envs/trajectory/lib/python3.6/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/s167561/mambaforge/envs/trajectory/lib/python3.6/site-packages/velocyto/commands/run10x.py", line 91, in run10x bcfile = bcmatches[0] IndexError: list index out of range /var/spool/slurmd/job01033/slurm_script: line 25: calculate_duration: command not found

yl315504 avatar Apr 25 '23 19:04 yl315504

From the tutorial you should run velocyto as follows:

repeat_masker="/path/to/grch38_rmsk.gtf"
reference_genes_gtf="/path/to/refdata-gex-GRCh38-2020-A/genes/genes.gtf"
input_10x="$1"
echo ${input_10x}
velocyto run10x -m "$repeat_masker" "$input_10x"  "$reference_genes_gtf"

Your input_10x should be pointing to directory where 10x dumps all of the files (outs and logs etc).

BC matrix will be read using the following lines. Because it checks the outs in that directory if you give the outs as it was suggested. It adds path/outs again which cannot find the output.

    bcmatches = glob.glob(os.path.join(samplefolder, os.path.normcase("outs/filtered_gene_bc_matrices/*/barcodes.tsv")))
    if len(bcmatches) == 0:
        bcmatches = glob.glob(os.path.join(samplefolder, os.path.normcase("outs/filtered_feature_bc_matrix/barcodes.tsv.gz")))
    if len(bcmatches) == 0:
        logging.error("Can not locate the barcodes.tsv file!")
    bcfile = bcmatches[0]

in your case this is /home/agera4/RNAvelocityHCI003GM

mortunco avatar Oct 03 '23 06:10 mortunco