Skip to content

Commit

Permalink
Merge pull request #73 from CBIIT/LDlink_3.8.1
Browse files Browse the repository at this point in the history
L dlink 3.8.1
  • Loading branch information
kvnjng authored Nov 7, 2019
2 parents a4eebf7 + 75ca92b commit e202e48
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 31 deletions.
14 changes: 7 additions & 7 deletions LDlink/LDassoc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import yaml
import csv
import json
Expand Down Expand Up @@ -552,13 +552,13 @@ def get_coords_gene(gene_raw):
print("Create LDassoc_sub subprocesses")
for i in range(threads):
if i==min(range(threads)) and i==max(range(threads)):
command="python LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords)+" "+request+" "+str(i)
command="python3 LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords)+" "+request+" "+str(i)
elif i==min(range(threads)):
command="python LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[:block])+" "+request+" "+str(i)
command="python3 LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[:block])+" "+request+" "+str(i)
elif i==max(range(threads)):
command="python LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[(block*i)+1:])+" "+request+" "+str(i)
command="python3 LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[(block*i)+1:])+" "+request+" "+str(i)
else:
command="python LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[(block*i)+1:block*(i+1)])+" "+request+" "+str(i)
command="python3 LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[(block*i)+1:block*(i+1)])+" "+request+" "+str(i)
commands.append(command)


Expand Down Expand Up @@ -1122,7 +1122,7 @@ def get_output(process):
if web:
# Open thread for high quality image exports
print("Open thread for high quality image exports.")
command = "python LDassoc_plot_sub.py " + tmp_dir + 'assoc_args' + request + ".json" + " " + file + " " + region + " " + pop + " " + request + " " + myargsName + " " + myargsOrigin
command = "python3 LDassoc_plot_sub.py " + tmp_dir + 'assoc_args' + request + ".json" + " " + file + " " + region + " " + pop + " " + request + " " + myargsName + " " + myargsOrigin
subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)


Expand Down Expand Up @@ -1264,7 +1264,7 @@ def get_output(process):
if web:
# Open thread for high quality image exports
print("Open thread for high quality image exports.")
command = "python LDassoc_plot_sub.py " + tmp_dir + 'assoc_args' + request + ".json" + " " + file + " " + region + " " + pop + " " + request + " " + myargsName + " " + myargsOrigin
command = "python3 LDassoc_plot_sub.py " + tmp_dir + 'assoc_args' + request + ".json" + " " + file + " " + region + " " + pop + " " + request + " " + myargsName + " " + myargsOrigin
subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)

###########################
Expand Down
10 changes: 5 additions & 5 deletions LDlink/LDassoc_plot_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,17 +386,17 @@ def get_coords_gene(gene_raw):
else:
threads=4

block=len(assoc_coords)/threads
block=len(assoc_coords)//threads
commands=[]
for i in range(threads):
if i==min(range(threads)) and i==max(range(threads)):
command="python LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords)+" "+request+" "+str(i)
command="python3 LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords)+" "+request+" "+str(i)
elif i==min(range(threads)):
command="python LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[:block])+" "+request+" "+str(i)
command="python3 LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[:block])+" "+request+" "+str(i)
elif i==max(range(threads)):
command="python LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[(block*i)+1:])+" "+request+" "+str(i)
command="python3 LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[(block*i)+1:])+" "+request+" "+str(i)
else:
command="python LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[(block*i)+1:block*(i+1)])+" "+request+" "+str(i)
command="python3 LDassoc_sub.py "+snp+" "+chromosome+" "+"_".join(assoc_coords[(block*i)+1:block*(i+1)])+" "+request+" "+str(i)
commands.append(command)


Expand Down
2 changes: 1 addition & 1 deletion LDlink/LDhap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import yaml
import json
import math
Expand Down
4 changes: 2 additions & 2 deletions LDlink/LDmatrix.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import yaml
import json
import math
Expand Down Expand Up @@ -907,7 +907,7 @@ def set_alleles(a1, a2):
# Generate high quality images only if accessed via web instance
if web:
# Open thread for high quality image exports
command = "python LDmatrix_plot_sub.py " + \
command = "python3 LDmatrix_plot_sub.py " + \
snplst + " " + pop + " " + request + " " + r2_d
subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)

Expand Down
2 changes: 1 addition & 1 deletion LDlink/LDpair.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import yaml
import json
import math
Expand Down
2 changes: 1 addition & 1 deletion LDlink/LDpop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import yaml
import json
import math
Expand Down
12 changes: 6 additions & 6 deletions LDlink/LDproxy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import yaml
import csv
import json
Expand Down Expand Up @@ -249,18 +249,18 @@ def replace_coord_rsid(snp):
commands = []
for i in range(threads):
if i == min(range(threads)) and i == max(range(threads)):
command = "python LDproxy_sub.py " + str(web) + " " + snp + " " + \
command = "python3 LDproxy_sub.py " + str(web) + " " + snp + " " + \
snp_coord['chromosome'] + " " + str(coord1) + " " + \
str(coord2) + " " + request + " " + str(i)
elif i == min(range(threads)):
command = "python LDproxy_sub.py " + str(web) + " " + snp + " " + \
command = "python3 LDproxy_sub.py " + str(web) + " " + snp + " " + \
snp_coord['chromosome'] + " " + str(coord1) + " " + \
str(coord1 + block) + " " + request + " " + str(i)
elif i == max(range(threads)):
command = "python LDproxy_sub.py " + str(web) + " " + snp + " " + snp_coord['chromosome'] + " " + str(
command = "python3 LDproxy_sub.py " + str(web) + " " + snp + " " + snp_coord['chromosome'] + " " + str(
coord1 + (block * i) + 1) + " " + str(coord2) + " " + request + " " + str(i)
else:
command = "python LDproxy_sub.py " + str(web) + " " + snp + " " + snp_coord['chromosome'] + " " + str(coord1 + (
command = "python3 LDproxy_sub.py " + str(web) + " " + snp + " " + snp_coord['chromosome'] + " " + str(coord1 + (
block * i) + 1) + " " + str(coord1 + (block * (i + 1))) + " " + request + " " + str(i)
commands.append(command)

Expand Down Expand Up @@ -818,7 +818,7 @@ def get_output(process):
# Generate high quality images only if accessed via web instance
if web:
# Open thread for high quality image exports
command = "python LDproxy_plot_sub.py " + snp + " " + pop + " " + request + " " + r2_d
command = "python3 LDproxy_plot_sub.py " + snp + " " + pop + " " + request + " " + r2_d
subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)

###########################
Expand Down
8 changes: 4 additions & 4 deletions LDlink/LDproxy_plot_sub.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,18 +179,18 @@ def replace_coord_rsid(db, snp):
commands = []
for i in range(threads):
if i == min(range(threads)) and i == max(range(threads)):
command = "python LDproxy_sub.py " + "True " + snp + " " + \
command = "python3 LDproxy_sub.py " + "True " + snp + " " + \
snp_coord['chromosome'] + " " + str(coord1) + " " + \
str(coord2) + " " + request + " " + str(i)
elif i == min(range(threads)):
command = "python LDproxy_sub.py " + "True " + snp + " " + \
command = "python3 LDproxy_sub.py " + "True " + snp + " " + \
snp_coord['chromosome'] + " " + str(coord1) + " " + \
str(coord1 + block) + " " + request + " " + str(i)
elif i == max(range(threads)):
command = "python LDproxy_sub.py " + "True " + snp + " " + snp_coord['chromosome'] + " " + str(
command = "python3 LDproxy_sub.py " + "True " + snp + " " + snp_coord['chromosome'] + " " + str(
coord1 + (block * i) + 1) + " " + str(coord2) + " " + request + " " + str(i)
else:
command = "python LDproxy_sub.py " + "True " + snp + " " + snp_coord['chromosome'] + " " + str(coord1 + (
command = "python3 LDproxy_sub.py " + "True " + snp + " " + snp_coord['chromosome'] + " " + str(coord1 + (
block * i) + 1) + " " + str(coord1 + (block * (i + 1))) + " " + request + " " + str(i)
commands.append(command)

Expand Down
2 changes: 1 addition & 1 deletion LDlink/RegisterAPI.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import json
import os.path
import binascii
Expand Down
2 changes: 1 addition & 1 deletion LDlink/SNPchip.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

###########
# SNPchip #
Expand Down
2 changes: 1 addition & 1 deletion LDlink/SNPclip.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import yaml
import json
import math
Expand Down
2 changes: 1 addition & 1 deletion LDlink/UnlockStaleTokens.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
import datetime
import dateutil.parser
import yaml
Expand Down

0 comments on commit e202e48

Please sign in to comment.