Skip to content

Commit

Permalink
Merge pull request #8 from metagenlab/dev
Browse files Browse the repository at this point in the history
Relase 0.4.1
  • Loading branch information
farchaab authored Nov 6, 2023
2 parents 51b6075 + b4b7f6a commit 178b046
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion assembly_finder/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.0"
__version__ = "0.4.1"
13 changes: 7 additions & 6 deletions assembly_finder/bin/find_assemblies.smk
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,10 @@ for key, val in zip(param_keys, param_values):

# Check if input is file
if os.path.isfile(inp):
entry_dic = pd.read_csv(inp, sep="\t").to_dict()
entry_dt = pd.read_csv(inp, sep="\t").to_dict()
# replace empty values with default ones or first entry for the param
entry_dic = empty_to_val | entry_dic
entry_df = pd.DataFrame.from_dict(entry_dic).dropna(subset="entry")
entry_df["entry"] = [int(entry) for entry in entry_df["entry"]]
entry_df["nb"] = [int(nb) for nb in entry_df["nb"]]
entry_dt = empty_to_val | entry_dt
entry_df = pd.DataFrame.from_dict(entry_dt).dropna(subset="entry")


# If not create the dataframe
Expand All @@ -81,7 +79,10 @@ else:
entry_df = entry_df.replace(
empty_to_val,
).dropna()

entry_df["nb"] = [int(nb) if isinstance(nb, int) else nb for nb in entry_df["nb"]]
entry_df["entry"] = [
int(entry) if isinstance(entry, float) else entry for entry in entry_df["entry"]
]
# entry_df.to_csv("entry.tsv", sep="\t")
# Set entry as index
entry_df = entry_df.astype({"entry": str}).set_index("entry")
Expand Down

0 comments on commit 178b046

Please sign in to comment.