cancerit / ascatNgs

Somatic copy number analysis using WGS paired end wholegenome sequencing
http://cancerit.github.io/ascatNgs/
GNU Affero General Public License v3.0
68 stars 17 forks source link

ascat error #112

Closed sotaro-kanematsu closed 2 years ago

sotaro-kanematsu commented 2 years ago

I am trying to run ascat.pl with GRCh38 reference, however, I have an error as below. What is wrong with my input bam or reference?

(Why does ascat use GRCh37d5 even when I set the reference GRCh38?)

[root@localhost input]# docker run --rm -ti -v /run/media/skanematsu/0c327ecf-84ad-4751-96fd-e288692cf6b2/ascatngs_work/input:/data/input:ro -v /run/media/skanematsu/0c327ecf-84ad-4751-96fd-e288692cf6b2/ascatngs_work/ref:/data/ref:ro -v /run/media/skanematsu/0c327ecf-84ad-4751-96fd-e288692cf6b2/ascatngs_work/output1:/data/output1:rw quay.io/wtsicgp/ascatngs:4.5.0 ascat.pl -r /data/ref/GRCh38.d1.vd1.fa -t /data/input/HCC1395BL__HCC1395_tumor.bam -n /data/input/HCC1395BL__HCC1395.bam -o /data/output1 -snp_gc /data/input/SnpGCcorrections_GRCh38.tsv -protocol WGS -g L -cpu 4
Executing: /opt/wtsi-cgp/bin/ascat.pl -r /data/ref/GRCh38.d1.vd1.fa -t /data/input/HCC1395BL__HCC1395_tumor.bam -n /data/input/HCC1395BL__HCC1395.bam -o /data/output1 -snp_gc /data/input/SnpGCcorrections_GRCh38.tsv -protocol WGS -g L -cpu 4
Reading locis
Done reading locis
[E::sam_itr_next] Null iterator
[ERROR] (src/bam_access.c: bam_access_get_position_base_counts:454 errno: No such file or directory) Error detected (-2) when trying to iterate through region.
[ERROR] (./src/alleleCounter.c: main:448 errno: None) Error retrieving stats from bam file for position :2934912
free(): double free detected in tcache 2
No such file or directory at /opt/wtsi-cgp/lib/perl5/Sanger/CGP/AlleleCount/Genotype.pm line 100.
"/opt/wtsi-cgp/bin/alleleCounter.pl -o /data/output1/tmpAscat/0.normal_gender.tsv -b /data/input/HCC1395BL__HCC1395.bam -l /opt/wtsi-cgp/lib/perl5/auto/share/module/Sanger-CGP-Ascat-Implement/gender/GRCh37d5_Y.loci -r /data/ref/GRCh38.d1.vd1.fa -g -m 20" unexpectedly returned exit value 2 at /opt/wtsi-cgp/bin/ascat.pl line 250.
 at /opt/wtsi-cgp/lib/perl5/Sanger/CGP/Ascat/Implement.pm line 479
keiranmraine commented 2 years ago

You have not specified the GRCh38 gender (sex) loci file but have requested that ASCAT determined the M/F state of the input data:

https://github.com/cancerit/ascatNgs/blob/0d83b28d3837d1d001c1dceefcd20b71aa351225/perl/bin/ascat.pl#L291-L293

as you have specified -g L you need to define the correct set of SNPs for GRCh38 (as it defaults to a bundled set for GRCh37):

https://github.com/cancerit/ascatNgs/blob/0d83b28d3837d1d001c1dceefcd20b71aa351225/perl/bin/ascat.pl#L310-L311

(whoops a typo in there)

You can download the appropriate bundle of files here:

$ wget ftp://ftp.sanger.ac.uk/pub/cancer/dockstore/human/GRCh38_hla_decoy_ebv/qcGenotype_GRCh38_hla_decoy_ebv.tar.gz

The file you want is qcGenotype_GRCh38_hla_decoy_ebv/gender.tsv