Example #1
0
 def caculateDstatistics(self,
                         p1,
                         p2,
                         p3,
                         p4,
                         caculator,
                         currentchrID,
                         currentchrLen,
                         winwidth=None):
     win = Util.Window()
Example #2
0
    "9": 58970518
}
winsize = int(sys.argv[6])
reff = open(sys.argv[1], 'r')
try:
    refidx = pickle.load(open(sys.argv[1] + ".myfasteridx", 'rb'))
except IOError:
    Util.generateFasterRefIndex(sys.argv[1], sys.argv[1] + ".myfasteridx")
    refidx = pickle.load(open(sys.argv[1] + ".myfasteridx", 'rb'))
vcftools = "vcftools"
gapf = open(sys.argv[3], 'r')
scoredsnp = open(sys.argv[4], 'r')
scoredsnp.readline()
sitesingap = open(sys.argv[5], 'w')
if __name__ == '__main__':
    win = Util.Window()
    i = 0
    interferf = open(sys.argv[5] + ".InterferingTEMP", 'w')
    for gapregion in gapf:
        i += 1
        filledsites = []
        gaplist = re.split(r"\s+", gapregion.strip())
        if not os.path.exists(sys.argv[5] + "temp" + str(i) + ".recode.vcf"):
            os.system(
                vcftools + " --vcf " + sys.argv[2] +
                " --recode --recode-INFO-all --remove-indv DSW33216 --chr " +
                gaplist[0] + " --from-bp " + str(gaplist[1]) + " --to-bp " +
                str(gaplist[2]) + " --out " + sys.argv[5] + "temp" + str(i))
        vcfobj = VCFutil.VCF_Data(sys.argv[5] + "temp" + str(i) +
                                  ".recode.vcf")
        vcflist = vcfobj.getVcfListByChrom(gaplist[0], MQfilter=0)