I'm running python code relatedness_v1.py
which takes as input an IBD file and produces a relatedness matrix. When I run the code, I get an IndexError that I don't understand how to fix. To get the relatedness_v1.py code, visit this link http://faculty.washington.edu/sguy/ibd_relatedness.html. (I also needed to add () around the print parameter in the code for 3 lines.)
The command format is as follows:
zcat myibdfile.ibd.gz | python relatedness_v1.py mapfile cmthresh [vcfhead=myfile.vcf[.gz]] [kinship] [lower] [nofill] > outfile
Parameter cmthresh
is the minimum length in cMs to be included in the relatedness matrix results. "Typical choices for this parameter would be 0 (no filtering), or 10 (focus on recent relatives)." The default for the [kinship]
optional parameter is relatedness
which is what I want.
I ran the code on the results of just chromosome 1 as follows:
zcat PhasedB4chrom1.ibd.gz | python relatedness_v1.py plink.chr1.GRCh37.map 2 lower nofill > PhasedB4chrom1.relatedness
I get the following error:
Traceback (most recent call last):
File "relatedness_v1.py", line 88, in <module>
length = float(bits[8])
IndexError: list index out of range
I tried increasing the bits but I really don't know what this error is referring to or what element it may be telling me that is missing. I get the same error when I use the full IBD file and complete map (as in, not reducing it to just chromosome 1).
I'm using Ubuntu 18.04.3 LTS.
it simply means the list 'bits' do not has the 9th element.