browning-lab / hap-ibd

The hap-ibd program detects identity-by-descent segments in phased genotype data.
42 stars 8 forks source link

No IBD segments were detected #13

Closed leon945945 closed 4 months ago

leon945945 commented 4 months ago

Hi, I used the following command to detect IBD segments of two samples, but no IBD segments were detected, I have no idea how to adjust the parameters or vcf file content, could you please give me some suggestions? Thank you.

java -Xmx4g -jar ~/software/hap-ibd.jar gt=sample1_sample2.phased.vcf out=sample1_sample2.hap-ibd map=sample1.map

Copyright (C) 2019-2023 Brian L. Browning Enter "java -jar hap-ibd.jar" to print a list of command line arguments

Program : hap-ibd.jar [ version 1.0, 15Jun23.92f ] Start Time : 07:27 PM CST on 22 Jun 2024 Max Memory : 4096 MB

Parameters gt : sample1_sample2.phased.vcf map : sample1.map out : sample1_sample2.hap-ibd min-seed : 2.0 max-gap : 1000 min-extend : 1.0 min-output : 2.0 min-markers : 100 min-mac : 2 nthreads : 48

Statistics samples : 2 markers : 4258765 IBD segments : 0 IBD segs/sample : 0.0 HBD segments : 0 HBD segs/sample : 0.000

Wallclock Time: : 32 seconds End Time : 07:28 PM CST on 22 Jun 2024

browning-lab commented 4 months ago

If you know that the two individuals are closely related, the reason for finding no IBD is normally genotype errors and haplotype phase errors in the input data. We normally use the hap-ibd min-mac parameter to apply a minor allele frequency filters (e.g. excluding variants with < 0.05 MAF), but that is not possible in this case because the input data has only two samples. The hap-ibd program was not designed for analyzing a small data set with only two individuals. If you want to detect IBD segments with hap-ibd, you will need to exclude low frequency markers, and your input data will need to have very accurate haplotypes.

leon945945 commented 4 months ago

Thanks very much for your reply. The accurate genotype could be filtered with quality parameters in vcf file, but how to get the accurate haplotypes, could you please give some suggestions. At present, I took use of whatshap to do reads-based genotype phase, I am not sure this method could fulfill the demand for IBD detection. Thanks again.

browning-lab commented 4 months ago

I haven't used Whatshap, but I would not expect that it will provide high enough accuracy for IBD segment detection, unless your data is high-quality, long-read sequence data.

What you are trying to do is non-trivial. If you are a researcher, there may be someone at your institution who can help you extract IBD segments from your data.

On Sun, Jun 23, 2024 at 7:40 AM leon945945 @.***> wrote:

Thanks very much for your reply. The accurate genotype could be filtered with quality parameters in vcf file, but how to get the accurate haplotypes, could you please give some suggestions. At present, I took use of whatshap to do reads-based genotype phase, I am not sure this method could fulfill the demand for IBD detection. Thanks again.

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/browning-lab/hap-ibd/issues/13*issuecomment-2185016475__;Iw!!K-Hz7m0Vt54!k5tDjSXyVZHYELrKZwo00cOq0d_uOhVsQ6GpRFTUzAdxGh5as0GhCkqMr8v4l7--ZOZnvS9eOlem5SFYboEunkA20sHjczo$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AKDWBPHUSVF3DKWPFPHIA5LZI3M67AVCNFSM6AAAAABJXCUOMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBVGAYTMNBXGU__;!!K-Hz7m0Vt54!k5tDjSXyVZHYELrKZwo00cOq0d_uOhVsQ6GpRFTUzAdxGh5as0GhCkqMr8v4l7--ZOZnvS9eOlem5SFYboEunkA2hY3xR9Y$ . You are receiving this because you modified the open/close state.Message ID: @.***>

leon945945 commented 4 months ago

Yes, I used HiFi data to do genotype calling and phasing, the phase strategy is reads-based phasing. Sorry to bother you, could you please give me some instructions or some ideas how to extract IBD segments of two individuals. I want to detect recombination events of these two individuals from IBD segments. It would solve my problem and I very appreciate it.

browning-lab commented 4 months ago

Leon, There is not a simple solution to this problem.

Can you give me some background? What is the expected relationship between the individuals? What is the length of the phased segments (e.g. mean length or N50 length)? Are you a researcher at a research institution? a company? a hospital?

You can send this background information to my work email address. There is a link to my web page (which has my work email address) on the hap-ibd GitHub page.

Thanks,

Brian

On Tue, Jun 25, 2024 at 8:02 PM leon945945 @.***> wrote:

Yes, I used HiFi data to do genotype calling and phasing, the phase strategy is reads-based phasing. Sorry to bother you, could you please give me some instructions or some ideas how to extract IBD segments of two individuals. It would solve my problem and I very appreciate it.

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/browning-lab/hap-ibd/issues/13*issuecomment-2190454173__;Iw!!K-Hz7m0Vt54!i-JPjkVmRboHsPnBkchEmwaluPxzx6HsvAHrA2YOGAfCkj6OIc5bmnYSCx86MxDjncAoqJuvg2uDsghahIMt7BRnzRMtU5I$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AKDWBPGZBNZ2W6FONYNKPNDZJIVM7AVCNFSM6AAAAABJXCUOMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJQGQ2TIMJXGM__;!!K-Hz7m0Vt54!i-JPjkVmRboHsPnBkchEmwaluPxzx6HsvAHrA2YOGAfCkj6OIc5bmnYSCx86MxDjncAoqJuvg2uDsghahIMt7BRn2p0dLJU$ . You are receiving this because you modified the open/close state.Message ID: @.***>