yekaizhou / duet

SNP-Assisted SV Calling and Phasing Using ONT
BSD 3-Clause "New" or "Revised" License
23 stars 2 forks source link

SNP phasing not running #6

Closed fmobegi closed 1 year ago

fmobegi commented 1 year ago

There seems to be a Syntax error in snp_phasing when running duet on a single chromosome. The command am running: duet -t 8 -a -b sniffles 01_minimap2_mapping/sample1.bam /data/references/human_references/chr6_hg38.fasta 02_variants/duet_sniffles/sample1

The error:

15507/15507 alignments processed (100%, 7147/s); 1/1 tasks done; parallel 0/8; 0 SVs.
Took 2.17s.

Done.
Wrote 0 called SVs to 02_variants/duet_sniffles/sample1/sv_calling/variants.vcf (single-sample, sorted)
13:37:21 [INFO] ************************* SV CALLING COMPLETED IN 2.324s *************************
13:37:21 [INFO] ************************* SNP PHASING STARTED *************************
mkdir: cannot create directory ‘02_variants/duet_sniffles/sample1/snp_phasing/’: File exists
02_variants/duet_sniffles/sample1/snp_phasing/parallel_wh.sh: 1: Syntax error: "(" unexpected
13:37:21 [INFO] ************************* SNP PHASING COMPLETED IN 0.021s *************************
13:37:21 [INFO] ************************* SV PHASING STARTED *************************
13:37:21 [INFO] create output .vcf file
13:37:21 [INFO] extract SNP signatures
13:37:22 [INFO]   signatures extracted from chr6
13:37:22 [INFO] extract SV signatures
13:37:22 [INFO]   no signature from chr6
13:37:22 [INFO] integrate read weight information
13:37:22 [INFO] calculate read weight statistics
13:37:22 [INFO] predict SV haplotypes in the callset
13:37:22 [INFO] write phased callset into .vcf file
13:37:22 [INFO] ************************* SV PHASING COMPLETED IN 0.79s *************************
13:37:22 [INFO] ************************* DUET FINISHED IN 27.737s *************************
13:37:22 [INFO] OUTPUT .VCF FILE AT 02_variants/duet_sniffles/sample1/phased_sv.vcf

Running bash parallel_wh.sh completes without any issues.

yekaizhou commented 1 year ago

Hi,

It seems to me that there are no original SV signal called by Sniffles, therefore there are no signature that Duet can process of. Could you please try another base SV caller for comparison, and set the --sv_min_size to be smaller e.g. 35?

Regards, Yekai

fmobegi commented 1 year ago

run_duet.log

The program probably runs to completion but the parallel_wh.sh: 1: Syntax error: "(" unexpected error shows up on every sample and on every sv caller.

Done.
Wrote 1 called SVs to 02_variants/duet_sniffles/19QB002386_barcode05/sv_calling/variants.vcf (single-sample, sorted)
13:57:12 [INFO] ************************* SV CALLING COMPLETED IN 1.039s *************************
13:57:12 [INFO] ************************* SNP PHASING STARTED *************************
02_variants/duet_sniffles/19QB002386_barcode05/snp_phasing/parallel_wh.sh: 1: Syntax error: "(" unexpected
13:57:12 [INFO] ************************* SNP PHASING COMPLETED IN 0.022s *************************
13:57:12 [INFO] ************************* SV PHASING STARTED *************************
13:57:12 [INFO] create output .vcf file
13:57:12 [INFO] extract SNP signatures
13:57:12 [INFO] extract SV signatures
13:57:12 [INFO]   signatures extracted from chr6
13:57:12 [INFO] integrate read weight information
13:57:12 [INFO] calculate read weight statistics
13:57:12 [INFO] predict SV haplotypes in the callset
13:57:12 [INFO] write phased callset into .vcf file
13:57:12 [INFO] ************************* SV PHASING COMPLETED IN 0.017s *************************
13:57:12 [INFO] ************************* DUET FINISHED IN 22.341s *************************
13:57:12 [INFO] OUTPUT .VCF FILE AT 02_variants/duet_sniffles/19QB002386_barcode05/phased_sv.vcf
13:57:12 [INFO] ************************* DUET STARTED *************************
13:57:12 [INFO] ************************* SNP CALLING STARTED *************************
yekaizhou commented 1 year ago

Could you please share the parallel_wh.sh to see if there are ways to fix?

fmobegi commented 1 year ago

parallel_wh.sh.txt

yekaizhou commented 1 year ago

Thanks for pointing this out. It is because of a inconsistency between ./parallel_wh.sh and bash ./parallel_wh.sh in different operation systems.

We will fix this in our next release. For now, you may choose to download a local copy and change the 32th line of duet/src/duet/snp_phasing.py from os.system(snp_phasing_home + 'parallel_wh.sh') to os.system('bash ' + snp_phasing_home + 'parallel_wh.sh'), which will work fine.

fmobegi commented 1 year ago

WIll try that.. Thanks