Conversation
nvaulin
left a comment
There was a problem hiding this comment.
Привет!
Хорошая работа
- Классный README
- Будь чуть аккуратнее с сообщениями коммитов. Например, их принято делать с заглавной буквы:)
- По чтению и записи FASTQ-файлов в фильтраторе кажется все написано правильно, но че-то к сожалению привел ввод который выдал мне пустой вывод. Не знаю что именно не так.
- В целом работа хорошая, но вот везде какие-то мелкие косяки которые все портят)) В конвертере какой-то небольшой мусор влезает, тоже обрати внимание. В сдвиге позиции у тебя возвращается только первая буква правильного ответа)) В общем не забывай сама все это дело еще проверять перед отправкой, и тогда совсем хорошо будет.
Баллы
- Добработка FASTQ-модуля: 1/2 балла
- convert_multiline_fasta_to_oneline: 3.8/4 балла
- select_genes_from_gbk_to_fasta: 0/4 балла
-0.5 за то что есть неправильные названия аргументов (не так как заявлено в ТЗ)
Итого: 4.3 баллов + 2 доп. балла (они будут стоять в отдельной колонке)
В любом случае, ты молодец! Нужно чуть больше внимательности и так понимаю больше времени, и тогда совсем все супер будет.
| This package consists of 2 mini-tools | ||
| `tools_for_bioinformatics` designed to work with nucleotide and amino acid sequences and FASTQ files | ||
| `bio_files_processor` provides opportunity to manipulate with FASTA files |
There was a problem hiding this comment.
🔥
| This package consists of 2 mini-tools | |
| `tools_for_bioinformatics` designed to work with nucleotide and amino acid sequences and FASTQ files | |
| `bio_files_processor` provides opportunity to manipulate with FASTA files | |
| This package consists of 2 mini-tools | |
| `tools_for_bioinformatics` designed to work with nucleotide and amino acid sequences and FASTQ files | |
| `bio_files_processor` provides opportunity to manipulate with FASTA files |
| Returns: | ||
| (str): oligo- and polynucleotide sequence | ||
| """ | ||
| return complement(seq)[::-1] |
There was a problem hiding this comment.
| return complement(seq)[::-1] | |
| return reverse(complement(seq)) | |
| from typing import Union | ||
| import os | ||
| import modules.nucleic_acids_functions as na | ||
| import modules.fastq_filters as ff | ||
| import modules.amino_acids_functions as aa | ||
| NUCLEOTIDES = {'U', 'A', 'g', 't', 'G', 'T', 'a', 'c', 'C', 'u'} |
There was a problem hiding this comment.
| from typing import Union | |
| import os | |
| import modules.nucleic_acids_functions as na | |
| import modules.fastq_filters as ff | |
| import modules.amino_acids_functions as aa | |
| NUCLEOTIDES = {'U', 'A', 'g', 't', 'G', 'T', 'a', 'c', 'C', 'u'} | |
| import os | |
| from typing import Union | |
| import modules.nucleic_acids_functions as na | |
| import modules.fastq_filters as ff | |
| import modules.amino_acids_functions as aa | |
| NUCLEOTIDES = {'U', 'A', 'g', 't', 'G', 'T', 'a', 'c', 'C', 'u'} |
С импортами тоже куча своих конвенций. Например тут:
- Отделяем от дальнейшего кода 2 строками
- Сперва внешние, потом твои
- Сперва import, потом from ... import
Ну и там далее еще куча разных, можно про это в PEP-8 прочитать
| return answer | ||
|
|
||
|
|
||
| def fastq_filtration(input_fastq, gc_bounds=(0, 100), length_bounds=(0, 2 ** 32), quality_treshold=0, output_fastq=''): |
There was a problem hiding this comment.
- Функции глаголами
- Пропущенные значения по умолчанию - None
| def fastq_filtration(input_fastq, gc_bounds=(0, 100), length_bounds=(0, 2 ** 32), quality_treshold=0, output_fastq=''): | |
| def run_fastq_filtration(input_fastq, gc_bounds=(0, 100), length_bounds=(0, 2 ** 32), quality_treshold=0, output_fastq=None): |
или
| def fastq_filtration(input_fastq, gc_bounds=(0, 100), length_bounds=(0, 2 ** 32), quality_treshold=0, output_fastq=''): | |
| def filter_fastq(input_fastq, gc_bounds=(0, 100), length_bounds=(0, 2 ** 32), quality_treshold=0, output_fastq=None): |
There was a problem hiding this comment.
А еще в ТЗ первый аргумент это input_path, ну и + в слове treshold опечатка (quality_threshold) :)
| """ | ||
| if not os.path.isdir('fastq_filtrator_resuls'): | ||
| os.mkdir('fastq_filtrator_resuls') | ||
| if output_fastq == '': |
There was a problem hiding this comment.
| if output_fastq == '': | |
| if not output_fastq: |
Ну а вообще с учетом прошло комментария:
| if output_fastq == '': | |
| if output_fastq is None: |
| return seqs | ||
|
|
||
|
|
||
| def write_dict_file_to_fastq(seqs, output_fastq): |
There was a problem hiding this comment.
| def write_dict_file_to_fastq(seqs, output_fastq): | |
| def write_fastq(seqs, output_fastq): |
| with open(output_fastq, 'w') as output_file: | ||
| for key, params in seqs.items(): | ||
| output_file.write(key + '\n') | ||
| output_file.write(params[0] + '\n') | ||
| output_file.write(params[1] + '\n') | ||
| output_file.write(params[2] + '\n') |
| output_fasta = os.path.join('multiple_to_online_results', os.path.basename(input_fasta)) | ||
| else: | ||
| output_fasta = os.path.join('multiple_to_online_results', output_fasta + ".fasta") | ||
| with open(input_fasta) as input_file, open(output_fasta, 'w') as output_file: |
| current = [] | ||
| output_file.write(input_file.readline()) | ||
| while True: | ||
| line = input_file.readline() | ||
| current.append(line.strip()) | ||
| if line.startswith('>'): | ||
| output_file.write(''.join(current) + '\n') | ||
| output_file.write(line) | ||
| current = [] | ||
| break | ||
|
|
||
| for line in input_file: | ||
| if line.startswith('>'): | ||
| output_file.write(''.join(current) + '\n') | ||
| output_file.write(line) | ||
| current = [] | ||
| else: | ||
| current.append(line.strip()) | ||
| output_file.write(''.join(current) + '\n') |
| new_fasta = s1 +s2 | ||
| with open(output_fasta, 'w') as output_file: | ||
| output_file.write(name +'\n') | ||
| output_file.write(new_fasta[0] + '\n') |
There was a problem hiding this comment.
Вот всё тут супер, но этот [0] оставляет лишь первую букву)))

No description provided.