VanLoo-lab / ascat

ASCAT R package
https://www.mdanderson.org/research/departments-labs-institutes/labs/van-loo-laboratory/resources.html#ASCAT
162 stars 85 forks source link

Error in ascat.prepareHTS - alleleCounter version 4.3.0 #152

Closed teodorabu closed 1 year ago

teodorabu commented 1 year ago

Hi, I have been using Ascat for a while now on multiple matched normal-tumor samples, but somehow with new data that I need to analyze I am getting the following error message when running the fuction ascat.prepareHTS:

ascat.prepareHTS( tumourseqfile=paste0(test_folder, args[1]), normalseqfile=paste0(test_folder,args[3]), tumourname = paste0(tumor_accession,"_tumour"), normalname = paste0(tumor_accession, "_normal"), allelecounter_exe = "alleleCounter", alleles.prefix= ref_alleles, loci.prefix = ref_loci, tumourLogR_file = paste0(tumor_accession, "_tumour.LogR.tsv"), tumourBAF_file = paste0(tumor_accession, "_tumour.BAF.tsv"), normalLogR_file = paste0(normalaccession,"",tumor_accession, "_normal.LogR.tsv"), normalBAF_file = paste0(normalaccession,"", tumor_accession, "_normal.BAF.tsv"), gender = args[8], genomeVersion = args[9], chrom_names = c(1:22), nthreads= args[10], min_base_qual = 20, min_map_qual = 35, minCounts=10)

Error message: Reading locis Done reading locis Multi pos start: [E::sam_itr_next] Null iterator [ERROR] (src/bam_access.c: bam_access_get_multi_position_base_counts:379 errno: No such file or directory) Error detected (-2) when trying to iterate through region. [ERROR] (./src/alleleCounter.c: main:432 errno: None) Error scanning through bam file for loci list with dense snps.

The loci and allele file are provided with the global path. I ran from the commandline "alleleCounter -l loci_file_hg19_mod.txt -b DRR003_BL.bam -o drr03_test.out --dense-snps -m 20 -q 35 -d" and I got the expected output, from which I attach a few lines:

CHR POS Count_A Count_C Count_G Count_T Good_depth

1 751343 0 0 0 0 0 1 753425 0 0 0 0 0 1 755940 0 0 0 0 0 1 756257 0 0 0 0 0 1 756268 0 0 0 0 0 1 756378 0 0 0 0 0 1 756380 0 0 0 0 0 1 762601 0 0 0 0 0 1 764191 0 0 0 0 0 1 768253 0 0 0 0 0 1 768448 0 0 0 0 0 1 772755 0 0 0 0 0 1 775659 0 0 0 0 0

Could you maybe help me solve this issue? Cheers, Teodora

tlesluyes commented 1 year ago

Hi @teodorabu,

This seems linked to an issue with alleleCounter rather than an issue with ASCAT. Did you have sufficient memory when running ascat.prepareHTS? It'll parallelise the alleleCounter step (on threads per chromosome) and use nthreads, maybe it ran out of memory. Or you can try setting a lower number of threads.

It's a bit weird that you only get 0s in the output, do you have other values and/or is "1" the real chromosome name or is it "chr1"?

Cheers,

Tom.

teodorabu commented 1 year ago

Hi, the issue was with the index files. It works now, thanks!

GetOutofBug commented 1 month ago

Hi, I have been using Ascat for a while now on multiple matched normal-tumor samples, but somehow with new data that I need to analyze I am getting the following error message when running the fuction ascat.prepareHTS:

ascat.prepareHTS( tumourseqfile=paste0(test_folder, args[1]), normalseqfile=paste0(test_folder,args[3]), tumourname = paste0(tumor_accession,"_tumour"), normalname = paste0(tumor_accession, "_normal"), allelecounter_exe = "alleleCounter", alleles.prefix= ref_alleles, loci.prefix = ref_loci, tumourLogR_file = paste0(tumor_accession, "_tumour.LogR.tsv"), tumourBAF_file = paste0(tumor_accession, "_tumour.BAF.tsv"), normalLogR_file = paste0(normalaccession,"",tumor_accession, "_normal.LogR.tsv"), normalBAF_file = paste0(normalaccession,"", tumor_accession, "_normal.BAF.tsv"), gender = args[8], genomeVersion = args[9], chrom_names = c(1:22), nthreads= args[10], min_base_qual = 20, min_map_qual = 35, minCounts=10)

Error message: Reading locis Done reading locis Multi pos start: [E::sam_itr_next] Null iterator [ERROR] (src/bam_access.c: bam_access_get_multi_position_base_counts:379 errno: No such file or directory) Error detected (-2) when trying to iterate through region. [ERROR] (./src/alleleCounter.c: main:432 errno: None) Error scanning through bam file for loci list with dense snps.

The loci and allele file are provided with the global path. I ran from the commandline "alleleCounter -l loci_file_hg19_mod.txt -b DRR003_BL.bam -o drr03_test.out --dense-snps -m 20 -q 35 -d" and I got the expected output, from which I attach a few lines: #CHR POS Count_A Count_C Count_G Count_T Good_depth 1 751343 0 0 0 0 0 1 753425 0 0 0 0 0 1 755940 0 0 0 0 0 1 756257 0 0 0 0 0 1 756268 0 0 0 0 0 1 756378 0 0 0 0 0 1 756380 0 0 0 0 0 1 762601 0 0 0 0 0 1 764191 0 0 0 0 0 1 768253 0 0 0 0 0 1 768448 0 0 0 0 0 1 772755 0 0 0 0 0 1 775659 0 0 0 0 0

Could you maybe help me solve this issue? Cheers, Teodora

Hello, I was wondering how you handle column names for loci files? Should it correspond to something in the bam file?In my file, there are only two columns