Skip to content

Commit

Permalink
updating version and adding new script to path
Browse files Browse the repository at this point in the history
  • Loading branch information
akrinos committed Sep 2, 2024
1 parent 5464bfe commit 259ffef
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: eukulele
version: 2.0.7
version: 2.0.9

build:
noarch: python
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
package_dir={'EUKulele': 'src/EUKulele'},
scripts=['bin/EUKulele','scripts/create_protein_table.py',
'scripts/download_database.sh',\
'scripts/remove_newlines.sh',\
'scripts/concatenate_busco.sh','scripts/configure_busco.sh',
'scripts/run_busco.sh',\
'scripts/install_dependencies.sh','scripts/after_job.sh',
Expand Down
22 changes: 18 additions & 4 deletions src/EUKulele/manage_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,20 @@ def manageDumpEukaryoticFasta(output_dir, mets_or_mags, tax_tab, cutoff_file, co
rerun_rules, samples, sample_dir, pep_ext, nt_ext, perc_mem):
print("Outputting sequences predicted to be eukaryotic...", flush=True)

if mets_or_mags == "mets":
fastas = []
for sample in samples:
if os.path.isfile(os.path.join(output_dir, mets_or_mags,
sample + "." + pep_ext)):
fastas.append(os.path.join(output_dir, mets_or_mags,
sample + "." + pep_ext))
elif os.path.isfile(os.path.join(sample_dir, sample + "." + pep_ext)):
fastas.append(os.path.join(sample_dir, sample + "." + pep_ext))
else:
fastas.append(os.path.join(sample_dir, sample + "." + nt_ext))
else:
fastas = [os.path.join(sample_dir, sample + "." + pep_ext) for sample in samples]

os.system("mkdir -p " + os.path.join(output_dir, "eukaryote_fastas"))

taxonomy_est_files = [os.path.join(output_dir, "taxonomy_estimation", samp + \
Expand All @@ -622,11 +636,11 @@ def manageDumpEukaryoticFasta(output_dir, mets_or_mags, tax_tab, cutoff_file, co

output_log = os.path.join(output_dir, "log", "eukdump_out.log")
error_log = os.path.join(output_dir, "log", "eukdump_err.log")
for curr_tax,curr_dump,curr_sample,curr_codes in zip(taxonomy_est_files,euk_dump_files,samples,euk_dump_codes):
for curr_tax,curr_dump,curr_sample,curr_codes in zip(taxonomy_est_files,euk_dump_files,fastas,euk_dump_codes):
rc_2 = rc_2 + os.system("grep 'Eukaryota' " + curr_tax + " | cut -f2 > " + curr_codes )
rc_2 = rc_2 + os.system("bash remove_newlines.sh " + curr_sample +\
" | grep -A 1 -f "+ curr_codes + " > " + curr_dump + \
" 1> " + output_log + " 2> " + error_log)
rc_2 = rc_2 + os.system("remove_newlines.sh " + curr_sample +\
" | grep -A 1 -f "+ curr_codes + " 1> " + curr_dump + \
" 2> " + error_log)
return rc_2

def manageCoreTaxEstimation(output_dir, mets_or_mags, tax_tab, cutoff_file, consensus_cutoff,
Expand Down

0 comments on commit 259ffef

Please sign in to comment.