Skip to content
Snippets Groups Projects
Commit 6b592c81 authored by Tim O'Donnell's avatar Tim O'Donnell
Browse files

update

parent f2160e59
No related merge requests found
......@@ -422,6 +422,8 @@ class PresentationModel(object):
assert 'experiment_name' in peptides_df.columns
assert 'hit' in peptides_df.columns
peptides_df = peptides_df.copy()
peptides_df["prediction"] = self.predict(peptides_df)
top_n = float(peptides_df.hit.sum())
......@@ -432,8 +434,13 @@ class PresentationModel(object):
}
else:
ranks = peptides_df.prediction.rank(ascending=False)
hit_indices = ranks[peptides_df.hit > 0].values
hit_lengths = peptides_df.peptide[
peptides_df.hit > 0
].str.len().values
result = {
'hit_indices': numpy.sort(ranks[peptides_df.hit > 0].values),
'hit_indices': hit_indices,
'hit_lengths': hit_lengths,
'total_peptides': len(peptides_df),
}
result['score'] = (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment