help with python homework assignments
1
2
Entering edit mode
5.8 years ago
katerinaxe87 ▴ 20

Hello, I am looking for help with some homework assignments. Compensation provided of course. Our homework indicated i need to implement a getFASTA function in our getBLASTseqs.py file. Is anyone available to spend a couple hours to solve this with me? Thank you in advance, i am very lost

theses are the directions inside the file:

# getSequencesBlastDB function
#
# input: 1. a list of accession IDs to look up
#        2. the name of a formatted BLAST sequence database
#
# output: 1. a dictionary whose keys are the accession IDs and whose values
#       are a tuple (taxonID, sequence) matching the accession ID
getFASTA getBLASTseqs.py • 1.6k views
ADD COMMENT
2
Entering edit mode

Even though you've been entirely transparent about this being a homework question (which is great), and I realise this is a request for compensated help, we typically close homework posts as off topic until we've at least seen an initial attempt at the task from the poster.

We try not to do people's work for them, but rather help them to get to the answer themselves.

ADD REPLY
0
Entering edit mode

Hello! I apologize perhaps i expressed myself wrong. I have Written my code but i don’t get the right results, i only offered compensation for someone’s time because i have 0 programming background and i have a lot of silly questions. I’m taking an online class that does not help much and it went fron 0 to 100 in a lecture. I appreciate your reply though!

ADD REPLY
0
Entering edit mode

Hello katerinaxe87 ,

please use the ADD REPLYbutton below the post you like to reply to.

I have Written my code but i don’t get the right results.

Then show us the code, the result and your expected result.

i have a lot of silly questions

Then ask your question! But please show as much effort as you can and provide more information.

Thanks and happy coding ;)

fin swimmer

ADD REPLY
0
Entering edit mode

also, in general, don't offer compensation for this type of help - it is quite unlikely you could pay for someone's effort and you only turn it into a commercial task. I understand that you are trying to do the right thing, but going about incorrectly. Post a clear question, follow up, come on back and thank people - that's all the payment that is needed.

people do quite valuable things for free, if you tried to purchase the same, would cost you a lot more than would be worth to you.

How much is my comment here worth .... how much would you need to pay me to comment here if I didn't feel like doing so... see?

ADD REPLY
0
Entering edit mode

make sure to post a few lines of the input files as well. It is not clear what a "formatted BLAST sequence database" is - that is not a standardized data format

ADD REPLY
0
Entering edit mode

oh i understand what you're saying, i find very hard to find help with python because i don't even know what i am doing (if that makes sense) in the past people have tutored me and i offered a small compensation, that is all. but i appreciate you being patient with me. ok, so the directions of the assignment say: Edit the getBLASTseqs.py file by adding and implementing the required getFASTA function.

so in that getBLASTseqs.py file. there is the description i gave above, and a part that says

##YOU NEED TO EDIT THIS PART##

#1. define your function using the correct name and argument

so i wrote:

def getFASTA(results):       ##results is a dictionary indicated in the file by the professor
    for k in results.keys ():
        print (k)  ## i may need to replace this with the return function

the second direction says:

#2. within the function, create a string that will contain  the FASTA-formatted data in the input dictionary so i wrote:

print(">{0}_{1}".format(k,results[k]))  <== i had help from a classmate with this

the 3. says for each accID in the dictionary, extract the corresponding (taxID, sequence) value, format it correctly for FASTA and append the entry in to the result string. And here i am lost. do i do:

taxID = "{:d}"
sequence= "{:s}
accID = (taxID, sequence)

one of my silly questions is: how do i copy the code here from my putty so i dont have to type everything all over? to give you an idea, it took me a week to realize i had to do :q to exit my file and i exited too many times without saving.... i feel like if you don't see the whole file you won't have an overall idea though, did any of this make sense?

ADD REPLY
0
Entering edit mode

Im still not sure I fully understand the task, so perhaps there’s more information in the assignment and the code you start with that you’ve not shown us yet?

To copy the test you can simply highlight it and copy as you normally would. I would just open the whole file in a text editor. It sounds like you’re trying to code this up in Vi/Vim, which is notoriously difficult to use (and exit!), even for pros. I would strongly advise you to use a WYSIWIG text editor like Sublime/Atom/TextWrangler etc (if you’re on windows even notepad will do). If you need to use an in-terminal editor, I prefer Nano.

ADD REPLY

Login before adding your answer.

Traffic: 1567 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6