Posts

5/19 Not much was completed this week as it was finals week. I meet with my mentor monday at 2. Our paper is due by Friday.  We will probably be working on that.
5/12 This week and next week are finals. There has been little to no work completed.
Image
5/6 This week I have gone through my kmer analysis and made it so that it can read a single file, find its kmer and then output that into a text file. I have also created a second code that will take that output file for two traces and compare them to find their commonalities. Below. is a screenshot of the code that reads the single trace and finds its kmer. You can see above that the output into a text file calls the file "Trace5(2-mer)". This is so I can distinguish which kmer it is when I used the other code to compare them. You can see from the screenshot above that it takes those output codes and compares them but reading them and taking out the spaces so it can more easily find the kmer of my choice. In this code I am finding the 2mer of Trace5 and Trace11.  Below you can see what that output file looks like before I fixed it. This is wrong because they are not in the 2mer that I designated that they be in.  This week I have to use the fir
Image
4/28 This week I have talked with my mentor about comparing codes to each other and having them output into a separate file. I completed that task this week and I feel very accomplished. It took some tweaking of the code to get the two traces to compare before the output file. Below you will see the code and what the output looks like in the text file.  The red is a line of code that would output everything that was in the k-mer.  This image is of the output file that went with the code pictured above. My mentor wants me to work on getting the List3 to go into the output instead of both files. So I will have to work on that this upcoming week. I also have to do this same stuff for another set of data.
4/21/18 This past week I struggled getting the code to work as it should have been working. Below is a copied version of my code that I finally got working. f=open("Trace4.txt", "r") f2=open("Trace27.txt","r") List1= f.read().split(); List2 =f2.read().split(); tempList1 = []; tempList2 = []; List3 = []; k = int(input ("Enter a number for k!   ")); for i in range (0,(len(List1)-k)+1):    tempList1.append(List1[i:i+k]); f.close(); for i in range (0, (len(List2)-k)+1):         tempList2.append(List2[i:i+k]); f2.close(); def intersection(tempLit1, tempList2):    List3 = [ value for value in tempList1 if value in tempList2]    return List3; print(intersection(tempList1, tempList2))          I plan on taking the other trace files that he sent me and adding those to this code as well. They will go right below f2 for opening the file, and then below List2 for reading and splitting the file. I
4/14 This week I have met with my mentor and spoke with him about advancing the code a bit more. He wants the code to read two strings that he sent to us in a text file, but he wants it to read one at a time and then write the k-mers into a separate file. I have not yet worked on that as I have been extremely busy with the classes I am taking and working on the lesson plans. This week I am going to work on the code and getting it to work and then work more on the lesson plans and whatever else my mentor gives me to do.
4/7/18 This week I was asked by my mentor to add to my kmer file and make it output and write into a file whatever the output is. The only thing I have to do was add : f=open("testfile.txt","r") List1= f.read(); List2 = []; List3 = []; k = int(input ("Enter a number for k!   ")); for i in range (0,(len(List1)-k)+1):    List2.append(List1[i:i+k]); List2 = list(set(List2));     for i in range(0,(len(List2))):     print(List2[i])     List3.append(List1.count( List2[i])); for i in range (0, len(List3)):    print(List3[i]);     f.close() file3=open('write_kmer.txt','w') for element in List1:    file3.write("%s " % element) file3.close() This then will write into the file write_kmer.txt whatever List3 prints out. This was challenging because I could not get the file to write. After much trial and error, I  realized my only mistake was I didn't put ".txt" at