Skip to content

Commit

Permalink
update predicted accuracy name
Browse files Browse the repository at this point in the history
  • Loading branch information
maxibor committed Jul 2, 2021
1 parent 80db47e commit e9bc4a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/source/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The tabular outputs are comma-separated file (`.csv`) with the following column
### `pydamage_results.csv`

* `reference`: name of the reference genome/contig
* `pred_accuracy`: Predicted accuracy of Pydamage prediction, from the GLM modelling
* `predicted_accuracy`: Predicted accuracy of Pydamage prediction, from the GLM modelling
* `null_model_p0`: parameter `p0` of the null model
* `null_model_p0_stdev`: standard error of the null model paramater `p0`
* `damage_model_p`: parameter `p` of the damage model
Expand All @@ -27,7 +27,7 @@ The tabular outputs are comma-separated file (`.csv`) with the following column

### `pydamage_filtered_results.csv`

Same file as above, but with contigs filtered with `qvalue <= 0.05` and `pred_accuracy >= threshold` with the filtering threshold determined with the [kneedle](https://ieeexplore.ieee.org/document/5961514) method.
Same file as above, but with contigs filtered with `qvalue <= 0.05` and `predicted_accuracy >= threshold` with a user defined filtering threshold (default = 0.5), or determined with the [kneedle](https://ieeexplore.ieee.org/document/5961514) method.

### Plots

Expand Down
6 changes: 3 additions & 3 deletions pydamage/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def define_threshold(pydam_df, min_knee=0.5, alpha=0.05):
Args:
pydam_df (pandas df): pydamage results
min_knee (float, optional): Min pred_accuracy threshold.
min_knee (float, optional): Min predicted_accuracy threshold.
alpha(float, optional): Alpha q-value threshold
"""
thresholds = [i.round(2) for i in arange(min_knee, 1, 0.01)]
Expand Down Expand Up @@ -41,7 +41,7 @@ def filter_pydamage_results(pydam_df, acc_thresh, alpha=0.05):
Args:
pydam_df (pandas df): pydamage results
acc_thresh (float): predictiona accuracy threshold
acc_thresh (float): predicted accuracy threshold
alpha (float, optional): Alpha q-value threshold. Defaults to 0.05.
"""

Expand All @@ -65,7 +65,7 @@ def apply_filter(csv, threshold, outdir, alpha=0.05):
print(f"Optimal prediction accuracy threshold found to be: {threshold}")
filt_df = filter_pydamage_results(df, acc_thresh=threshold)
print(
f"Filtering PyDamage results with qvalue <= {alpha} and pred_accuracy >= {threshold}"
f"Filtering PyDamage results with qvalue <= {alpha} and predicted_accuracy >= {threshold}"
)
df_to_csv(filt_df, outdir, outfile)
print(f"Filtered PyDamage results written to {outdir}/{outfile}")
Expand Down

0 comments on commit e9bc4a8

Please sign in to comment.