checking for overlapping

This is the place for queries that don't fit in any of the other categories.

checking for overlapping

Postby betty3 » Tue May 07, 2013 9:22 pm

Hi,
I am new to programming. I need to write program in python which do following:
Read the lines of the file where in each line there are 4 colums:
1st one is a name of protein,
the second one is a name of domain in the protein(the building block of protein, as protein can be created by several domain),
the third one is a start location of the domain(number) in the protein and
the fourth one is a end location (number) of the domain in the protein.
I need to check if domains in the same protein ( so for the same id in colum 1) overlap. The rule is: two domains overlap if more then 10% of of the predicted
domain locations were overlapping (based on the relative length of the
domains).
Can you help me to write this code please.
Many thanks
Betty
betty3
 
Posts: 3
Joined: Tue May 07, 2013 9:19 pm

Re: checking for overlapping

Postby micseydel » Tue May 07, 2013 10:43 pm

I will read your post once you've read this.
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1271
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: checking for overlapping

Postby betty3 » Wed May 08, 2013 5:34 am

Hi,
I know the python syntax but really straggled with this task. I don't really know how to translate into the language the overlapping situation. Do I need to use a set ranges for it.
I must underline that this is not a homework. I just need help if you can help me.
Thanks
betty3
 
Posts: 3
Joined: Tue May 07, 2013 9:19 pm

Re: checking for overlapping

Postby Mekire » Wed May 08, 2013 5:51 am

Regardless of whether it is homework or not, we generally like to see some sort of attempt (posted correctly in code tags) before assisting. We have no clue what you do or do not know how to do. Do you know how to extract the data from your files? Do you know how to compare the domains?

Post an attempt, be it bad or good. Tell us what error it is giving or how the result is differing from what you want.

-Mek
User avatar
Mekire
 
Posts: 987
Joined: Thu Feb 07, 2013 11:33 pm
Location: Amakusa, Japan


Return to General Coding Help

Who is online

Users browsing this forum: Google [Bot] and 4 guests