Thread: Python Help

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    Python Help


    no longer need this post
  2. #2
  3. Recovering Intellectual
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2006
    Location
    Orange County, CA
    Posts
    1,306
    Rep Power
    785
    Do you have an example of the sequence.data file? [EDIT] Nevermind I've just re-read your example data.

    This is incredibly easy and if you were getting assignments done with examples from the professor then the statement 'I have NO programming experience' is not true. What might be confusing here, at least from what I read just now, is the actual sequence data strings. You dont need to modify these at all - you just need to read in the file as an associative arry with the key being the ID and the value being the sequence string.

    Break the requirements down into an ordered list of small tasks and then take it from there. Im not going to solve this for you and I hope no one here does - you're supposed to be learning something. If however you show some code and some initiative im more than happy to help you along the way.
    Last edited by Matt1776; April 18th, 2013 at 06:11 PM.
    Bugs that go away by themselves come back by themselves
    Beware - your loyalty will not be rewarded
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    I'm sorry if it came off as me trying to get someone to do my work for me. I was not. I was just trying to get help.

    Comments on this post

    • Matt1776 disagrees : {0} put your code back and stop being a baby - i told you i was here to help - youre almost there
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    and I did get it to work.
  8. #5
  9. Recovering Intellectual
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jun 2006
    Location
    Orange County, CA
    Posts
    1,306
    Rep Power
    785
    OK well look your more than half-way there:

    Code:
    matt@matt:~$ ./testscript.py testdata.txt 
    ['GeneID12345', 'ATTACATATACCATACCCCATATTAATCCGAGGGTTACCTATAGGTA']
    ['GeneID12346', 'TTGATACCATATATCCCATATGCCCTATATTCCTTTACCTATC']
    all you really need to do now is grab the first argument and call it the GeneID and google a way to specify "python command line switch". then based on the switch, take the GeneID and use it to index the ID array. Google "python index associative array" and grab out the value and print it.
    Bugs that go away by themselves come back by themselves
    Beware - your loyalty will not be rewarded

IMN logo majestic logo threadwatch logo seochat tools logo