kharchenkolab / numbat

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

[W::bam_hdr_read] bgzf_check_EOF: No such file or directory #76

Open yintz opened 1 year ago

yintz commented 1 year ago

Hi, thank you for the previous one. now I fixed it.

I am using 10x single cell data and also spatial data to run numbat.

but it shows like this.do you know what should I do?

root@aba37e368b0d:/numbat# Rscript /numbat/inst/bin/pileup_and_phase.R \ --label 'sample1' \ --samples sample_alignments \ --barcodes /mnt/mydata/Gexvdj12/barcodes.tsv \ --bams /mnt/mydata/Gexvdj12/sample_alignments.bam \ --outdir /mnt/mydata/Gexvdj12/ \ --gmap /mnt/mydata/genetic_map_hg38_withX.txt.gz \ --snpvcf /mnt/mydata/genome1K.phase3.SNP_AF5e2.chr1toX.hg38.vcf \ --paneldir /mnt/mydata/1000G_hg38 \ --ncores 5

Using genome version: hg38 Running pileup [I::main] start time: 2022-12-07 15:24:23 [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/Gexvdj12//pileup/sample_alignments is_out_zip = 0, is_genotype = 0 is_target = 0, num_of_pos = 0 num_of_barcodes = 2895, num_of_samples = 0 refseq file = (null) 0 chroms: cell-tag = CB, umi-tag = UB nthreads = 5, tp_max_open = 1048576 mthreads = 5, 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 1073 candidate variants ... [I::main] mode 1a: fetch given SNPs in 2895 single cells. [W::bam_hdr_read] bgzf_check_EOF: No such file or directory [W::hts_idx_load3] The index file is older than the data file: /mnt/mydata/Gexvdj12/sample_alignments.bam.bai [E::bgzf_read_block] Failed to read BGZF block data at offset 3083 expected 10463 bytes; hread returned 1023 [E::bgzf_read] Read block operation failed with error 4 after 0 of 4 bytes [E::csp_fetch_core] failed to pileup snp (1:11008) [E::main] running mode 1a failed. [E::main] Quiting... [I::main] Version: 1.2.2 (htslib 1.16) [I::main] CMD: cellsnp-lite -s /mnt/mydata/Gexvdj12/sample_alignments.bam -b /mnt/mydata/Gexvdj12/barcodes.tsv -O /mnt/mydata/Gexvdj12//pileup/sample_alignments -R /mnt/mydata/genome1K.phase3.SNP_AF5e2.chr1toX.hg38.vcf -p 5 --minMAF 0 --minCOUNT 2 --UMItag Auto --cellTAG CB [I::main] end time: 2022-12-07 15:24:23 [I::main] time spent: 0 seconds. Error in value[3L] : Pileup failed Calls: tryCatch -> tryCatchList -> tryCatchOne -> Execution halted root@aba37e368b0d:/numbat#

evanbiederstedt commented 1 year ago

@yintz yintz

The error

[W::bam_hdr_read] bgzf_check_EOF

usually means the BAM file wasn't written correctly, e.g. https://www.biostars.org/p/406660/

It's impossible for us to debug given what you've shared so far