immunogenomics / goshifter

GoShifter
http://www.broadinstitute.org/mpg/goshifter/
Other
11 stars 8 forks source link

Tabix LD Problem - need to declare as integer? #1

Closed mbyvcm closed 7 years ago

mbyvcm commented 8 years ago

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) ##
harmjanwestra commented 7 years ago

Thanks for the heads-up. This should now be fixed (albeit a bit late, sorry).