Add all modules and main script#1
Conversation
| import sys | ||
| import modules.dna_rna_tools as dr | ||
| import modules.protein_tool as p | ||
| import modules.fastqc_filter as f | ||
| from typing import Dict, List, Union |
There was a problem hiding this comment.
Все супер, только вот импорты из стандартной библиотеки всегда идут до импортов собственной библиотеки и разделяются пустыми строками
Плюс я была бы поосторожнее с собственными именами пакетов вроде dr, p, f - они хоть и могут быть короче, но лучше, чтобы оставались уникальными и информативными
| import sys | |
| import modules.dna_rna_tools as dr | |
| import modules.protein_tool as p | |
| import modules.fastqc_filter as f | |
| from typing import Dict, List, Union | |
| import sys | |
| from typing import Dict, List, Union | |
| import modules.dna_rna_tools as dr | |
| import modules.protein_tool as p | |
| import modules.fastqc_filter as f | |
| for name, (sequence, quality) in seqs.items(): | ||
| if name in filter_set: | ||
| result[name] = (sequence, quality) | ||
| return result |
| length_output = [] | ||
| for name, (sequence, quality) in seqs.items(): | ||
| if len(sequence) <= length_bounds[1] and len(sequence) >= length_bounds[0]: | ||
| length_output.append(name) | ||
| return length_output |
There was a problem hiding this comment.
увы, не предусмотрен вариант, где пользователь передает только одну границу (тип int), и тогда она назначается верхней, а нижняя граница будет 0
| for name, (sequence, quality) in seqs.items(): | ||
| score_nuc_count = 0 | ||
| for score in quality: | ||
| score_nuc_count += ord(score) - 33 |
| if nuc == 'G' or nuc == 'C': | ||
| gc_nuc_count += 1 | ||
| gc_count = gc_nuc_count/len(sequence)*100 | ||
| if gc_count <= gc_bounds[1] and gc_count >= gc_bounds[0]: |
There was a problem hiding this comment.
увы, не предусмотрен вариант, где пользователь передает только одну границу (тип int), и тогда она назначается верхней, а нижняя граница будет 0
| for nuc in sequence: | ||
| if nuc == 'G' or nuc == 'C': | ||
| gc_nuc_count += 1 | ||
| gc_count = gc_nuc_count/len(sequence)*100 |
There was a problem hiding this comment.
PEP8, пробелы
| gc_count = gc_nuc_count/len(sequence)*100 | |
| gc_count = gc_nuc_count / len(sequence) * 100 |
| score_nuc_count = 0 | ||
| for score in quality: | ||
| score_nuc_count += ord(score) - 33 | ||
| score_seq_count = score_nuc_count/len(sequence) |
There was a problem hiding this comment.
PEP8, пробелы
| score_seq_count = score_nuc_count/len(sequence) | |
| score_seq_count = score_nuc_count / len(sequence) |
|
Комментарии:
Итог:
Штрафы и бонусы:
Итог: 9 баллов |
No description provided.