556 |
28 Jan 08 |
nicklas |
1 |
/** |
566 |
01 Feb 08 |
nicklas |
$Id$ |
556 |
28 Jan 08 |
nicklas |
3 |
|
646 |
10 Apr 08 |
jari |
Copyright (C) 2008 Nicklas Nordborg |
556 |
28 Jan 08 |
nicklas |
5 |
|
556 |
28 Jan 08 |
nicklas |
This file is part of Illumina plug-in package for BASE. |
556 |
28 Jan 08 |
nicklas |
Available at http://baseplugins.thep.lu.se/ |
556 |
28 Jan 08 |
nicklas |
BASE main site: http://base.thep.lu.se/ |
556 |
28 Jan 08 |
nicklas |
9 |
|
941 |
27 Jan 09 |
martin |
This is a free software; you can redistribute it and/or modify it |
940 |
27 Jan 09 |
martin |
under the terms of the GNU General Public License as published by |
940 |
27 Jan 09 |
martin |
the Free Software Foundation; either version 3 of the License, or |
940 |
27 Jan 09 |
martin |
(at your option) any later version. |
940 |
27 Jan 09 |
martin |
14 |
|
941 |
27 Jan 09 |
martin |
This software is distributed in the hope that it will be useful, but |
940 |
27 Jan 09 |
martin |
WITHOUT ANY WARRANTY; without even the implied warranty of |
940 |
27 Jan 09 |
martin |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
940 |
27 Jan 09 |
martin |
General Public License for more details. |
940 |
27 Jan 09 |
martin |
19 |
|
556 |
28 Jan 08 |
nicklas |
You should have received a copy of the GNU General Public License |
940 |
27 Jan 09 |
martin |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
556 |
28 Jan 08 |
nicklas |
22 |
*/ |
556 |
28 Jan 08 |
nicklas |
23 |
package net.sf.basedb.illumina; |
556 |
28 Jan 08 |
nicklas |
24 |
|
1385 |
02 Sep 11 |
martin |
25 |
import net.sf.basedb.core.FileStoreEnabled; |
1385 |
02 Sep 11 |
martin |
26 |
import net.sf.basedb.core.InvalidUseOfNullException; |
1385 |
02 Sep 11 |
martin |
27 |
import net.sf.basedb.core.Platform; |
560 |
29 Jan 08 |
nicklas |
28 |
import net.sf.basedb.core.RawDataType; |
560 |
29 Jan 08 |
nicklas |
29 |
import net.sf.basedb.core.RawDataTypes; |
686 |
30 Apr 08 |
jari |
30 |
import net.sf.basedb.core.Type; |
556 |
28 Jan 08 |
nicklas |
31 |
|
560 |
29 Jan 08 |
nicklas |
32 |
|
556 |
28 Jan 08 |
nicklas |
33 |
public class Illumina |
556 |
28 Jan 08 |
nicklas |
34 |
{ |
1386 |
06 Sep 11 |
nicklas |
35 |
/** |
1386 |
06 Sep 11 |
nicklas |
The current version of this package. |
1386 |
06 Sep 11 |
nicklas |
37 |
*/ |
1448 |
02 Nov 11 |
nicklas |
38 |
public static final String VERSION = "1.8-dev"; |
1386 |
06 Sep 11 |
nicklas |
39 |
|
556 |
28 Jan 08 |
nicklas |
40 |
|
556 |
28 Jan 08 |
nicklas |
41 |
/** |
556 |
28 Jan 08 |
nicklas |
The URL where more information about this plug-in package can |
556 |
28 Jan 08 |
nicklas |
be found. |
556 |
28 Jan 08 |
nicklas |
44 |
*/ |
556 |
28 Jan 08 |
nicklas |
45 |
public static final String URL = "http://baseplugins.thep.lu.se/wiki/net.sf.basedb.illumina"; |
1385 |
02 Sep 11 |
martin |
46 |
|
556 |
28 Jan 08 |
nicklas |
47 |
/** |
556 |
28 Jan 08 |
nicklas |
The ID for the main Illumina platform item. Use |
560 |
29 Jan 08 |
nicklas |
<code>Platform.getByExternalId(dc, Illumina.PLATFORM_ID)<code> |
556 |
28 Jan 08 |
nicklas |
to load this item. |
556 |
28 Jan 08 |
nicklas |
51 |
*/ |
560 |
29 Jan 08 |
nicklas |
52 |
public static final String PLATFORM_ID = "illumina"; |
556 |
28 Jan 08 |
nicklas |
53 |
|
566 |
01 Feb 08 |
nicklas |
54 |
|
560 |
29 Jan 08 |
nicklas |
55 |
/** |
566 |
01 Feb 08 |
nicklas |
The ID for the Illumina SNP platform variant. Use |
566 |
01 Feb 08 |
nicklas |
<code>PlatformVariant.getByExternalId(dc, Illumina.SNP_VARIANT_ID)<code> |
566 |
01 Feb 08 |
nicklas |
to load this item. |
589 |
20 Feb 08 |
martin |
59 |
*/ |
572 |
06 Feb 08 |
martin |
60 |
public static final String SNP_VARIANT_ID = "illumina.snp"; |
566 |
01 Feb 08 |
nicklas |
61 |
|
566 |
01 Feb 08 |
nicklas |
62 |
/** |
589 |
20 Feb 08 |
martin |
The ID for Illumina SNP manifest file types. Use |
589 |
20 Feb 08 |
martin |
<code>DataFileType.getByExternalId(dc, Illumina.SNP_MANIFEST_FILE_ID)</code> |
589 |
20 Feb 08 |
martin |
to load this item. |
589 |
20 Feb 08 |
martin |
66 |
*/ |
589 |
20 Feb 08 |
martin |
67 |
public static final String SNP_MANIFEST_FILE_ID = "illumina.snp.manifest"; |
589 |
20 Feb 08 |
martin |
68 |
|
589 |
20 Feb 08 |
martin |
69 |
/** |
589 |
20 Feb 08 |
martin |
The ID for Illumina SNP split data file type. Use |
589 |
20 Feb 08 |
martin |
<code>DataFileType.getByExternalId(dc, Illumina.SNP_SPLITDATA_FILE_ID)</code> |
589 |
20 Feb 08 |
martin |
to load this item. |
589 |
20 Feb 08 |
martin |
73 |
*/ |
589 |
20 Feb 08 |
martin |
74 |
public static final String SNP_SPLITDATA_FILE_ID = "illumina.snp.splitdata"; |
589 |
20 Feb 08 |
martin |
75 |
|
589 |
20 Feb 08 |
martin |
76 |
/** |
589 |
20 Feb 08 |
martin |
The ID for Illumina SNP orginal data file type. Use |
589 |
20 Feb 08 |
martin |
<code>DataFileType.getByExternalId(dc, Illumina.SNP_DATA_FILE_ID)</code> |
589 |
20 Feb 08 |
martin |
to load this item. |
589 |
20 Feb 08 |
martin |
80 |
*/ |
589 |
20 Feb 08 |
martin |
81 |
public static final String SNP_DATA_FILE_ID = "illumina.snp.data"; |
589 |
20 Feb 08 |
martin |
82 |
|
589 |
20 Feb 08 |
martin |
83 |
/** |
572 |
06 Feb 08 |
martin |
The ID of the raw data type used to hold Illumina Bead Summary raw data. |
572 |
06 Feb 08 |
martin |
Use {@link #getBeadSummaryType()} to get the raw data type object. |
560 |
29 Jan 08 |
nicklas |
86 |
*/ |
572 |
06 Feb 08 |
martin |
87 |
public static final String BEAD_SUMMARY_ID = "illumina_bead_summary"; |
556 |
28 Jan 08 |
nicklas |
88 |
|
556 |
28 Jan 08 |
nicklas |
89 |
/** |
556 |
28 Jan 08 |
nicklas |
The ID for the BGX {@link DataFileType}. Use |
560 |
29 Jan 08 |
nicklas |
<code>DataFileType.getByExternalId(dc, Illumina.BGX_FILE_ID)</code> |
556 |
28 Jan 08 |
nicklas |
to load this item. |
556 |
28 Jan 08 |
nicklas |
93 |
*/ |
560 |
29 Jan 08 |
nicklas |
94 |
public static final String BGX_FILE_ID = "illumina.bgx"; |
569 |
05 Feb 08 |
martin |
95 |
|
569 |
05 Feb 08 |
martin |
96 |
/** |
686 |
30 Apr 08 |
jari |
The ID for {@link ExtraValueType} required for Illumina detection |
686 |
30 Apr 08 |
jari |
P-value calculations using the DetectionPValue plug-in provided |
686 |
30 Apr 08 |
jari |
with this package. |
686 |
30 Apr 08 |
jari |
100 |
*/ |
686 |
30 Apr 08 |
jari |
101 |
public static final String DETECTION_PVALUE_ID = "IlluminaDetectionPValue"; |
686 |
30 Apr 08 |
jari |
102 |
|
686 |
30 Apr 08 |
jari |
103 |
/** |
686 |
30 Apr 08 |
jari |
The {@link ExtraValueType} {@link Type} required for Illumina |
686 |
30 Apr 08 |
jari |
detection P-value calculations using the DetectionPValue plug-in |
686 |
30 Apr 08 |
jari |
provided with this package. |
686 |
30 Apr 08 |
jari |
107 |
*/ |
686 |
30 Apr 08 |
jari |
108 |
public static final Type DETECTION_PVALUE_TYPE = Type.FLOAT; |
686 |
30 Apr 08 |
jari |
109 |
|
686 |
30 Apr 08 |
jari |
110 |
/** |
572 |
06 Feb 08 |
martin |
Get the {@link RawDataType} representing the Illumina Bead Summary |
560 |
29 Jan 08 |
nicklas |
raw data type. |
560 |
29 Jan 08 |
nicklas |
@return A raw data type (null if this type is not present) |
560 |
29 Jan 08 |
nicklas |
114 |
*/ |
572 |
06 Feb 08 |
martin |
115 |
public static final RawDataType getBeadSummaryType() |
560 |
29 Jan 08 |
nicklas |
116 |
{ |
572 |
06 Feb 08 |
martin |
117 |
return RawDataTypes.getRawDataType(BEAD_SUMMARY_ID); |
560 |
29 Jan 08 |
nicklas |
118 |
} |
556 |
28 Jan 08 |
nicklas |
119 |
|
624 |
10 Mar 08 |
nicklas |
120 |
/** |
624 |
10 Mar 08 |
nicklas |
Get the {@link RawDataType} representing the Illumina SNP |
624 |
10 Mar 08 |
nicklas |
raw data type. |
624 |
10 Mar 08 |
nicklas |
@return A raw data type (null if this type is not present) |
624 |
10 Mar 08 |
nicklas |
124 |
*/ |
624 |
10 Mar 08 |
nicklas |
125 |
public static final RawDataType getSnpType() |
624 |
10 Mar 08 |
nicklas |
126 |
{ |
624 |
10 Mar 08 |
nicklas |
127 |
return RawDataTypes.getRawDataType("variant." + SNP_VARIANT_ID); |
624 |
10 Mar 08 |
nicklas |
128 |
} |
556 |
28 Jan 08 |
nicklas |
129 |
|
1385 |
02 Sep 11 |
martin |
130 |
/** |
1385 |
02 Sep 11 |
martin |
Check if the item is using the Illumina-platform. |
1385 |
02 Sep 11 |
martin |
@param item Item to check. Null is not allowed. |
1385 |
02 Sep 11 |
martin |
@return TRUE if platform is used, FALSE otherwise |
1385 |
02 Sep 11 |
martin |
134 |
*/ |
1385 |
02 Sep 11 |
martin |
135 |
public static boolean isIllumina(FileStoreEnabled item) |
1385 |
02 Sep 11 |
martin |
136 |
{ |
1385 |
02 Sep 11 |
martin |
137 |
if (item == null) throw new InvalidUseOfNullException("item"); |
1385 |
02 Sep 11 |
martin |
138 |
Platform platform = item.getPlatform(); |
1385 |
02 Sep 11 |
martin |
139 |
if(platform == null || !Illumina.PLATFORM_ID.equals(platform.getExternalId())) |
1385 |
02 Sep 11 |
martin |
140 |
{ |
1385 |
02 Sep 11 |
martin |
141 |
return false; |
1385 |
02 Sep 11 |
martin |
142 |
} |
1385 |
02 Sep 11 |
martin |
143 |
return true; |
1385 |
02 Sep 11 |
martin |
144 |
} |
556 |
28 Jan 08 |
nicklas |
145 |
} |