This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Help with error running velocyto

Hi Biostars,

I try to get the loom file to do velocity analysis:

velocyto run10x -m Hg38_rmsk.gtf WT/outs /cellranger/reference/refdata-cellranger-GRCh38-3.0.0/genes/genes.gtf

Inside WT/outs I have some folders such as filtered_feature_bc_matrix. Inside filtered_feature_bc_matrix, I have barcodes.tsv.gz

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!  
line 91, in run10x.  
bcfile = bcmatches[0].  
IndexError: list index out of range.

Would you please have a suggestion? Thank you so much!

Update: I added the bam file and rename it to: possorted_genome_bam.bam then:
FileNotFoundError: [Errno 2] No such file or directory: 'samtools': 'samtools'

velocyto

Is there a WT/_versions file? Also, what is the version of velocyto you're using?

No, I don't have _versions inside WT. I. think it is 0.17.17. I also have another folder MT.

Cellranger produces some files with runtime parameters and settings and dumps them in the same directory as the outs directory. Also, please don't guess versions - double check and add what you can verify. I cannot help you with velocyto but any software issue can only benefit from exact version info.

Yes, I checked. It is 0.17.17.

1 answer

Hey, use Run on any technique (Advanced use) option for your data. You should be able to run velocyto in your multi-ome data.

velocyto run -b barcodes.tsv -o output_dir -m hg38_rmsk.gtf sample_alignments.bam cellranger/refdata-gex-GRCh38-2020-A/genes/genes.gtf

Thank you! I got the same error after gunzip the barcodes.tsv.gz file:

FileNotFoundError: [Errno 2] No such file or directory: 'samtools': 'samtools'

Did you load or have samtools in the path? Also, do not forget to gunzip hg38_rmsk.gtf.gz > hg38_rmsk.gtf before running velocyto.

The tutorial doesn't mention we need to load samtools. Thank you so much! You are awesome. It is running now.

Sure thing! If it worked, please accept the answer.

Unfortunately, I got a new error:

MemoryError: bam file #0 could not be sorted by cells. This is probably related to an old version of samtools, please install samtools >= 1.6. In alternative this could be a memory error, try to set the --samtools_memory option to a value compatible with your system.
Otherwise sort manually by samtools sort -l [compression] -m [mb_to_use]M -t [tagname] -O BAM -@ [threads_to_use] -o cellsorted_[bamfile] [bamfile]

I have samtools 1.9 and ran this:

velocyto run -b MT/outs/filtered_feature_bc_matrix/barcodes.tsv -o output_dir -m Hg38_rmsk.gtf MT/outs/possorted_genome_bam.bam /cellranger/reference/refdata-cellranger-GRCh38
-3.0.0/genes/genes.gtf --samtools-memory 4000 --samtools-threads 8

Log in to answer this question.