Hw6 orlova#2
Conversation
…oneline and select_genes_from_gbk_to_fasta
…ools into hw6_orlova
nvaulin
left a comment
There was a problem hiding this comment.
Привет!
Очень хорошая работа!
- README, хороший, даже кажется можно было бы поменьше текста и все равно было бы ок
- Хорошие названия коммитов.
- Чтение и запись FASTQ-файлов в фильтраторе работает почти почти правильно, обрати только внимание на замечания по полю с комментарием. Также проблемы с выполнением ТЗ - принимается и путь и входное имя, что не очень удобно использовать. Человек подает сразу весь путь до файла (который он берет из автодополнения в терминале). Тут ему приходится за тебя разбивать это на путь до папки и файл. В этом задании это была ваша работа:)
- Остальные тулы - все вообще работает супер. Жму руку. Можно было бы где-то добавить проверку на то есть ли уже расширение, например, но это так.
- Очень обидно что набор каких-то мелких ошибок сделал так что код не работает((( Где то импорта нету, где то скобку забыла. В итоге мне пришел нерабочий код.
- Очень круто что сделала чтения файлов построчно, а не всё разом
Чтобы избежать таких обидных ошибок надо перед отправкой с чистого листа перепрограть свой код. На консультации 17.10.23 я показывал как это можно сделать.
Баллы
- Добработка FASTQ-модуля: 1.5/2 балла (не соответвует ТЗ +ошибка с импортом)
- convert_multiline_fasta_to_oneline: 4/4 балла
- select_genes_from_gbk_to_fasta: 3.5/4 балла (не работает эта функция и весь модуль из-за скобки)
Итого: 9 баллов + доп. баллы (2+2 = 4) будут стоять в таблице в отдельной колонке
Очень мощная работа, ты молодец!
|
|
||
| **ᶘ⊙ᴥ⊙ᶅ** Author: Orlova Victoria. | ||
|
|
||
| <img src="https://www.meme-arsenal.com/memes/6e7a90e11e31bbe40c15cdff7e442c92.jpg" width="200" height="200"> |
| ## Table of contents | ||
|
|
||
| * [A few words about the structure](#structure) | ||
| * [What is in na_protein_fastq.py script?](#what_is) | ||
| * [Module dna_rna_tools.py functional content](#module_dna_rna) | ||
| * [Module protein_tools.py functional content](#module_protein) | ||
| * [Module fastq_tool.py functional content](#module_fastq) | ||
| * [What is in bio_files_processor.py?](#what_is_bio) | ||
| * [Usage example](#examples) |
| :sparkles: New :sparkles: There are 4 functions in the `bio_files_processor.py` script: function `convert_multiline_fasta_to_oneline`, function `select_genes_from_gbk_to_fasta`, function `change_fasta_start_pos` and function `parse_blast_output`. Functions use file-based input and output. All input files lie in the `date` folder, output files are created in the root of the repository. Read the descriptions of functions for more details. | ||
|
|
||
|
|
||
| ### ᶘಠᴥಠᶅ What is in na_protein_fastq.py? ᶘಠᴥಠᶅ <a name="what_is"></a> |
There was a problem hiding this comment.
Да уж, у тебя тут прям мощное количество текста:)
Главное что примеры хорошие в конце
| import modules.dna_rna_tools as dna_rna_tools | ||
|
|
||
| import modules.protein_tools as protein_tools | ||
|
|
||
| import modules.fastq_tool as fastq_tool |
There was a problem hiding this comment.
| import modules.dna_rna_tools as dna_rna_tools | |
| import modules.protein_tools as protein_tools | |
| import modules.fastq_tool as fastq_tool | |
| import modules.dna_rna_tools as dna_rna_tools | |
| import modules.protein_tools as protein_tools | |
| import modules.fastq_tool as fastq_tool |
| filter_output = ( | ||
| fastq_tool.count_gc(seqs[seq], gc_bounds) and | ||
| fastq_tool.count_length(seqs[seq], length_bounds) and | ||
| fastq_tool.count_quality(seqs[seq], quality_threshold) | ||
| ) | ||
| if filter_output: | ||
| out_dict[seq] = seqs[seq] |
| all_genes)): | ||
| if (all_genes[index] != gene and | ||
| all_genes[index] not in out_neighboor_genes and | ||
| all_genes[index] not in matching_genes: |
There was a problem hiding this comment.
Не закрыта скобка, из-за этого падает с ошибкой:)
| all_genes[index] not in matching_genes: | |
| all_genes[index] not in matching_genes): |
| """ | ||
| if not os.path.isfile(input_gbk): | ||
| raise ValueError('No such file in directory') | ||
| with open(input_gbk, mode='r') as file, open(output_fasta + '.fasta', mode='w') as out_file: |
| for line in file: | ||
| if '/gene' in line: | ||
| gene_name = line.strip().split('=')[1] | ||
| test = 0 |
There was a problem hiding this comment.
Не совсем понимаю что хранится во флаге test:)
| if 'Description' in new_line: | ||
| protein_line = file.readline().strip() |
There was a problem hiding this comment.
Кажется это самое главное и верхняя проверка даже не особо нужна:)
| if len(seq_line) < abs(shift): | ||
| check_point = len(seq_line) * (abs(shift) // len(seq_line)) | ||
| shift = shift - check_point if shift > 0 else shift + check_point | ||
| new_seq_line = seq_line[shift:] + seq_line[:shift] |
No description provided.