I had problems extracting SNPs from LD files. For every index SNP I was getting "rs##### was not found in ./LD/chr5.EUR.tsv.gz. Including with no LD info." Had a look at the snpLdTabix function. Defining the start (st) and end and end (en) variables as integers seems to solve the issue for me.
def snpLdTabix(snp,chrom,bp,tabixDir,window,r2min,ldInfo):
"""
Retrieve LD info from the tabix file for a single SNP.
"""
file = os.path.join(tabixDir,'{}.EUR.tsv.gz')
tabixFile = file.format(chrom)
ldInfo.setdefault(snp,{})
st = bp - window ## int(bp - window) ##
if st < 0:
st = 0
en = bp + window ## int(bp - window) ##
I had problems extracting SNPs from LD files. For every index SNP I was getting "rs##### was not found in ./LD/chr5.EUR.tsv.gz. Including with no LD info." Had a look at the snpLdTabix function. Defining the start (st) and end and end (en) variables as integers seems to solve the issue for me.