Skip to content

Commit

Permalink
Update _preprocessing.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zktuong committed Jan 5, 2024
1 parent 5f13164 commit 5de1ada
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions dandelion/preprocessing/_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4174,11 +4174,13 @@ def run_igblastn(
dbpath = igdb / "database"
db_org_loci = db + "_" + org + _strain + "_" + loci + "_"
vpath = dbpath / (db_org_loci + "v")
dpath = dbpath / (db_org_loci + "d")
if strain in NO_DS:
dpath = dbpath / (db + "_" + org + "_" + loci + "_" + "d")
else:
dpath = dbpath / (db_org_loci + "d")
jpath = dbpath / (db_org_loci + "j")
cpath = dbpath / (db_org_loci + "c")
cpath = dbpath / ("imgt_" + org + "_" + loci + "_" + "c") # only imgt
auxpath = igdb / "optional_file" / (org + aux)

for fileformat in ["blast", "airr"]:
outfile = str(fasta.stem + informat_dict[fileformat])
if loci == "tr":
Expand Down Expand Up @@ -4240,16 +4242,9 @@ def run_igblastn(
str(evalue),
"-min_D_match",
str(min_d_match),
"-c_region_db",
str(cpath),
]
if db == "imgt":
cmd += [
"-c_region_db",
str(cpath),
]
if db == "ogrdb":
if strain in NO_DS:
cmd.remove("-germline_db_D")
cmd.remove(str(dpath))
cmd += additional_args
logg.info("Running command: %s\n" % (" ".join(cmd)))
run(cmd, env=env) # logs are printed to terminal
Expand Down

0 comments on commit 5de1ada

Please sign in to comment.