-
Notifications
You must be signed in to change notification settings - Fork 0
Development #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Development #1
Conversation
albidgy
left a comment
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.
Плюсы:
- Молодец, что добавила в README примеры, что вернется если подать такую-то последовательность.
- Код, который ты пишешь, работает правильно.
- Докстринги и typing сделаны правильно и подробно. Здорово!
Замечания:
- Не забывай ставить пробелы.
- Не включила границы в fastq_analysis.
- Не нужно системные файлы добавлять на GitHub, это плохая практика. Ты добавила директорию .ipynb_checkpoints.
- Вот совсем непонятно, что было сделано за тот или иной коммит. Хочется более конкретных комментариев, что было добавлено/сделано.
- У тебя достаточно тяжело воспринимаемый код получается. Это сейчас не страшно, но над этим нужно работать. У меня есть 2 предложения:
- Когда ты написала какую-то функцию, пробуй придумать, как можно убрать повторяющиеся части кода (если они есть).
- Можно, думаю, смотреть прошлые домашние задания одногруппников. Мы там указываем на преимущества и недостатки. Анализируй код, почему он тебе нравится или не нравится.
Баллы:
- 3 фильтрации FASTQ 3/3
- Главная функция 0.9/1 (границы значений не включены)
- README 2/2
- Структура репозитория и качество кода 2/3 (-0.5 за системные файлы, -0.3 за комментарии к коммитам, -0.2 Отсутствие пробелов).
Улучшение кода ДНК/РНК и белковых тулов 0.8/1.
Итого: 8.7 баллов
| :rtype: str | ||
| :return: complement sequence | ||
| """ | ||
| complement_dict = {'A': 'T', 'C': 'G', |
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.
Про словарь я тебе писала, что его лучше сделать константой и вынести за пределы функции.
| complement_dict = {'A': 'T', 'C': 'G', | ||
| 'G': 'C', 'T': 'A', 'U': 'A', 'a': 't', | ||
| 'c': 'g', 'g': 'c', 't': 'a', 'u': 'a'} | ||
| complement_seq = [] |
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.
За это спасибо!
| :return: GC-contentn percent | ||
| """ | ||
| length = len(seq) | ||
| gc_content = 0.0 |
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.
Можно не создавать переменную, она сама создастся на лету в строке 78
| length = len(seq) | ||
| gc_content = 0.0 | ||
| seq_up = seq.upper() | ||
| c = seq_up.count("C") |
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.
Раньше было лучше название - c_nucl
| seq_up = seq.upper() | ||
| c = seq_up.count("C") | ||
| g = seq_up.count("G") | ||
| gc_content = round(((c+g)/length*100),2) |
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.
Не забывай про пробелы. + одна пара скобок тут лишняя.
| gc_content = round(((c+g)/length*100),2) | |
| gc_content = round((c+g) / length * 100 , 2) |
| if len(sep_seq[0]) == 1: | ||
| encode_seq.append(RESIDUES_NAMES_THREE[residue]) | ||
| for residue, reg in zip(encode_seq, save_register(seq)): | ||
| if (reg == 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.
Скобки не нужны
| encode_seq.append(RESIDUES_NAMES_THREE[residue]) | ||
| for residue, reg in zip(encode_seq, save_register(seq)): | ||
| if (reg == 1): | ||
| encode_seq_registered += residue.upper() |
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.
Лучше использовать append()
| fin_seq.append(residue) | ||
| if ((i+1) % 3 == 0): | ||
| fin_seq.append(' ') | ||
| return ' '.join(fin_seq) |
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.
| residue_count[[tl_code for tl_code in RESIDUES_NAMES if RESIDUES_NAMES[tl_code] == residue][0]] = 0 | ||
| for residue in seq: | ||
| residue_count[[tl_code for tl_code in RESIDUES_NAMES if RESIDUES_NAMES[tl_code] == residue][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.
| site_full_position.append(f'{site_start_position[counter]}:{site_end_position[counter]}') | ||
| return f'Site entry in sequence = {site_count}. Site residues can be found at positions: {site_full_position}' | ||
| else: | ||
| return f'{site} site is not in sequence!' |
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 pull request adds a utility Bio_Seq_Analysis_Tool.py with 3 main functions, a folder with 3 modules required for Bio_Seq_Analysis_Tool and README.md file