cancerit / ascatNgs

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

ascat error inside of cgpwgs docker file #105

Closed leehs96 closed 3 years ago

leehs96 commented 3 years ago

i can't figure it out that error message i mapped my bam file use cgpmap and my ref files are coordinated hg38

my bam, ref are matched with prifix 'chr'

here is my whole command and error message

cgpmap command

'sample=$1

docker run \
--tmpfs /tmp \
-v /users/hslee/ref/hg38:/var/spool/ref:ro \
-v /users/data/CancerEvolution_WGS/fastq:/var/spool/data:ro \
-v /users/hslee/cancer/WGS_hg38/cgpmap_bam:/home/ubuntu  \
quay.io/wtsicgp/dockstore-cgpmap:3.1.4 \
ds-cgpmap.pl \
-r /var/spool/ref/core_ref_GRCh38_hla_decoy_ebv.tar.gz \
-i /var/spool/ref/bwa_idx_GRCh38_hla_decoy_ebv.tar.gz \
-s $1 \
-t 6 \
/var/spool/data/$1_DNA_R1.fastq.gz \
/var/spool/data/$1_DNA_R2.fastq.gz \'

cgpwgs command


`tumor=$1
normal=$2

mkdir /users/hslee/cancer/WGS_hg38/cgpwgs_results/$1 &&
chmod 777 /users/hslee/cancer/WGS_hg38/cgpwgs_results/$1

docker run \
    --tmpfs /tmp \
    -v /users/hslee/ref/hg38/CGP:/var/spool/ref:rw \
    -v /users/hslee/cancer/WGS_hg38/cgpmap_bam:/var/spool/data \
    -v /users/hslee/cancer/WGS_hg38/cgpwgs_results/$1:/home/ubuntu \
    quay.io/wtsicgp/dockstore-cgpwgs:2.1.1 \
    ds-cgpwgs.pl \
    -r /var/spool/ref \
    -a /var/spool/ref \
    -si /var/spool/ref \
    -cs /var/spool/ref \
    -qc /var/spool/ref \
    -t /var/spool/data/$1.bam \
    -tidx /var/spool/data/$1.bam.bai \
    -n /var/spool/data/$2.bam \
    -nidx /var/spool/data/$2.bam.bai \
    -c 6 \
    -e 'MT,GL%,HLA%','*_*','chrUn%' \
    -o /home/ubuntu
`

ascat error message that in Sanger_CGP_Ascat_Implement_ascat.0.err file

`+ cut -f 1-3 /home/ubuntu/WGS_ADB_LL_vs_ADB_Blood/ascat/tmpAscat/SnpGcCorrections.tsv
+ cd /home/ubuntu/WGS_ADB_LL_vs_ADB_Blood/ascat/tmpAscat/ascat
+ /usr/bin/Rscript /opt/wtsi-cgp/lib/perl5/auto/share/module/Sanger-CGP-Ascat-Implement/ascat/runASCAT.R /opt/wtsi-cgp/lib/perl5/auto/share/module/Sanger-CGP-Ascat-Implement/ascat /home/ubuntu/WGS_ADB_LL_vs_ADB_Blood/ascat/tmpAscat/SnpPositions.tsv /home/ubuntu/WGS_ADB_LL_vs_ADB_Blood/ascat/tmpAscat/SnpGcCorrections.tsv ADB_LL ADB_LL.count ADB_Blood ADB_Blood.count XX 24 /home/ubuntu/WGS_ADB_LL_vs_ADB_Blood/ascat/tmpAscat/ascat/ADB_LL.Rdata
Error in apply(corr_tot, 1, function(x) sum(abs(x * length_tot))/sum(length_tot)) : 
  dim(X) must have a positive length
Calls: ascat.GCcorrect -> apply
Execution halted
Command exited with non-zero status 1
526.36user 12.98system 8:59.45elapsed 99%CPU (0avgtext+0avgdata 2327152maxresident)k
9240inputs+439280outputs (34major+5104014minor)pagefaults 0swaps`

i am stuck with this error almost 5 hours but I have no idea. please help me .....

keiranmraine commented 3 years ago

Are you inputs tumour+normal sequencing or normal/normal, or unmatched samples?

leehs96 commented 3 years ago

thank you for reply my inputs are tumor + matched normal bam files aligned by cgpmap, used command is in my question

keiranmraine commented 3 years ago

Likely causes:

  1. Insufficient sequencing depth, >15x minimum
  2. Tumour/Normal are not actually matched (check genotype concordance)
  3. High normal in tumour (or tumour in normal) contamination
leehs96 commented 3 years ago
  1. BAM files that used in analysis are 30x depth
  2. already done swap test for each samples
  3. not LCM sectioned... so the tumor purity of tumor samples are quite bad

SO.. could low tumor purity be problem?

keiranmraine commented 3 years ago

Low tumour purity would be a candidate for this error.

leehs96 commented 3 years ago

thanks i'll try with high tumor purity sample sooner or later.