Changeset 49 for trunk/grails-app/domain


Ignore:
Timestamp:
Apr 12, 2011, 3:39:13 PM (9 years ago)
Author:
robert@…
Message:
  • Added sequence length histograms
  • Fixed bugs in files that remained on the file system after uploading (while they shouldn't)
  • Added extra options in run- and assay screens
Location:
trunk/grails-app/domain/nl/tno/massSequencing
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/nl/tno/massSequencing/AssaySample.groovy

    r42 r49  
    253253                }
    254254        }
     255       
     256       
     257        /**
     258         * Delete all sequences from a sample
     259         * @param assaySample
     260         * @return
     261         */
     262        public int deleteSequenceData() {
     263                if( !sequenceData )
     264                        return 0;
     265               
     266                def numFiles = 0;
     267                sequenceData.each { sequenceData ->
     268                        numFiles += sequenceData.numFiles();
     269                 
     270                        removeFromSequenceData( sequenceData );
     271                        sequenceData.delete(flush:true);
     272                }
     273
     274                resetStats();
     275                save();
     276               
     277                return numFiles;
     278        }
     279
    255280}
  • trunk/grails-app/domain/nl/tno/massSequencing/SequenceData.groovy

    r42 r49  
    5858                // Reset statistics of the assay sample, to ensure the deleted files are removed from statistics
    5959                sample?.resetStats();
     60               
     61                return true;
    6062        }
    6163       
  • trunk/grails-app/domain/nl/tno/massSequencing/Study.groovy

    r42 r49  
    4343        }
    4444       
     45        /**
     46        * Returns the total number of sequences found in this assay. It is computed
     47        * as the sum of the number of sequences of all samples
     48        * @return
     49        */
     50   public int numSequences() {
     51           if( !assays )
     52                   return 0
     53           
     54           int numSequences = 0;
     55           assays.each { numSequences += it.numSequences() }
     56
     57           return numSequences;
     58   }
     59       
    4560        public boolean equals( Object o ) {
    4661                if( o == null )
Note: See TracChangeset for help on using the changeset viewer.