Changeset 1385
- Timestamp:
- Sep 2, 2011, 3:39:29 PM (12 years ago)
- Location:
- plugins/base2/net.sf.basedb.illumina/trunk
- Files:
-
- 6 added
- 3 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/base2/net.sf.basedb.illumina/trunk/META-INF/extensions.xml
r1267 r1385 28 28 <name>Illumina extensions</name> 29 29 <version>1.7pre</version> 30 <copyright>BASE 2development team</copyright>30 <copyright>BASE development team</copyright> 31 31 <email>basedb-users@lists.sourceforge.net</email> 32 <url>http://baseplugins.thep.lu.se/wiki/net.sf.basedb.illumina</url> 32 <url>http://baseplugins.thep.lu.se/wiki/net.sf.basedb.illumina</url> 33 <minbaserversion>3.0</minbaserversion> 33 34 </about> 35 <plugin-definition id="Installer"> 36 <about> 37 <name>Illumina plug-in package installer</name> 38 <description> 39 This plug-in will install required platforms, data files types, etc. that 40 are required to use the Illumina plug-ins. Start the installation by selecting this 41 plug-in from the list at Administrate -> Plugins -> Definitions. Then click on the 42 'Run plugin' button. 43 </description> 44 </about> 45 <plugin-class>net.sf.basedb.illumina.install.Install</plugin-class> 46 </plugin-definition> 47 <plugin-definition id="ExpressionBackgroundCorrection"> 48 <about> 49 <name>Illumina expression background correction</name> 50 <description> 51 This plug-in will remove a per-slide global background from all 52 spots. The background is calculated from a set of negative control 53 spots on the array.\n\n 54 Each assay is treated separately, i.e., no samples are combined 55 together. All calculations are made on the current bioassay data 56 implying that this plug-in should be used early in analysis and before 57 background spots are removed.\n\n 58 A spot is considered to be a negative control spot if it has an 59 ''Control group name'' exactly matching the string ''negative''.\n\n 60 There is one parameter to set that specifies how background 61 intensities should be calculated. Allowed values are median or mean, 62 i.e. the background is either the median or the mean of the negative 63 control spots on the array.\n\n 64 The expression of the background probes is optionally saved to a 65 file. The default is not to save the expression matrix but this can be 66 changed during job configuration. 67 </description> 68 </about> 69 <plugin-class>net.sf.basedb.illumina.plugins.BackgroundCorrection</plugin-class> 70 </plugin-definition> 71 <plugin-definition id="BeadSummaryImporter"> 72 <about> 73 <name>Illumina Bead Summary importer</name> 74 <description> 75 Raw data importer for Illumina bead summary files. This plug-in can import data from one 76 or more related bead summary files that are part of the same array but different stripes. 77 </description> 78 </about> 79 <plugin-class>net.sf.basedb.illumina.plugins.BeadSummaryImporter</plugin-class> 80 </plugin-definition> 81 <plugin-definition id="BgxFeatureImporter"> 82 <about> 83 <name>Illumina BGX feature importer</name> 84 <description> 85 Plugin that imports features from a Illumina BGX-file. 86 Both compressed(gzip) and uncompressed files are supported. 87 None of the mappings for the [Controls] section are configurable. 88 These are set like follows:\n 89 Identify features by->FEATURE_ID\nReporter ID->\\Probe_Id\\\nFeature ID->\\Array_Address_Id\\\n 90 Reg exp for data header is preconfigured to 'Probe_Id\\tArray_Address_Id.*' 91 </description> 92 </about> 93 <plugin-class>net.sf.basedb.illumina.plugins.BgxFeatureImporter</plugin-class> 94 </plugin-definition> 95 <plugin-definition id="BgxReporterImporter"> 96 <about> 97 <name>Illumina BGX reporter importer</name> 98 <description> 99 Imports reporter annotation from Illumina BGX files. This importer is 100 based on the regular reporter importer and has the same features and functions. 101 It supports both compressed and uncompressed BGX files. File format configurations 102 made for this plug-in applies to the [Probes] section only. Column mappings for the 103 [Controls] section can't be configured. Some controls appear more than one time 104 in the [Controls] section. If the they have different values for the any of the 105 Reporter_Group_Name, Reporter_Group_Id and/or Reporter_Composite_Map columns the values 106 are merged with a ; as separator. 107 </description> 108 </about> 109 <plugin-class>net.sf.basedb.illumina.plugins.BgxReporterImporter</plugin-class> 110 </plugin-definition> 111 <plugin-definition id="DetectionPvalueCalculation"> 112 <about> 113 <name>Illumina detection P-value calculation</name> 114 <description> 115 This plug-in implements BeadStudio like detection P-value calculations 116 for Illumina expression data.\n\n 117 The plug-in will _always_ base the detection P-value calculation on 118 raw data values, i.e., the mean raw intensity for the different 119 signals. By default the calculations are based on negative controls 120 available in the root bioassay set for the current analysis 121 branch. The user may change this to only use negative controls in the 122 current bioassay set.\n\n 123 The detection P-value plug-in does not filter the assays, it provides 124 the detection P-values usable in a filter step after running this 125 plug-in.\n\n 126 Parameters\n 127 - The plug-in requires input of array type since detection P-value are 128 calculated differently depending on array type.\n 129 - Users may select to use negative controls in the current bioassay set 130 only. The default behaviour is to use all negative controls in the 131 root bioassay set for the current bioassay set.\n 132 - A cut off parameter is available to exclude outliers within 133 the negative controls. The `cutoff` defines the acceptable negative 134 control signal range 135 $median-MAD*cutoff < I < median+MAD*cutoff$ 136 where $MAD$ is the median absolute deviation.\n\n 137 Implementation details\n\n 138 Each assay is treated separately, i.e., no samples are combined 139 together. All calculations are made on the raw bead-type level data, 140 i.e., on the average expression value for each bead type and raw data 141 is always used irrespective when in analysis the detection P-value is 142 calculated.\n\n 143 Pvalue calculation for whole genome arrays:\n 144 For all signals $i$ calculate the detection P-value as 145 $Pvalue = 1-R/N$ where $R$ is the rank of the signal $i$ relative to the 146 negative controls and $N$ is the number of negative controls.\n\n 147 Pvalue calculation for others array types (DASL, miRNA, VeraCode DASL, 148 and Focused Arrays):\n 149 For all signals $i$ calculate the detection P-value as 150 $Pvalue = 1/2 - 1/2 * erf( [i-AvgControl]/StdControl/sqrt(2) )$ where 151 $AvgControl$ is the average intensity of the negative controls, 152 $StdControl$ is the standard deviation of the the negative controls, 153 and $erf$ is the error function 154 (http://mathworld.wolfram.com/Erf.html). The error function is used 155 for arguments within the range (-4,4). To save CPU cycles, the function 156 value for arguments outside this range is set to -1 and 1, 157 respectively.\n\n 158 More details about this plug-in is found at the URL 159 \n\n Please send feedback to the email-address 160 </description> 161 </about> 162 <plugin-class>net.sf.basedb.illumina.plugins.DetectionPValue</plugin-class> 163 </plugin-definition> 164 <plugin-definition id="SnpRootBioAssaysetCreator"> 165 <about> 166 <name>Illumina SNP root bioassayset creator</name> 167 <description> 168 Creates a root bioassay set from Illumina SNP data. This plug-in works 169 only if all raw bioassays has the same array design and SNP split data files 170 are present. The root bioassayset is created by copying values from the data files 171 as follows:\n 172 * Channel 1 = GType (AA = 1.0, AB = 0.0, BB = -1.0, NC = null\n 173 * Channel 2 = Log R Ratio\n 174 * Channel 3 = B Allele Freq 175 </description> 176 </about> 177 <plugin-class>net.sf.basedb.illumina.plugins.SnpIntensityCalculator</plugin-class> 178 </plugin-definition> 179 <plugin-definition id="SnpRawDataImporter"> 180 <about> 181 <name>Illumina SNP raw data importer</name> 182 <description> 183 This plug-in is used to import raw data for Illumina SNP from a tab separated text file. The plug-in can be 184 executed both from the list of raw bioassays and from within an experiment. In the 185 last case the imported data will be associated with the experiment 186 </description> 187 </about> 188 <plugin-class>net.sf.basedb.illumina.plugins.SnpRawDataImporter</plugin-class> 189 </plugin-definition> 190 <plugin-definition id="SnpReporterImporter"> 191 <about> 192 <name>Illumina SNP reporter importer</name> 193 <description> 194 Imports reporters from SNP manifest files. This importer works exactly 195 as the regular reporter importer and has the same features. 196 </description> 197 </about> 198 <plugin-class>net.sf.basedb.illumina.plugins.SnpReporterImporter</plugin-class> 199 </plugin-definition> 34 200 <extension 35 201 id="net.sf.basedb.illumina.extensions.overviewplots.illuminaPlots" -
plugins/base2/net.sf.basedb.illumina/trunk/build.xml
r1293 r1385 15 15 <property name="name" value="illumina-plugins" /> 16 16 <property name="version" value="1.7pre" /> 17 <property name="minbaseversion" value=" 2.17"17 <property name="minbaseversion" value="3.0" 18 18 description="Minimal BASE version required by the plug-ins" /> 19 19 <property name="src" location="src" description="Location of source files" /> … … 26 26 <property name="javac.encoding" value="UTF-8" /> 27 27 <property name="depend.jars" 28 value="http://base2.thep.lu.se/base/jars/ 2.17.0"28 value="http://base2.thep.lu.se/base/jars/" 29 29 description="The location of the BASE core JARs that we depend on" 30 30 /> … … 113 113 <copy todir="${build}"> 114 114 <fileset dir="." includes="META-INF/*"/> 115 </copy> 116 <replace token="%%plugins.jar%%" value="${jar}" file="${build}/META-INF/base-plugins.xml" /> 115 </copy> 117 116 <jar 118 117 jarfile="${dist}/${jar}" … … 140 139 encoding="UTF-8" 141 140 /> 142 143 <echo>base-plugins.xml</echo> 144 <replaceregexp 145 file="META-INF/base-plugins.xml" 146 match="<minbaseversion>.*</minbaseversion>" 147 replace="<minbaseversion>${minbaseversion}</minbaseversion>" 148 encoding="UTF-8" 149 flags="g" 150 /> 141 151 142 <echo>Don't forget to commit the changes to the subversion repository!</echo> 152 143 </target> … … 154 145 <target 155 146 name="checkjar" 156 description="Checks that the BASE2Core.jar, BASE2Webclient, BASE2CorePlugins.jar and BASE2WSClient.jar exists."147 description="Checks that the base-core-3.0.0.jar, base-webclient-3.0.0.jar, base-coreplugins-3.0.0.jar and base-webclient-3.0.0.jar exists." 157 148 > 158 149 <available classname="net.sf.basedb.core.Application" 159 classpathref="classpath" property="base 2core" />150 classpathref="classpath" property="base3core" /> 160 151 <available classname="net.sf.basedb.plugins.ReporterFlatFileImporter" 161 classpathref="classpath" property="base 2coreplugins" />152 classpathref="classpath" property="base3coreplugins" /> 162 153 <available classname="net.sf.basedb.ws.client.SessionClient" 163 classpathref="classpath" property="base 2wsclient" />154 classpathref="classpath" property="base3wsclient" /> 164 155 <available classname="net.sf.basedb.clients.web.extensions.menu.FixedMenuItemFactory" 165 classpathref="classpath" property="base 2web" />166 <fail unless="base 2core" message="Can't find BASE2Core.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />167 <fail unless="base 2coreplugins" message="Can't find BASE2CorePlugins.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />168 <fail unless="base 2wsclient" message="Can't find BASE2WSClient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />169 <fail unless="base 2web" message="Can't find BASE2Webclient.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." />170 <echo>Found BASE2Core.jar, BASE2CorePlugins.jar, BASE2Webclient.jar and BASE2WSClient.jar.</echo>156 classpathref="classpath" property="base3web" /> 157 <fail unless="base3core" message="Can't find base-core-3.0.0.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> 158 <fail unless="base3coreplugins" message="Can't find base-coreplugins-3.0.0.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> 159 <fail unless="base3wsclient" message="Can't find base-webservices-client-3.0.0.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> 160 <fail unless="base3web" message="Can't find base-webclient-3.0.0.jar in ./lib/compile. Try 'ant download-lib' to download the missing file." /> 161 <echo>Found base-core-3.0.0.jar, base-coreplugins-3.0.0.jar, base-webservices-client-3.0.0.jar and base-webclient-3.0.0.jar.</echo> 171 162 </target> 172 163 173 164 <target 174 165 name="download-lib" 175 description="Download BASE2Core.jar, BASE2CorePlugins.jar and BASE2WSClient.jar."166 description="Download base-webclient-3.0.0.jar, base-core-3.0.0.jar, base-coreplugins-3.0.0.jar and base-webservices-client-3.0.0.jar" 176 167 > 177 168 <echo> … … 182 173 ------------------------------------------------------- 183 174 </echo> 184 <download-lib file=" BASE2Core.jar" />185 <download-lib file=" BASE2CorePlugins.jar" />186 <download-lib file=" BASE2WSClient.jar" />187 <download-lib file=" BASE2Webclient.jar" />175 <download-lib file="base-core-3.0.0.jar" /> 176 <download-lib file="base-coreplugins-3.0.0.jar" /> 177 <download-lib file="base-webservices-client-3.0.0.jar" /> 178 <download-lib file="base-webclient-3.0.0.jar" /> 188 179 </target> 189 180 -
plugins/base2/net.sf.basedb.illumina/trunk/lib/compile
- Property svn:ignore
-
old new 3 3 BASE2WSClient.jar 4 4 BASE2Webclient.jar 5 base-core-3.0.0.jar 6 base-coreplugins-3.0.0.jar 7 base-webclient-3.0.0.jar 8 base-webservices-client-3.0.0.jar
-
- Property svn:ignore
-
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/Illumina.java
r1267 r1385 23 23 package net.sf.basedb.illumina; 24 24 25 import net.sf.basedb.core.FileStoreEnabled; 26 import net.sf.basedb.core.InvalidUseOfNullException; 27 import net.sf.basedb.core.Platform; 25 28 import net.sf.basedb.core.RawDataType; 26 29 import net.sf.basedb.core.RawDataTypes; … … 32 35 33 36 /** 34 The current version of this plug-in package.35 */36 public static final String VERSION = "1.7pre";37 38 /**39 37 The URL where more information about this plug-in package can 40 38 be found. 41 39 */ 42 40 public static final String URL = "http://baseplugins.thep.lu.se/wiki/net.sf.basedb.illumina"; 43 44 /** 45 The copyright holders of the plug-ins. 46 */ 47 public static final String COPYRIGHT = "BASE 2 development team"; 48 49 /** 50 The email address to use for support and more information. 51 */ 52 public static final String EMAIL = "basedb-users@lists.sourceforge.net"; 53 41 54 42 /** 55 43 The ID for the main Illumina platform item. Use … … 145 133 } 146 134 135 /** 136 Check if the item is using the Illumina-platform. 137 @param item Item to check. Null is not allowed. 138 @return TRUE if platform is used, FALSE otherwise 139 */ 140 public static boolean isIllumina(FileStoreEnabled item) 141 { 142 if (item == null) throw new InvalidUseOfNullException("item"); 143 Platform platform = item.getPlatform(); 144 if(platform == null || !Illumina.PLATFORM_ID.equals(platform.getExternalId())) 145 { 146 return false; 147 } 148 return true; 149 } 147 150 } -
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/install/Install.java
r1237 r1385 22 22 */ 23 23 package net.sf.basedb.illumina.install; 24 25 import net.sf.basedb.core.BaseException;26 import net.sf.basedb.core.Coloring;27 import net.sf.basedb.core.DataFileType;28 import net.sf.basedb.core.DbControl;29 import net.sf.basedb.core.ExtraValueType;30 import net.sf.basedb.core.FileType;31 import net.sf.basedb.core.Formula;32 import net.sf.basedb.core.Hardware;33 import net.sf.basedb.core.HardwareType;34 import net.sf.basedb.core.InvalidDataException;35 import net.sf.basedb.core.Item;36 import net.sf.basedb.core.ItemAlreadyExistsException;37 import net.sf.basedb.core.ItemNotFoundException;38 import net.sf.basedb.core.Job;39 import net.sf.basedb.core.Permission;40 import net.sf.basedb.core.Platform;41 import net.sf.basedb.core.PlatformVariant;42 import net.sf.basedb.core.PluginDefinition;43 import net.sf.basedb.core.PluginParameter;44 import net.sf.basedb.core.ProgressReporter;45 import net.sf.basedb.core.RawDataType;46 import net.sf.basedb.core.RequestInformation;47 import net.sf.basedb.core.Software;48 import net.sf.basedb.core.SoftwareType;49 import net.sf.basedb.core.StringParameterType;50 import net.sf.basedb.core.SystemItems;51 import net.sf.basedb.core.Type;52 import net.sf.basedb.core.plugin.About;53 import net.sf.basedb.core.plugin.AboutImpl;54 import net.sf.basedb.core.plugin.AbstractPlugin;55 import net.sf.basedb.core.plugin.GuiContext;56 import net.sf.basedb.core.plugin.InteractivePlugin;57 import net.sf.basedb.core.plugin.Permissions;58 import net.sf.basedb.core.plugin.Plugin;59 import net.sf.basedb.core.plugin.Request;60 import net.sf.basedb.core.plugin.Response;61 import net.sf.basedb.illumina.Illumina;62 24 63 25 import java.util.ArrayList; … … 72 34 import java.util.Map; 73 35 import java.util.Set; 36 37 import net.sf.basedb.core.BaseException; 38 import net.sf.basedb.core.Coloring; 39 import net.sf.basedb.core.DataFileType; 40 import net.sf.basedb.core.DbControl; 41 import net.sf.basedb.core.ExtraValueType; 42 import net.sf.basedb.core.File; 43 import net.sf.basedb.core.Formula; 44 import net.sf.basedb.core.Hardware; 45 import net.sf.basedb.core.InvalidDataException; 46 import net.sf.basedb.core.Item; 47 import net.sf.basedb.core.ItemAlreadyExistsException; 48 import net.sf.basedb.core.ItemNotFoundException; 49 import net.sf.basedb.core.ItemSubtype; 50 import net.sf.basedb.core.Job; 51 import net.sf.basedb.core.Permission; 52 import net.sf.basedb.core.Platform; 53 import net.sf.basedb.core.PlatformVariant; 54 import net.sf.basedb.core.PluginDefinition; 55 import net.sf.basedb.core.PluginParameter; 56 import net.sf.basedb.core.ProgressReporter; 57 import net.sf.basedb.core.RawDataType; 58 import net.sf.basedb.core.RequestInformation; 59 import net.sf.basedb.core.Software; 60 import net.sf.basedb.core.StringParameterType; 61 import net.sf.basedb.core.SystemItems; 62 import net.sf.basedb.core.Type; 63 import net.sf.basedb.core.plugin.AbstractPlugin; 64 import net.sf.basedb.core.plugin.GuiContext; 65 import net.sf.basedb.core.plugin.InteractivePlugin; 66 import net.sf.basedb.core.plugin.Permissions; 67 import net.sf.basedb.core.plugin.Plugin; 68 import net.sf.basedb.core.plugin.Request; 69 import net.sf.basedb.core.plugin.Response; 70 import net.sf.basedb.illumina.Illumina; 74 71 75 72 /** … … 114 111 implements InteractivePlugin 115 112 { 116 private static final About about = new AboutImpl(117 "Illumina plug-in package installer",118 "This plug-in will install required platforms, data files types, etc. that " +119 "are required to use the Illumina plug-ins. Start the installation by selecting this " +120 "plug-in from the list at Administrate -> Plugins -> Definitions. Then click on the " +121 "'Run plugin' button.",122 Illumina.VERSION,123 Illumina.COPYRIGHT,124 null,125 Illumina.EMAIL,126 Illumina.URL127 );128 113 129 114 private static final Set<GuiContext> guiContexts = … … 210 195 ------------------------------------------- 211 196 */ 212 public About getAbout()213 {214 return about;215 }216 197 @Override 217 198 public Collection<Permissions> getPermissions() … … 223 204 permissions.add(new Permissions(Item.EXTRAVALUETYPE, null, EnumSet.of(Permission.CREATE))); 224 205 permissions.add(new Permissions(Item.PLUGINDEFINITION, null, EnumSet.of(Permission.READ))); 225 permissions.add(new Permissions(Item.FILETYPE, null, EnumSet.of(Permission.READ))); 226 permissions.add(new Permissions(Item.HARDWARETYPE, null, EnumSet.of(Permission.USE))); 227 permissions.add(new Permissions(Item.HARDWARE, null, EnumSet.of(Permission.CREATE))); 228 permissions.add(new Permissions(Item.SOFTWARETYPE, null, EnumSet.of(Permission.USE))); 206 permissions.add(new Permissions(Item.ITEMSUBTYPE, null, EnumSet.of(Permission.READ))); 207 permissions.add(new Permissions(Item.HARDWARE, null, EnumSet.of(Permission.CREATE))); 229 208 permissions.add(new Permissions(Item.SOFTWARE, null, EnumSet.of(Permission.CREATE))); 230 209 permissions.add(new Permissions(Item.FORMULA, null, EnumSet.of(Permission.CREATE))); … … 455 434 String beadSummaryTypePrefix = "illlumina.ibs."; 456 435 457 FileType reporterMapType = null;458 FileType rawDataType = null;436 ItemSubtype reporterMapType = null; 437 ItemSubtype rawDataType = null; 459 438 460 439 Iterator<Integer> expressionTypeIterator = expressionTypes.iterator(); … … 465 444 } 466 445 467 reporterMapType = FileType.getById(dc, SystemItems.getId("net.sf.basedb.core.FileType.REPORTER_MAP"));468 rawDataType = FileType.getById(dc, SystemItems.getId("net.sf.basedb.core.FileType.RAW_DATA"));446 reporterMapType = ItemSubtype.getById(dc, SystemItems.getId(File.REPORTER_MAP)); 447 rawDataType = ItemSubtype.getById(dc, SystemItems.getId(File.RAW_DATA)); 469 448 470 449 //Data file types … … 771 750 */ 772 751 private DataFileType createDataFileType(DbControl dc, String externalId, String name, 773 String description, Item itemType, String extension, FileType genericType,752 String description, Item itemType, String extension, ItemSubtype genericType, 774 753 String validatorClass, String metadataReaderClass, String jarPath, boolean ignoreExistingItem) 775 754 throws ItemAlreadyExistsException … … 786 765 if (extension != null && !extension.equals(dft.getExtension())) message += dft.getName() + " has invalid extension.\n"; 787 766 if (!itemType.equals(dft.getItemType())) message += dft.getName() + " has invalid item type.\n"; 788 if (validatorClass != null && !validatorClass.equals(dft.getValidatorClass())) message += "Validator class used: " + dft.getValidatorClass() + ", expected: " + validatorClass; 789 if (metadataReaderClass != null && !metadataReaderClass.equals(dft.getMetadataReaderClass())) message += "Metadata class used: " + dft.getMetadataReaderClass() + ", expected: " + metadataReaderClass; 767 // if (validatorClass != null && !validatorClass.equals(dft.getValidatorClass())) message += "Validator class used: " + dft.getValidatorClass() + ", expected: " + validatorClass; 768 // if (metadataReaderClass != null && !metadataReaderClass.equals(dft.getMetadataReaderClass())) message += "Metadata class used: " + dft.getMetadataReaderClass() + ", expected: " + metadataReaderClass; 769 790 770 if (message != null) throw new ItemAlreadyExistsException(message + " The existing datafiletype, '" + dft.getName() + "' can not be used."); 791 771 … … 793 773 if (jarPath != null) 794 774 { 795 dft.setMetadataReaderJarPath(jarPath);796 dft.setValidatorJarPath(jarPath);775 // dft.setMetadataReaderJarPath(jarPath); 776 // dft.setValidatorJarPath(jarPath); 797 777 } 798 778 } … … 805 785 dft.setDescription(description); 806 786 dft.setGenericType(genericType); 807 dft.setValidatorClass(validatorClass);808 dft.setValidatorJarPath(jarPath);809 dft.setMetadataReaderClass(metadataReaderClass);810 dft.setMetadataReaderJarPath(jarPath);787 // dft.setValidatorClass(validatorClass); 788 // dft.setValidatorJarPath(jarPath); 789 // dft.setMetadataReaderClass(metadataReaderClass); 790 // dft.setMetadataReaderJarPath(jarPath); 811 791 } 812 792 return dft; … … 904 884 public Hardware createScanner(DbControl dc, String name, String version, String description) 905 885 { 906 HardwareType scannerType = HardwareType.getById(dc, SystemItems.getId(HardwareType.SCANNER)); 907 Hardware scanner = Hardware.getNew(dc, scannerType); 886 ItemSubtype scannerType = ItemSubtype.getById(dc, SystemItems.getId(Hardware.SCANNER)); 887 Hardware scanner = Hardware.getNew(dc); 888 scanner.setItemSubtype(scannerType); 908 889 scanner.setName(name); 909 890 scanner.setVersionString(version); … … 915 896 public Software createSoftware(DbControl dc, String name, String version, String description) 916 897 { 917 SoftwareType featureExtraction = SoftwareType.getById(dc, SystemItems.getId(SoftwareType.FEATURE_EXTRACTION)); 918 Software software = Software.getNew(dc, featureExtraction); 898 ItemSubtype featureExtraction = ItemSubtype.getById(dc, SystemItems.getId(Software.FEATURE_EXTRACTION)); 899 Software software = Software.getNew(dc); 900 software.setItemSubtype(featureExtraction); 919 901 software.setName(name); 920 902 software.setVersionString(version); -
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/plugins/BackgroundCorrection.java
r1293 r1385 23 23 24 24 package net.sf.basedb.illumina.plugins; 25 26 import java.io.PrintWriter; 27 import java.sql.SQLException; 28 import java.util.ArrayList; 29 import java.util.Arrays; 30 import java.util.Collection; 31 import java.util.EnumSet; 32 import java.util.HashMap; 33 import java.util.HashSet; 34 import java.util.Iterator; 35 import java.util.List; 36 import java.util.Set; 37 import java.util.TreeSet; 38 import java.util.Vector; 25 39 26 40 import net.sf.basedb.core.AnyToAny; … … 48 62 import net.sf.basedb.core.Type; 49 63 import net.sf.basedb.core.VirtualColumn; 50 import net.sf.basedb.core.plugin.About;51 import net.sf.basedb.core.plugin.AboutImpl;52 64 import net.sf.basedb.core.plugin.AbstractAnalysisPlugin; 53 65 import net.sf.basedb.core.plugin.GuiContext; … … 72 84 import net.sf.basedb.util.Values; 73 85 74 import java.io.PrintWriter;75 import java.sql.SQLException;76 import java.util.ArrayList;77 import java.util.Arrays;78 import java.util.Collection;79 import java.util.EnumSet;80 import java.util.HashMap;81 import java.util.HashSet;82 import java.util.Iterator;83 import java.util.List;84 import java.util.Set;85 import java.util.TreeSet;86 import java.util.Vector;87 88 86 89 87 /** … … 100 98 { 101 99 102 private static final About about = new AboutImpl 103 ( "Illumina expression background correction", 104 "This plug-in will remove a per-slide global background from all " + 105 "spots. The background is calculated from a set of negative control " + 106 "spots on the array.\n\n" + 107 "Each assay is treated separately, i.e., no samples are combined " + 108 "together. All calculations are made on the current bioassay data " + 109 "implying that this plug-in should be used early in analysis and before " + 110 "background spots are removed.\n\n" + 111 "A spot is considered to be a negative control spot if it has an " + 112 "''Control group name'' exactly matching the string ''negative''.\n\n" + 113 "There is one parameter to set that specifies how background " + 114 "intensities should be calculated. Allowed values are median or mean, " + 115 "i.e. the background is either the median or the mean of the negative " + 116 "control spots on the array.\n\n" + 117 "The expression of the background probes is optionally saved to a " + 118 "file. The default is not to save the expression matrix but this can be " + 119 "changed during job configuration.\n\n" + 120 "Please send feedback to " + 121 Illumina.EMAIL, 122 Illumina.VERSION, 123 Illumina.COPYRIGHT, 124 null, 125 Illumina.EMAIL, 126 Illumina.URL 127 ); 100 private static final String pluginName = "Illumina expression background correction"; 128 101 129 102 /** … … 297 270 298 271 // From the Plugin interface 299 @Override300 public About getAbout()301 {302 return about;303 }304 305 306 272 private RequestInformation getConfigureJobParameters() 307 273 { … … 500 466 // Create Transformation 501 467 Transformation t = source.newTransformation(thisJob); 502 t.setName( about.getName());468 t.setName(pluginName); 503 469 dc.saveItem(t); 504 470 … … 541 507 Directory expDir=source.getExperiment().getDirectory(); 542 508 File bgData=File.getFile(dc, expDir, 543 about.getName()+ "_backgroundProbes_" +509 pluginName + "_backgroundProbes_" + 544 510 thisJob.getId() + ".txt", true); 545 511 bgData.setLocation(Location.PRIMARY); … … 554 520 555 521 bgWriter = new PrintWriter(bgData.getUploadStream(false,true)); 556 bgWriter.println("# File generated by plug-in: " + about.getName());522 bgWriter.println("# File generated by plug-in: " + pluginName); 557 523 bgWriter.println("#\n# Background based on " + 558 524 ( method.equals("Illumina BeadStudio median") ? -
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/plugins/BeadSummaryImporter.java
r1293 r1385 68 68 import net.sf.basedb.core.StringParameterType; 69 69 import net.sf.basedb.core.data.RawData; 70 import net.sf.basedb.core.plugin.About;71 import net.sf.basedb.core.plugin.AboutImpl;72 70 import net.sf.basedb.core.plugin.AbstractPlugin; 73 71 import net.sf.basedb.core.plugin.GuiContext; … … 119 117 implements InteractivePlugin, SignalTarget 120 118 { 121 122 private static final About about = new AboutImpl(123 "Illumina Bead Summary importer",124 "Raw data importer for Illumina bead summary files. This plug-in can import data from one " +125 "or more related bead summary files that are part of the same array but different stripes.",126 Illumina.VERSION,127 Illumina.COPYRIGHT,128 null,129 Illumina.EMAIL,130 Illumina.URL131 );132 119 133 120 private static final Set<GuiContext> guiContexts = … … 194 181 ------------------------------------------- 195 182 */ 196 @Override 197 public About getAbout() 198 { 199 return about; 200 } 201 @Override 183 @Override 202 184 public boolean requiresConfiguration() 203 185 { … … 551 533 int id = currentRaw == null ? sc.getCurrentContext(Item.RAWBIOASSAY).getId() : currentRaw.getId(); 552 534 if (id != 0) currentRaw = RawBioAssay.getById(dc, id); 553 addRawBioAssayParameters(dc, currentRaw, parameters );535 addRawBioAssayParameters(dc, currentRaw, parameters, true); 554 536 } 555 537 else … … 595 577 } 596 578 597 private void addRawBioAssayParameters(DbControl dc, RawBioAssay currentRaw, List<PluginParameter<?>> parameters )579 private void addRawBioAssayParameters(DbControl dc, RawBioAssay currentRaw, List<PluginParameter<?>> parameters, boolean requireValid) 598 580 { 599 581 // Parameter for getting the current raw bioassay … … 614 596 { 615 597 DataFileType dft = pft.getDataFileType(); 616 File f = FileStoreUtil.getDataFile(dc, currentRaw, dft.getExternalId() );598 File f = FileStoreUtil.getDataFile(dc, currentRaw, dft.getExternalId(), requireValid); 617 599 618 600 PluginParameter<File> fileParameter = new PluginParameter<File>( -
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/plugins/BgxFeatureImporter.java
r1293 r1385 22 22 */ 23 23 package net.sf.basedb.illumina.plugins; 24 25 import java.io.IOException; 26 import java.io.InputStream; 27 import java.io.PushbackInputStream; 28 import java.util.HashMap; 29 import java.util.List; 30 import java.util.Map; 31 import java.util.regex.Pattern; 32 import java.util.zip.GZIPInputStream; 24 33 25 34 import net.sf.basedb.core.ArrayDesign; … … 34 43 import net.sf.basedb.core.PluginDefinition; 35 44 import net.sf.basedb.core.SessionControl; 36 import net.sf.basedb.core.plugin.About;37 import net.sf.basedb.core.plugin.AboutImpl;38 45 import net.sf.basedb.core.plugin.GuiContext; 39 46 import net.sf.basedb.core.plugin.InteractivePlugin; … … 41 48 import net.sf.basedb.core.plugin.Request; 42 49 import net.sf.basedb.core.plugin.Response; 43 import net.sf.basedb.illumina.Illumina;44 50 import net.sf.basedb.plugins.ReporterMapFlatFileImporter; 45 51 import net.sf.basedb.util.FileUtil; 46 52 import net.sf.basedb.util.InputStreamTracker; 47 53 import net.sf.basedb.util.parser.FlatFileParser; 54 import net.sf.basedb.util.parser.FlatFileParser.Line; 48 55 import net.sf.basedb.util.parser.Mapper; 49 56 import net.sf.basedb.util.parser.WrappedConfigureByExample; 50 import net.sf.basedb.util.parser.FlatFileParser.Line;51 52 import java.io.IOException;53 import java.io.InputStream;54 import java.io.PushbackInputStream;55 import java.util.HashMap;56 import java.util.List;57 import java.util.Map;58 import java.util.regex.Pattern;59 import java.util.zip.GZIPInputStream;60 57 61 58 /** … … 75 72 { 76 73 77 private static final About about = new AboutImpl(78 "Illumina BGX feature importer",79 "Plugin that imports features from a Illumina BGX-file. " +80 "Both compressed(gzip) and uncompressed files are supported. " +81 "None of the mappings for the [Controls] section are configurable. " +82 "These are set like follows:\n" +83 "Identify features by->FEATURE_ID\nReporter ID->\\Probe_Id\\\nFeature ID->\\Array_Address_Id\\\n" +84 "Reg exp for data header is preconfigured to 'Probe_Id\\tArray_Address_Id.*'",85 Illumina.VERSION,86 Illumina.COPYRIGHT,87 null,88 Illumina.EMAIL,89 Illumina.URL90 );91 74 /** 92 75 Needed for progress reporting when reading from a compressed … … 114 97 ------------------------------------------- 115 98 */ 116 @Override117 public About getAbout()118 {119 return about;120 }121 99 @Override 122 100 public void init(SessionControl sc, ParameterValues configuration, ParameterValues job) -
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/plugins/BgxReporterImporter.java
r1187 r1385 41 41 import net.sf.basedb.core.PluginDefinition; 42 42 import net.sf.basedb.core.SessionControl; 43 import net.sf.basedb.core.plugin.About;44 import net.sf.basedb.core.plugin.AboutImpl;45 43 import net.sf.basedb.core.plugin.InteractivePlugin; 46 44 import net.sf.basedb.core.plugin.ParameterValues; 47 import net.sf.basedb.illumina.Illumina;48 45 import net.sf.basedb.plugins.ReporterFlatFileImporter; 49 46 import net.sf.basedb.util.FileUtil; 50 47 import net.sf.basedb.util.InputStreamTracker; 51 48 import net.sf.basedb.util.parser.FlatFileParser; 49 import net.sf.basedb.util.parser.FlatFileParser.Line; 52 50 import net.sf.basedb.util.parser.WrappedConfigureByExample; 53 import net.sf.basedb.util.parser.FlatFileParser.Line;54 51 55 52 /** … … 76 73 implements InteractivePlugin, WrappedConfigureByExample 77 74 { 78 79 private static final About about = new AboutImpl(80 "Illumina BGX reporter importer",81 "Imports reporter annotation from Illumina BGX files. This importer is " +82 "based on the regular reporter importer and has the same features and functions. " +83 "It supports both compressed and uncompressed BGX files. File format configurations " +84 "made for this plug-in applies to the [Probes] section only. Column mappings for the " +85 "[Controls] section can't be configured. Some controls appear more than one time " +86 "in the [Controls] section. If the they have different values for the any of the " +87 "Reporter_Group_Name, Reporter_Group_Id and/or Reporter_Composite_Map columns the values " +88 "are merged with a ; as separator.",89 Illumina.VERSION,90 Illumina.COPYRIGHT,91 null,92 Illumina.EMAIL,93 Illumina.URL94 );95 75 96 76 /** … … 119 99 ------------------------------------------- 120 100 */ 121 @Override122 public About getAbout()123 {124 return about;125 }126 101 @Override 127 102 public void init(SessionControl sc, ParameterValues configuration, ParameterValues job) -
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/plugins/DetectionPValue.java
r1293 r1385 23 23 24 24 package net.sf.basedb.illumina.plugins; 25 26 import java.sql.SQLException; 27 import java.util.ArrayList; 28 import java.util.Arrays; 29 import java.util.Collection; 30 import java.util.EnumSet; 31 import java.util.HashSet; 32 import java.util.List; 33 import java.util.Set; 25 34 26 35 import net.sf.basedb.core.BaseException; … … 45 54 import net.sf.basedb.core.Type; 46 55 import net.sf.basedb.core.VirtualColumn; 47 import net.sf.basedb.core.plugin.About;48 import net.sf.basedb.core.plugin.AboutImpl;49 56 import net.sf.basedb.core.plugin.AbstractAnalysisPlugin; 50 57 import net.sf.basedb.core.plugin.GuiContext; … … 71 78 import org.apache.commons.math.special.Erf; 72 79 73 import java.sql.SQLException;74 import java.util.ArrayList;75 import java.util.Arrays;76 import java.util.Collection;77 import java.util.EnumSet;78 import java.util.HashSet;79 import java.util.List;80 import java.util.Set;81 82 80 83 81 /** … … 94 92 { 95 93 96 private static final About about = new AboutImpl 97 ( "Illumina detection P-value calculation", 98 "This plug-in implements BeadStudio like detection P-value calculations " + 99 "for Illumina expression data.\n\n" + 100 "The plug-in will _always_ base the detection P-value calculation on " + 101 "raw data values, i.e., the mean raw intensity for the different " + 102 "signals. By default the calculations are based on negative controls " + 103 "available in the root bioassay set for the current analysis " + 104 "branch. The user may change this to only use negative controls in the " + 105 "current bioassay set.\n\n" + 106 "The detection P-value plug-in does not filter the assays, it provides " + 107 "the detection P-values usable in a filter step after running this " + 108 "plug-in.\n\n" + 109 "Parameters\n" + 110 "- The plug-in requires input of array type since detection P-value are " + 111 "calculated differently depending on array type.\n" + 112 "- Users may select to use negative controls in the current bioassay set " + 113 "only. The default behaviour is to use all negative controls in the " + 114 "root bioassay set for the current bioassay set.\n" + 115 "- A cut off parameter is available to exclude outliers within " + 116 "the negative controls. The `cutoff` defines the acceptable negative " + 117 "control signal range " + 118 "$median-MAD*cutoff < I < median+MAD*cutoff$ " + 119 "where $MAD$ is the median absolute deviation.\n\n" + 120 "Implementation details\n\n" + 121 "Each assay is treated separately, i.e., no samples are combined " + 122 "together. All calculations are made on the raw bead-type level data, " + 123 "i.e., on the average expression value for each bead type and raw data " + 124 "is always used irrespective when in analysis the detection P-value is " + 125 "calculated.\n\n" + 126 "Pvalue calculation for whole genome arrays:\n" + 127 "For all signals $i$ calculate the detection P-value as " + 128 "$Pvalue = 1-R/N$ where $R$ is the rank of the signal $i$ relative to the " + 129 "negative controls and $N$ is the number of negative controls.\n\n" + 130 "Pvalue calculation for others array types (DASL, miRNA, VeraCode DASL, " + 131 "and Focused Arrays):\n" + 132 "For all signals $i$ calculate the detection P-value as " + 133 "$Pvalue = 1/2 - 1/2 * erf( [i-AvgControl]/StdControl/sqrt(2) )$ where " + 134 "$AvgControl$ is the average intensity of the negative controls, " + 135 "$StdControl$ is the standard deviation of the the negative controls, " + 136 "and $erf$ is the error function " + 137 "(http://mathworld.wolfram.com/Erf.html). The error function is used " + 138 "for arguments within the range (-4,4). To save CPU cycles, the function " + 139 "value for arguments outside this range is set to -1 and 1, " + 140 "respectively.\n\n" + 141 "More details about this plug-in is found at " + Illumina.URL + 142 "\n\n Please send feedback to " + Illumina.EMAIL, 143 Illumina.VERSION, 144 Illumina.COPYRIGHT, 145 null, 146 Illumina.EMAIL, 147 Illumina.URL 148 ); 149 94 private static final String pluginName = "Illumina detection P-value calculation"; 95 150 96 /** 151 97 Configuration parameters … … 276 222 277 223 // From the Plugin interface 278 @Override279 public About getAbout()280 {281 return about;282 }283 284 285 224 private RequestInformation getConfigureJobParameters() 286 225 { … … 466 405 // Create Transformation 467 406 Transformation t = source.newTransformation(thisJob); 468 t.setName( about.getName());407 t.setName(pluginName); 469 408 dc.saveItem(t); 470 409 -
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/plugins/SnpIntensityCalculator.java
r1293 r1385 68 68 import net.sf.basedb.core.Transformation; 69 69 import net.sf.basedb.core.data.ReporterData; 70 import net.sf.basedb.core.plugin.About;71 import net.sf.basedb.core.plugin.AboutImpl;72 70 import net.sf.basedb.core.plugin.AbstractPlugin; 73 71 import net.sf.basedb.core.plugin.GuiContext; … … 88 86 import net.sf.basedb.util.NumberFormatUtil; 89 87 import net.sf.basedb.util.parser.FlatFileParser; 88 import net.sf.basedb.util.parser.FlatFileParser.Data; 90 89 import net.sf.basedb.util.parser.Mapper; 91 import net.sf.basedb.util.parser.FlatFileParser.Data;92 90 93 91 /** … … 106 104 107 105 { 108 private static final About about = new AboutImpl(109 "Illumina SNP root biassayset creator",110 "Creates a root bioassay set from Illumina SNP data. This plug-in works " +111 "only if all raw bioassays has the same array design and SNP split data files " +112 "are present. The root bioassayset is created by copying values from the data files " +113 "as follows:\n" +114 " * Channel 1 = GType (AA = 1.0, AB = 0.0, BB = -1.0, NC = null\n" +115 " * Channel 2 = Log R Ratio\n" +116 " * Channel 3 = B Allele Freq",117 Illumina.VERSION,118 Illumina.COPYRIGHT,119 null,120 Illumina.EMAIL,121 Illumina.URL122 );123 124 106 private static final Set<GuiContext> guiContexts = 125 107 Collections.singleton(new GuiContext(Item.BIOASSAYSET, GuiContext.Type.LIST)); … … 154 136 ------------------------------------------- 155 137 */ 156 public About getAbout()157 {158 return about;159 }160 138 public Plugin.MainType getMainType() 161 139 { … … 242 220 for (RawBioAssay rba : sources) 243 221 { 244 numInserted += insertSpotData(dc, rba, rootBas, spotBatcher, skipped, simpleProgress);222 numInserted += insertSpotData(dc, rba, rootBas, spotBatcher, skipped, true, simpleProgress); 245 223 } 246 224 spotBatcher.close(); … … 473 451 } 474 452 475 private File getManifestFile(DbControl dc, ArrayDesign design )476 { 477 File manifest = FileStoreUtil.getDataFile(dc, design, Illumina.SNP_MANIFEST_FILE_ID );453 private File getManifestFile(DbControl dc, ArrayDesign design, boolean requireValid) 454 { 455 File manifest = FileStoreUtil.getDataFile(dc, design, Illumina.SNP_MANIFEST_FILE_ID, requireValid); 478 456 if (manifest == null) 479 457 { … … 501 479 502 480 private int insertSpotData(DbControl dc, RawBioAssay rba, BioAssaySet root, 503 SpotBatcher spotBatcher, Set<Integer> skipped, SimpleAbsoluteProgressReporter progress)481 SpotBatcher spotBatcher, Set<Integer> skipped, boolean requireValid, SimpleAbsoluteProgressReporter progress) 504 482 throws IOException 505 483 { 506 File dataFile = FileStoreUtil.getDataFile(dc, rba, Illumina.SNP_SPLITDATA_FILE_ID );484 File dataFile = FileStoreUtil.getDataFile(dc, rba, Illumina.SNP_SPLITDATA_FILE_ID, requireValid); 507 485 if (dataFile == null) 508 486 { … … 614 592 615 593 // Scan the file and create proxies for all reporters 616 File manifest = getManifestFile(dc, design );594 File manifest = getManifestFile(dc, design, true); 617 595 String mfFilename = manifest.getName(); 618 596 FlatFileParser ffp = getManifestParser(manifest); -
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/plugins/SnpRawDataImporter.java
r1293 r1385 23 23 package net.sf.basedb.illumina.plugins; 24 24 25 import java.io.BufferedWriter; 26 import java.io.IOException; 27 import java.io.OutputStreamWriter; 28 import java.util.ArrayList; 29 import java.util.Arrays; 30 import java.util.Collections; 31 import java.util.HashMap; 32 import java.util.HashSet; 33 import java.util.LinkedList; 34 import java.util.List; 35 import java.util.Map; 36 import java.util.Set; 37 import java.util.regex.Pattern; 38 25 39 import net.sf.basedb.core.ArrayDesign; 26 40 import net.sf.basedb.core.BaseException; … … 28 42 import net.sf.basedb.core.DataFileType; 29 43 import net.sf.basedb.core.DbControl; 44 import net.sf.basedb.core.DerivedBioAssay; 30 45 import net.sf.basedb.core.Directory; 31 46 import net.sf.basedb.core.Experiment; 32 47 import net.sf.basedb.core.File; 33 import net.sf.basedb.core.FileType;34 48 import net.sf.basedb.core.Include; 35 49 import net.sf.basedb.core.InvalidDataException; … … 39 53 import net.sf.basedb.core.ItemParameterType; 40 54 import net.sf.basedb.core.ItemQuery; 55 import net.sf.basedb.core.ItemSubtype; 41 56 import net.sf.basedb.core.Job; 42 57 import net.sf.basedb.core.Location; … … 47 62 import net.sf.basedb.core.PluginParameter; 48 63 import net.sf.basedb.core.Protocol; 49 import net.sf.basedb.core.ProtocolType;50 64 import net.sf.basedb.core.RawBioAssay; 51 65 import net.sf.basedb.core.RawDataType; 52 66 import net.sf.basedb.core.RawDataTypes; 53 67 import net.sf.basedb.core.RequestInformation; 54 import net.sf.basedb.core.Scan;55 68 import net.sf.basedb.core.Software; 56 import net.sf.basedb.core.SoftwareType;57 69 import net.sf.basedb.core.SystemItems; 58 import net.sf.basedb.core.plugin.About;59 import net.sf.basedb.core.plugin.AboutImpl;60 70 import net.sf.basedb.core.plugin.GuiContext; 61 71 import net.sf.basedb.core.plugin.InteractivePlugin; … … 72 82 import net.sf.basedb.util.parser.ColumnMapper; 73 83 import net.sf.basedb.util.parser.FlatFileParser; 74 import net.sf.basedb.util.parser.Mapper;75 84 import net.sf.basedb.util.parser.FlatFileParser.Data; 76 85 import net.sf.basedb.util.parser.FlatFileParser.LineType; 77 78 import java.io.BufferedWriter; 79 import java.io.IOException; 80 import java.io.OutputStreamWriter; 81 import java.util.ArrayList; 82 import java.util.Arrays; 83 import java.util.Collections; 84 import java.util.HashMap; 85 import java.util.HashSet; 86 import java.util.LinkedList; 87 import java.util.List; 88 import java.util.Map; 89 import java.util.Set; 90 import java.util.regex.Pattern; 86 import net.sf.basedb.util.parser.Mapper; 91 87 92 88 /** … … 107 103 { 108 104 109 private static final About about = new AboutImpl110 (111 "Illumina SNP raw data importer",112 "This plug-in is used to import raw data for Illumina SNP from a tab separated text file. The plug-in can be " +113 "executed both from the list of raw bioassays and from within an experiment. In the " +114 "last case the imported data will be associated with the experiment",115 Illumina.VERSION,116 Illumina.COPYRIGHT,117 null,118 Illumina.EMAIL,119 Illumina.URL120 );121 105 private static final Set<GuiContext> guiContexts = 122 106 Collections.unmodifiableSet(new HashSet<GuiContext>( … … 176 160 177 161 //Scan associated with the raw bioassays 178 private Scan scan;162 private DerivedBioAssay derivedBioAssay; 179 163 180 164 //Software associated with the raw bioassays … … 191 175 ------------------------------------------- 192 176 */ 193 public About getAbout()194 {195 return about;196 }197 177 public boolean supportsConfigurations() 198 178 { … … 262 242 storeValue(job, request, ri.getParameter("experiment")); 263 243 storeValue(job, request, ri.getParameter("arrayDesign")); 264 storeValue(job, request, ri.getParameter(" scan"));244 storeValue(job, request, ri.getParameter("derivedBioAssay")); 265 245 storeValue(job, request, ri.getParameter("protocol")); 266 246 storeValue(job, request, ri.getParameter("software")); … … 388 368 this.experiment = (Experiment)job.getValue("experiment"); 389 369 this.design = (ArrayDesign)job.getValue("arrayDesign"); 390 this. scan = (Scan)job.getValue("scan");370 this.derivedBioAssay = (DerivedBioAssay)job.getValue("derivedBioAssay"); 391 371 this.protocol = (Protocol)job.getValue("protocol"); 392 372 this.software = (Software)job.getValue("software"); … … 530 510 531 511 dc = sc.newDbControl(); 532 List< Scan> scans = getItems(dc, Scan.getQuery());512 List<DerivedBioAssay> derivedBioAssays = getItems(dc, DerivedBioAssay.getQuery()); 533 513 List<Protocol> protocols = getItems(dc, Protocol.getQuery(), 534 514 Restrictions.eq( 535 515 Hql.property("protocolType.id"), 536 Expressions.integer(SystemItems.getId(Protocol Type.FEATURE_EXTRACTION))516 Expressions.integer(SystemItems.getId(Protocol.FEATURE_EXTRACTION)) 537 517 ) 538 518 ); … … 540 520 Restrictions.eq( 541 521 Hql.property("softwareType.id"), 542 Expressions.integer(SystemItems.getId(Software Type.FEATURE_EXTRACTION))522 Expressions.integer(SystemItems.getId(Software.FEATURE_EXTRACTION)) 543 523 ) 544 524 ); … … 551 531 552 532 boolean hasAssociations = 553 context.getItem() == Item.EXPERIMENT || scans.size() > 0 ||533 context.getItem() == Item.EXPERIMENT || derivedBioAssays.size() > 0 || 554 534 protocols.size() > 0 || software.size() > 0 || designs.size() > 0; 555 535 … … 576 556 )); 577 557 } 578 if (! scans.isEmpty())558 if (!derivedBioAssays.isEmpty()) 579 559 { 580 parameters.add(new PluginParameter< Scan>(581 " scan",582 " Scan",583 "The imported raw bioassays will be linked to the selected scan.",584 new ItemParameterType< Scan>(Scan.class, null, false, 1, scans)560 parameters.add(new PluginParameter<DerivedBioAssay>( 561 "derivedBioAssay", 562 "DerivedBioAssay", 563 "The imported raw bioassays is derived from this.", 564 new ItemParameterType<DerivedBioAssay>(DerivedBioAssay.class, null, false, 1, derivedBioAssays) 585 565 )); 586 566 } … … 659 639 File splitFile = File.getFile(dc, splitFilesDirectory, entry.getKey()+".split", true); 660 640 splitFile.setLocation(Location.PRIMARY); 661 splitFile.set FileType(FileType.getById(dc, SystemItems.getId(FileType.RAW_DATA)));641 splitFile.setItemSubtype(ItemSubtype.getById(dc, SystemItems.getId(File.RAW_DATA))); 662 642 splitFile.setMimeType("text/plain"); 663 643 dc.saveItem(splitFile); … … 666 646 rba.setName(entry.getKey()); 667 647 if (design != null) rba.setArrayDesign(design); 668 if ( scan != null) rba.setScan(scan);648 if (derivedBioAssay != null) rba.setParentBioAssay(derivedBioAssay); 669 649 if (protocol != null) rba.setProtocol(protocol); 670 650 if (software != null) rba.setSoftware(software); -
plugins/base2/net.sf.basedb.illumina/trunk/src/net/sf/basedb/illumina/plugins/SnpReporterImporter.java
r941 r1385 24 24 package net.sf.basedb.illumina.plugins; 25 25 26 import net.sf.basedb.core.plugin.About;27 import net.sf.basedb.core.plugin.AboutImpl;28 import net.sf.basedb.illumina.Illumina;29 26 import net.sf.basedb.plugins.ReporterFlatFileImporter; 30 27 … … 42 39 extends ReporterFlatFileImporter 43 40 { 44 45 private static final About about = new AboutImpl(46 "Illumina SNP reporter importer",47 "Imports reporters from SNP manifest files. This importer works exactly " +48 "as the regular reporter importer and has the same features.",49 Illumina.VERSION,50 Illumina.COPYRIGHT,51 null,52 Illumina.EMAIL,53 Illumina.URL54 );55 56 41 public SnpReporterImporter() 57 42 {} 58 59 public About getAbout()60 {61 return about;62 }63 64 43 }
Note: See TracChangeset
for help on using the changeset viewer.