Skip to content

Issues running velocyto #192

Open
Open
@roofya

Description

@roofya

Hi,
I am trying to run velocyto using run10x command. I'm running on cluster by requesting 60 GB memory. Do I need more memory for that? Thank you so much for your help.

initial position.
2019-04-29 20:09:26,261 - DEBUG - 2745314 reads were skipped because no apropiate cell or umi barcode was found
2019-04-29 20:09:26,262 - INFO - Now just waiting that the bam sorting process terminates
Traceback (most recent call last):
File "/home/mrr2006/.conda/envs/velocyto/bin/velocyto", line 11, in
sys.exit(cli())
File "/home/mrr2006/.conda/envs/velocyto/lib/python3.6/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/home/mrr2006/.conda/envs/velocyto/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/mrr2006/.conda/envs/velocyto/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/mrr2006/.conda/envs/velocyto/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mrr2006/.conda/envs/velocyto/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/mrr2006/.conda/envs/velocyto/lib/python3.6/site-packages/velocyto/commands/run10x.py", line 115, in run10x
samtools_memory=samtools_memory, dump=dump, loom_numeric_dtype=dtype, verbose=verbose, additional_ca=additional_ca)
File "/home/mrr2006/.conda/envs/velocyto/lib/python3.6/site-packages/velocyto/commands/_run.py", line 225, in _run
Otherwise sort manually by samtools sort -l [compression] -m [mb_to_use]M -t [tagname] -O BAM -@ [threads_to_use] -o cellsorted_[bamfile] [bamfile]")
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]

Activity

saeedfc

saeedfc commented on Oct 23, 2019

@saeedfc

Had same problem. Solved this way.
Ran samtools first to get the cellsorted_possorted.genome_bam.bam file. And then ran velocyto.
In the velocyto documentation, it says "If the file cellsorted_[ORIGINALBAMNAME] exists, the sorting procedure will be skipped and the file present will be used."

(base) u0119129@gbw-d-l0099:~$ samtools sort -t CB -O BAM -o/mnt/DATA2/RAW_DATA/Re_Run_\ 2018_Data_with_updated_reference_genome/KUL-1-1000cells/outs/cellsorted_possorted_genome_bam.bam /mnt/DATA2/RAW_DATA/Re_Run_\ 2018_Data_with_updated_reference_genome/KUL-1-1000cells/outs/possorted_genome_bam.bam

(base) u0119129@gbw-d-l0099:~$ velocyto run10x -m /mnt/DATA1/Velocyto/alltracks_mask.gtf /mnt/DATA2/RAW_DATA/Re_Run_\ 2018_Data_with_updated_reference_genome/KUL-1-1000cells /mnt/DATA1/Velocyto/refdata-cellranger-mm10-3.0.0/genes/genes.gtf

Hope it helps

SiyiWanggou

SiyiWanggou commented on Mar 5, 2020

@SiyiWanggou

I meet the same error.
I am just wondering what's the meaning of "-t CB" in samtools sort here?
Could you show me about this?
Thanks,

SiyiWanggou

SiyiWanggou commented on Mar 5, 2020

@SiyiWanggou

Does CB meanings "Cell Barcodes" here?

kaizen89

kaizen89 commented on Mar 5, 2020

@kaizen89

@SiyiWanggou As I understand, CB is a tag in the bam file which contains the barcodes. If you want to sort by cell barcodes then you should set -t CB. Do not put the path to cell bacodes file here.

SiyiWanggou

SiyiWanggou commented on Mar 5, 2020

@SiyiWanggou

@kaizen89 Thanks. I get some information from 10X genomics website. It discibes CB as "Chromium cellular barcode sequence that is error-corrected and confirmed against a list of known-good barcode sequences". I think you are correct.

arjun0502

arjun0502 commented on Feb 19, 2021

@arjun0502

@kaizen89 @saeedfc I tried velocyto run -b barcodes.tsv -o ./velocyto_mcf10a_results -m repeat_msk.gtf cellsorted_possorted_genome_bam.bam hg38_ens94.chr.gtf and I got an error saying that the cell and umis are not correctly formatted....Am I running this correctly?

ywen1407

ywen1407 commented on Oct 27, 2021

@ywen1407

@arjun0502 Hi, I'm also struggling with this. Running velocyto run after samtools, and it says the cell and umis are not correctly formatted. Have you managed to solve this? Thanks!

denvercal1234GitHub

denvercal1234GitHub commented on Nov 19, 2021

@denvercal1234GitHub

@saeedfc -- When you manually sort your bam first, did you then need to use the original bam.bai (index) file that came with the cellranger count? Or, did you have to index your cellsorted_possorted...bam file? If so, how did you index it? --- Issue #321

# like this? or any options?
samtools index sample.sorted.bam
ghost

ghost commented on Aug 27, 2024

@ghost

@ywen1407 @arjun0502 I got the same error. Did you figure out a way to fix this? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @kaizen89@arjun0502@saeedfc@roofya@SiyiWanggou

        Issue actions

          Issues running velocyto · Issue #192 · velocyto-team/velocyto.py