Skip to content

Commit

Permalink
fix: change "nreads" in non-LCA stats to N_alignments
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianMichelsen committed Jun 14, 2022
1 parent 1d19d89 commit 85c033c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ celerybeat.pid
# Environments
.env
.venv
.vscode
env/
venv/
ENV/
Expand Down
4 changes: 2 additions & 2 deletions src/metaDMG/fit/fits.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def read_stats_lca(config):

def read_stats_non_lca(config):

columns = ["tax_id", "N_reads", "mean_L", "var_L", "mean_GC", "var_GC"]
columns = ["tax_id", "N_alignments", "mean_L", "var_L", "mean_GC", "var_GC"]

df_stats = pd.read_csv(
config["path_mismatches_stat"],
Expand Down Expand Up @@ -523,7 +523,7 @@ def compute(config, df_mismatches):

# if local or global damage
if config["damage_mode"] in ("local", "global"):
for col in ["tax_name", "tax_rank", "N_alignments", "tax_path"]:
for col in ["tax_name", "tax_rank", "N_reads", "tax_path"]:
cols_ordered.remove(col)

df_fit_results = df_fit_results[cols_ordered]
Expand Down
2 changes: 1 addition & 1 deletion src/metaDMG/fit/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def merge(

# if local or global damage
if config["damage_mode"] in ("local", "global"):
for col in ["tax_name", "tax_rank", "N_alignments"]:
for col in ["tax_name", "tax_rank", "N_reads"]:
columns_order.remove(col)

columns_order += [col for col in df_fit_results.columns if not col in columns_order]
Expand Down

0 comments on commit 85c033c

Please sign in to comment.