source: trunk/grails-app/domain/nl/tno/metagenomics/SequenceData.groovy @ 2

Last change on this file since 2 was 2, checked in by robert@…, 8 years ago

Initial import of basic functionality

File size: 596 bytes
Line 
1package nl.tno.metagenomics
2
3class SequenceData {
4        String sequenceFile = ''
5        String qualityFile = ''
6        Long numSequences = 0L
7        Float averageQuality = 0.0
8
9        static belongsTo = [sample: AssaySample, run: Run]
10        static constraints = {
11                qualityFile(nullable: true)
12                numSequences(nullable: true)
13                averageQuality(nullable: true)
14        }
15
16        /**
17         * Returns the number of files in this data object.
18         * @return
19         */
20        public int numFiles() {
21                int number = 0;
22                if( sequenceFile != null && sequenceFile != "" )
23                        number++;
24
25                if( qualityFile != null && qualityFile != "" )
26                        number++;
27
28                return number;
29        }
30}
Note: See TracBrowser for help on using the repository browser.