-
Notifications
You must be signed in to change notification settings - Fork 4
change translation frame type description #58
Conversation
addressing the issue - #59 |
I understand this is the json output that is desired |
also dictionaries are universally always written as key: value |
right, I recall that now. I guess my issue is not so much with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. Had a few comments/suggestions
counts[ | ||
'Read length was shorter than 3 * peptide k-mer size'] += 1 | ||
elif len(unique_categories) == 1: | ||
counts[unique_categories[0]] += 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the index 0 work here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there is only unique category writing incrementing for that
read_id_category = coding_scores.filter(["read_id", "category"]) | ||
read_ids = coding_scores.read_id.unique() | ||
|
||
for read_id in read_ids: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this I'd use pandas groupby to do:
for read_id, df in read_id_category.groupby('read_id'):
categories_for_read_id = df
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, changed it
@@ -95,29 +95,29 @@ def test_get_n_per_coding_classification( | |||
peptide_bloom_filter_path, | |||
alphabet, peptide_ksize, jaccard_threshold) | |||
data = [ | |||
['read1', 'All translations shorter than peptide k-mer size + 1'], | |||
['read2', 'All translation frames have stop codons'], | |||
['read1', 'Translation is shorter than peptide k-mer size + 1'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This data should get updated to have multiple results per read, so that we can test that e.g. if any result is coding, it is called coding
No description provided.