Skip to content

Commit

Permalink
Updating EUKulele to v2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
akrinos committed Dec 5, 2023
1 parent 7281263 commit 9758d60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 1 addition & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: eukulele
version: 2.0.5
version: 2.0.7

build:
noarch: python
Expand Down Expand Up @@ -28,7 +28,6 @@ requirements:
- pytest-cov
- pytest-xdist
- blast
# - busco==4.1.4
- diamond
- transdecoder
- wget
Expand All @@ -52,7 +51,6 @@ requirements:
- pytest-cov
- pytest-xdist
- blast
# - busco==4.0.6
- diamond
- transdecoder
- wget
Expand Down
6 changes: 5 additions & 1 deletion src/EUKulele/EUKulele_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,12 @@ def main(args_in):
prot_tab = os.path.join(reference_dir, "prot-map.json")
f = open(os.path.join(output_dir, "README_DB.txt"), "a")
e = datetime.datetime.now()
filename = os.path.join(os.path.dirname(os.path.realpath(__file__)),
"static", "VERSION")
file_read = open(filename, "r")
f.write("The version of EUKulele was "+str(file_read.read())+".\n")
f.write("Time finished was " + str(e) + " for database " + \
str(args.database.lower()))
str(args.database.lower())+"\n")

## Next, see whether there is a subdirectory of reference
## directory containing folder for our DB name
Expand Down
17 changes: 9 additions & 8 deletions src/EUKulele/tax_placement.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,12 @@ def match_maker(dd, consensus_cutoff, consensus_proportion, tax_dict, use_counts

ambiguous = 0 # we assume unambiguous
md = dd.bitscore.max() * consensus_proportion #0.97
#dd.bitscore.max() #dd.pident.max()
transcript_name = set(list(dd["qseqid"]))
if len(transcript_name) > 1:
print("More than 1 transcript name included in the group.", flush = True)
transcript_name = list(transcript_name)[0]
ds = list(set(dd[dd.bitscore>=md]['ssqid_TAXID']))
counts = list(set(dd[dd.bitscore>=md]['counts']))
#maxpident = md #max(list(set(dd[dd.pident==md]['pident'])))
#ds = list(set(dd[dd.bitscore==md]['ssqid_TAXID']))
#counts = list(set(dd[dd.bitscore==md]['counts']))
maxpident = max(list(set(dd[dd.bitscore>=md]['pident'])))

if len(counts) >= 1:
Expand All @@ -150,7 +146,10 @@ def match_maker(dd, consensus_cutoff, consensus_proportion, tax_dict, use_counts
# most specific taxonomic level assigned
if len(ds)==1:
if ds[0] not in tax_dict:
return pd.DataFrame(columns=['transcript_name','classification_level',
return pd.DataFrame([[transcript_name, assignment,\
"MissingFromTaxDict", "MissingFromTaxDict", md,\
chosen_count, ambiguous]],
columns=['transcript_name','classification_level',
'full_classification','classification',
'max_pid','counts','ambiguous'])
full_classification = str(tax_dict[ds[0]]).split(";")[0:level]
Expand All @@ -163,9 +162,11 @@ def match_maker(dd, consensus_cutoff, consensus_proportion, tax_dict, use_counts
full_classification_0 = []
for d in ds:
if d not in tax_dict:
return(pd.DataFrame(columns=['transcript_name','classification_level',
'full_classification','classification',
'max_pid','counts','ambiguous']))
classification_0.append("MissingFromTaxDict")
full_classification_0.append("MissingFromTaxDict")
#return(pd.DataFrame(columns=['transcript_name','classification_level',
# 'full_classification','classification',
# 'max_pid','counts','ambiguous']))
d_full_class = str(tax_dict[str(d)]).split(";")[0:level]
classification_0.append(d_full_class[len(d_full_class) - 1])
# the most specific taxonomic level we can classify by
Expand Down

0 comments on commit 9758d60

Please sign in to comment.