Dear all, please kindly help me to solve this problem by python script writing. I am a beginner in script writing.
Problem: A homologous gene group consists of genes, which have an alignment to at least one other gene in the group with both a % sequence coverage and % identity equal to or higher than a given stringency cutoff. Write a python program to find the number of homologous gene groups within a genome at various levels of stringency. For example with a stringency of 10, every gene in a group should have a % sequence coverage and % identity of at least 10% with at least one other gene in the group. The program should take a single genome file in genbank format on the command line and write a csv file called "output.csv" in the directory. The ouput file should consist of 10 lines, each line should have the stringency used (0 to 100, in increments of 10) and the number of homology groups. (See example below). write the python program as a txt file.
Example: 0,13456 10,234 20,234 30,200 40,190 50,187 60,187 70,100 80,95 90,55 100,45
please kindly help me. Thanks in advance.
1 answer
This looks like a homework question. So you need to face our standard response: "What have you tried?", and otherwise motivation from others to write the complete script for might be limited.
If you are an absolute beginner in programming, then this task might be a little over your head. I'd recommend to break down the task into smaller sub-tasks, which again I can give in pseudo code. Note that I do not know python, but this should help you to structure the task anyway. That is at leas how I would approach it (and that normally works for me to structure my short scripts)
read genbank file
declare count_vector = (0,...,0);
foreach pair of sequences in genbank file do:
run pairwise (reciprocal?) alignment to get the alignment (I am not sure if that should be part of the task, but I guess so);
foreach set of filtering criteria i in 1:10 do:
if alignment better than filtering criteria
increment critera_count vector[i]
print count_vector
Log in to answer this question.
posted twice
.