kharchenkolab / numbat

Haplotype-aware CNV analysis from single-cell RNA-seq
https://kharchenkolab.github.io/numbat/
Other
156 stars 22 forks source link

Numbat fails with 10X Visium Sample Data - Normal Human Prostate #166

Open corecontingency opened 3 months ago

corecontingency commented 3 months ago

Numbat via docker container was run with the 10X Visium Normal Human Prostate sample data, which failed. The data can be downloaded from 10X here.

Logs are below:

$ sudo docker run -v /home/user/src/numbat:/mnt/mydata -it pkharchenkolab/numbat-rbase:main /bin/bash
 --label Visium_FFPE_Human_Normal_Prostate \
    --samples Visium_FFPE_Human_Normal_Prostate \
    --bams /mnt/mydata/all_samples/human_normal_prostate_FFPE/possorted_genome_bam.bam \
    --barcodes /mnt/mydata/all_samples/human_normal_prostate_FFPE/raw_feature_bc_matrix/barcodes.tsv.gz \
    --outdir /mnt/mydata/prostate \
    --gmap /Eagle_v2.4.1/tables/genetic_map_hg38_withX.txt.gz \
    --snpvcf /data/genome1K.phase3.SNP_AF5e2.chr1toX.hg38.vcf \
    --paneldir /data/1000G_hg38 \
    --ncores 6
Using genome version: hg38
Running pileup
[I::main] start time: 2024-02-17 19:31:46
[W::check_args] Max depth set to maximum value (2147483647)
[W::check_args] Max pileup set to maximum value (2147483647)
[I::main] global settings after checking:
    num of input files = 1
    out_dir = /mnt/mydata/prostate/pileup/Visium_FFPE_Human_Normal_Prostate
    is_out_zip = 0, is_genotype = 0
    is_target = 0, num_of_pos = 0
    num_of_barcodes = 4991, num_of_samples = 0
    refseq file = (null)
    0 chroms: 
    cell-tag = CB, umi-tag = UB
    nthreads = 6, tp_max_open = 1073741816
    mthreads = 6, tp_errno = 0, tp_ntry = 0
    min_count = 2, min_maf = 0.00, double_gl = 0
    min_len = 30, min_mapq = 20
    rflag_filter = 772, rflag_require = 0
    max_depth = 2147483647, max_pileup = 2147483647, no_orphan = 1
[I::main] loading the VCF file for given SNPs ...
[I::main] fetching 7352497 candidate variants ...
[I::main] mode 1a: fetch given SNPs in 4991 single cells.
[E::hts_idx_load3] Could not load local index file '/mnt/mydata/all_samples/human_normal_prostate_FFPE/possorted_genome_bam.bam.bai' : Invalid argument
[E::csp_fetch] failed to load index for /mnt/mydata/all_samples/human_normal_prostate_FFPE/possorted_genome_bam.bam.
[E::main] running mode 1a failed.
[E::main] Quiting...
[I::main] Version: 1.2.3 (htslib 1.16)
[I::main] CMD: cellsnp-lite -s /mnt/mydata/all_samples/human_normal_prostate_FFPE/possorted_genome_bam.bam -b /mnt/mydata/all_samples/human_normal_prostate_FFPE/raw_feature_bc_matrix/barcodes.tsv.gz -O /mnt/mydata/prostate/pileup/Visium_FFPE_Human_Normal_Prostate -R /data/genome1K.phase3.SNP_AF5e2.chr1toX.hg38.vcf -p 6 --minMAF 0 --minCOUNT 2 --UMItag Auto --cellTAG CB
[I::main] end time: 2024-02-17 19:31:48
[I::main] time spent: 2 seconds.
Error in value[[3L]](cond) : Pileup failed
Calls: tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

It seemed to fail while complaining about Could not load local index file '/mnt/mydata/all_samples/human_normal_prostate_FFPE/possorted_genome_bam.bam.bai' : Invalid argument. However, possorted_genome_bam.bam.bai is present in that directory, as seen below.

$ ls -lha
total 6.1G
drwxr-xr-x. 1 docker docker  644 Jan  8 03:24 .
drwxr-xr-x. 1 docker docker  266 Jan  8 02:04 ..
drwxr-xr-x. 1 docker docker   56 Jan  7 20:55 analysis
-rw-r--r--. 1 docker docker 2.3G Jan  7 20:55 cloupe.cloupe
-rw-r--r--. 1 docker docker  11K Jan  7 20:55 .DS_Store
drwxr-xr-x. 1 docker docker   86 Jan  7 20:55 filtered_feature_bc_matrix
-rw-r--r--. 1 docker docker 8.9M Jan  7 20:55 filtered_feature_bc_matrix.h5
-rw-r--r--. 1 docker docker  917 Jan  7 20:55 metrics_summary.csv
-rw-r--r--. 1 docker docker  77M Jan  7 20:55 molecule_info.h5
-rw-r--r--. 1 docker docker 3.5G Jan  7 20:55 possorted_genome_bam.bam
-rw-r--r--. 1 docker docker  14M Jan  7 20:55 possorted_genome_bam.bam.bai
-rw-r--r--. 1 docker docker 2.0M Jan  7 20:55 probe_set.csv
drwxr-xr-x. 1 docker docker   86 Jan  7 20:55 raw_feature_bc_matrix
-rw-r--r--. 1 docker docker  14M Jan  7 20:55 raw_feature_bc_matrix.h5
drwxr-xr-x. 1 docker docker  276 Jan  7 20:55 spatial
-rw-r--r--. 1 docker docker 1.8M Jan  7 20:55 spatial_enrichment.csv
drwxr-xr-x. 1 docker docker  104 Jan  8 03:27 test
-rw-r--r--. 1 docker docker 353M Jan  7 20:55 Visium_FFPE_Human_Normal_Prostate_image.jpg
-rw-r--r--. 1 docker docker 8.0M Jan  7 20:55 web_summary.html

Any ideas why the sample data is failing?

yulijia commented 3 months ago

Hi, I think you can regenerate the BAM index to see if it works