Home
News
Feed
search engine
by
freefind
advanced
Work 071412
2015-01-13
azim58 - Work 071412 I had started making the findEverythingSimilarToI function. However, now I think I want to remake the function using a slightly different strategy. The first strategy involved looping through the similarity scores to i, but then when a similar score was found the method would branch off and compare everything to that method. Now I would rather compare everything to i first, keep track of which things are similar, and then branch off to those later. initial code for first attempt of findEverythingSimilarToI function =========================================================================== public ArrayList findEverythingSimilarToI(int i) { ArrayList things_similar_to_I = new ArrayList(); things_similar_to_I.add(i); for(int j=0; j<((ArrayList)working_list.get(i)).size(); j++) { double current_value = Double.valueOf(((ArrayList)working_list.get(i)).get(j).toString()).doubleVa lue(); if(current_value!=-1) { if(current_value>threshold) { things_similar_to_I.add(i+j+1); ((ArrayList)working_list.get(i)).set(j, -1); MotifGrouper2 mg = new Motif } } } } =========================================================================== Made ItemData class. 1430 Finished making MotifGrouper2 class. Everything seems to be working. In order to test it, I want to make one more fake score file, and see if everything is grouped correctly. My fake data scores could be represented in a matrix like this. [-1, 10, 1, 1, 1] [-, -1, 1, 50, 10] [-, -, -1, 1,1] [-, -, -, -1, 20] [-, -, -, -, -1] As an arraylist of arraylists this matrix would be represented like this: [10, 1, 1, 1],[1, 50, 10],[1,1],[20],[] My program should group items 0,1,3, and 4 with group 2 in it's own group. The first group would be created all from the first iteration when all similar items with 0 are found. The representative from the first group should be item 3 since it has the highest score with everything. The average score for 4 should be (1+50+20)/3.0 = 23.67. I'm going to make quite a few changes to my public ItemData findEverythingSimilarToItemI(int i) method. Here's what it was before the changes some code as of 071412_1500 1535 Everything in my program works as I expect it to now which means that I can now group the motifs as well as choose the most representative motif in the motif group. I don't think I need the MotifGrouper class any longer MotifGrouper Class as of 071412 Here is my MotifGrouper2 class which I plan to rename to MotifGrouper L:\storage\CIM Research Folder\DR\2012\7-14-12 I also put the current versions of the MotifPeptideAnalysis and the ItemData class there. I think the next time I work on this I will want to use glam2scan to assign the peptides to the different motif groups.
azim58wiki: