Skip to content

Commit

Permalink
get bin list
Browse files Browse the repository at this point in the history
  • Loading branch information
alienzj committed Jun 5, 2022
1 parent fdad1f3 commit dc9535e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion metapi/rules/binning_report.smk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if len(BINNERS_CHECKM) != 0:
shell('''rm -rf {output.report_dir}''')
shell('''mkdir -p {output.report_dir}''')

bin_list = glob.glob(os.path.dirname(input[0]) + "/*bin*fa")
bin_list = glob.glob(os.path.dirname(input[0]) + "/*.fa")
header_list = ["assembly_group", "bin_id", "bin_file", "assembler", "binner",
"chr", "length", "#A", "#C", "#G", "#T",
"#2", "#3", "#4", "#CpG", "#tv", "#ts", "#CpG-ts"]
Expand Down
2 changes: 1 addition & 1 deletion metapi/rules/predict_bins.smk
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ if config["params"]["predict"]["bins_to_gene"]["prokka"]["do"]:
import time
import subprocess

bin_list = glob.glob(input.bins_dir + "/*bin*fa")
bin_list = glob.glob(input.bins_dir + "/*.fa")
gff_count = 0

for bin_fa in bin_list:
Expand Down
2 changes: 1 addition & 1 deletion metapi/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def parse_samples(

def parse_bins(bins_dir):
bin_list = []
for bin_ in glob.glob(bins_dir + "/*/*bin*fa"):
for bin_ in glob.glob(bins_dir + "/*/*.fa"):
bin_dict = dict()
bin_dict["path"] = bin_.strip()
bin_dict["id"] = os.path.basename(bin_).rstrip(".fa")
Expand Down
2 changes: 1 addition & 1 deletion scripts/batch_prokka.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def run(dir_list, outdir, logdir):
with open(dir_list) as f:
for dir in f:
count += 1
bin_list = glob.glob(dir.strip() + "/*bin*fa")
bin_list = glob.glob(dir.strip() + "/*.fa")
for bin in bin_list:
bin_id = os.path.basename(bin).rstrip(".fa")
prokka_dir = os.path.join(outdir,
Expand Down
2 changes: 1 addition & 1 deletion scripts/get_bins_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

def parse_bins(bins_dir):
bin_list = []
pattern = bins_dir + "/*/*bin*fa"
pattern = bins_dir + "/*/*.fa"
for bin in glob.glob(pattern):
bin_dict = {}
bin_fa = os.path.basename(bin)
Expand Down

0 comments on commit dc9535e

Please sign in to comment.