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

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
Can you help me to write this code please.
Many thanks
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.
Due to the reasons discussed here we will be moving to on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 3000
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

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.
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.

New Users, Read This
  • Use code tags when posting code.
  • Include any errors with your post (in code tags).
  • Describe your problem; not your chosen solution.
  • Make examples the minimum length to demonstrate your issue.
User avatar
Posts: 1711
Joined: Thu Feb 07, 2013 11:33 pm
Location: Tucson, Arizona

Return to General Coding Help

Who is online

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