vibansal / HapCUT2

software tools for haplotype assembly from sequence data
BSD 2-Clause "Simplified" License
207 stars 36 forks source link

core segemntaion fault #89

Closed dhwani2410 closed 4 years ago

dhwani2410 commented 4 years ago

I have tried running extractHAIRS with the same file in two different system. It works well in one system and have segmentation fault in others. I have observed that once the system throws segmentation fault , the next file also don't work.

extractHAIRS --bam /home/mmlab33/Documents/dhwani/HapCUT2/BAM_file/$i_vqsr.bam --VCF /home/mmlab33/Documents/dhwani/HapCUT2/VCF_files/haplotype_caller/$i_haplotype_4.g.vcf --out home/mmlab33/Documents/dhwani/HapCUT2/Results/GATK/$i_gatk4_temp_haplotyper.out

Extracting haplotype informative reads from bamfiles /home/mmlab33/Documents/dhwani/HapCUT2/BAM_file/DRR015476_vqsr.bam minQV 13 minMQ 20 maxIS 1000

VCF file /home/mmlab33/Documents/dhwani/HapCUT2/VCF_files/haplotype_caller/DRR015476_haplotype_4.g.vcf has 178 variants adding chrom 6 to index vcffile /home/mmlab33/Documents/dhwani/HapCUT2/VCF_files/haplotype_caller/DRR015476_haplotype_4.g.vcf chromosomes 1 hetvariants 31 178 reading sorted bamfile /home/mmlab33/Documents/dhwani/HapCUT2/BAM_file/DRR015476_vqsr.bam processing reads mapped to chrom "6" Segmentation fault (core dumped)

What can be wrong while running this code?

vibansal commented 4 years ago

Sorry for the delay in replying. Can you share what version of the code you are using and also a sample dataset to reproduce the error? Thanks.

dhwani2410 commented 4 years ago

I am able to run extractHAIR command :-

${extractHAIRS} --bam ${base_path}/base_recalib/$i_vqsr.bam --VCF ${base_path}/mpile_up_vcf/$i_mpile.vcf --out ${base_path}/Phasing/HapCUT2/hapcut2_gatk4/mpileup/$i_mpileup_temp_haplotyper

Extracting haplotype informative reads from bamfiles /home/dhwani/Documents/base_recalib/DRR015476_vqsr.bam minQV 13 minMQ 20 maxIS 1000

VCF file /home/dhwani/Documents/mpile_up_vcf/DRR015476_mpile.vcf has 204 variants adding chrom 6 to index vcffile /home/dhwani/Documents/mpile_up_vcf/DRR015476_mpile.vcf chromosomes 1 hetvariants 55 204 reading sorted bamfile /home/dhwani/Documents/base_recalib/DRR015476_vqsr.bam processing reads mapped to chrom "6" final cleanup of fragment list: 85001 current chrom (null) 0 prev 0

But there is segmentation dump when i run the second command ${HAPCUT2} --fragments ${base_path}/Phasing/HapCUT2/hapcut2_gatk4/mpileup/$i_mpileup_temp_haplotyper --VCF ${base_path}/mpile_up_vcf/$i_mpile.vcf --output ${base_path}/Phasing/HapCUT2/hapcut2_gatk4/hapcut2_gatk4/mpileup/$i_mpileup_haplotyper.out --outvcf 1

[2020:02:25 18:08:50] fragment file: /home/dhwani/DocumentsPhasing/HapCUT2/hapcut2_gatk4/mpileup/DRR015476_mpileup_temp_haplotyper [2020:02:25 18:08:50] variantfile (VCF format):/home/dhwani/Documents/mpile_up_vcf/DRR015476_mpile.vcf [2020:02:25 18:08:50] haplotypes will be output to file: /home/dhwani/Documents/Phasing/HapCUT2/hapcut2_gatk4/hapcut2_gatk4/mpileup/DRR015476_mpileup_haplotyper.out [2020:02:25 18:08:50] solution convergence cutoff: 5 [2020:02:25 18:08:50] QVoffset: 33

[2020:02:25 18:08:50] Calling Max-Likelihood-Cut based haplotype assembly algorithm [2020:02:25 18:08:50] read 204 variants from /home/dhwani/Documents/mpile_up_vcf/DRR015476_mpile.vcf file Number of non-trivial connected components 2 max-Degree 9215 connected variants 56 coverage-per-variant 3276.785714 [2020:02:25 18:08:50] fragments 38012 snps 204 component(blocks) 2 [2020:02:25 18:08:50] processed fragment file and variant file: fragments 38012 variants 204 [2020:02:25 18:09:11] OUTPUTTING PRUNED HAPLOTYPE ASSEMBLY TO FILE /home/dhwani/DocumentsPhasing/HapCUT2/hapcut2_gatk4/hapcut2_gatk4/mpileup/DRR015476_mpileup_haplotyper.out Segmentation fault (core dumped)

Please let me know if any other details are required

vibansal commented 4 years ago

Thanks. I would recommend trying a couple of things:

  1. running without the outvcf option
  2. running using the latest code in branch 'merging_021820'
dhwani2410 commented 4 years ago

Thanks for your response. I tried both of them, however none of them worked. Can i share VCF and BAM files, if that would help to figure out the error.

vibansal commented 4 years ago

Yes, we can take a look at the input files. Please share the data or a link to a shared folder via email.