rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public static PhotoInfo retrievePhotoInfo( String strPhotoId ) throws PhotoNotFoundException {
public static PhotoInfo retrievePhotoInfo( int photoId ) throws PhotoNotFoundException {
public static PhotoInfo retrievePhotoInfo( String strPhotoId ) throws PhotoNotFoundException { initDB(); String sql = "SELECT * from photos where photo_id=\"" + strPhotoId +"\""; PhotoInfo photo = new PhotoInfo(); try { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery( sql ); if...
String sql = "SELECT * from photos where photo_id=\"" + strPhotoId +"\"";
String sql = "SELECT * from photos where photo_id=\"" + photoId +"\"";
public static PhotoInfo retrievePhotoInfo( String strPhotoId ) throws PhotoNotFoundException { initDB(); String sql = "SELECT * from photos where photo_id=\"" + strPhotoId +"\""; PhotoInfo photo = new PhotoInfo(); try { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery( sql ); if...
photo.FStop = rs.getFloat( "f_stop" ); photo.focalLength = rs.getFloat( "focal_length" );
photo.FStop = rs.getDouble( "f_stop" ); photo.focalLength = rs.getDouble( "focal_length" );
public static PhotoInfo retrievePhotoInfo( String strPhotoId ) throws PhotoNotFoundException { initDB(); String sql = "SELECT * from photos where photo_id=\"" + strPhotoId +"\""; PhotoInfo photo = new PhotoInfo(); try { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery( sql ); if...
public void setFStop(float v) {
public void setFStop(double v) {
public void setFStop(float v) { this.FStop = v; }
public void setFocalLength(float v) {
public void setFocalLength(double v) {
public void setFocalLength(float v) { this.focalLength = v; }
}else{ dpTemp.add(computeDPrime(pos1,pos2));
void generateDPrimeTable(){ //calculating D prime requires the number of each possible 2 marker //haplotype in the dataset dpTable = new DPrimeTable(Chromosome.getUnfilteredSize()); totalComps = (Chromosome.getUnfilteredSize()*(Chromosome.getUnfilteredSize()-1))/2; compsDone =0; ...
JButton okButton = new JButton(ArchitectPanelBuilder.OK_BUTTON_LABEL);
JDefaultButton okButton = new JDefaultButton(ArchitectPanelBuilder.OK_BUTTON_LABEL);
public void showPreferencesDialog() { // XXX Can't easily use ArchitectPanelBuilder since this // contains a JTabbedPane which is not an ArchitectPanel. final JDialog d = new JDialog(af, "User Preferences"); JPanel cp = new JPanel(new BorderLayout(12,12)); JTabbedPane tp = new JTabbedPane(); cp.add(tp, BorderL...
rs.close();
protected void createTypeMap() throws SQLException { if (con == null || !allowConnection) { throw new UnsupportedOperationException("Can't create a type map without DatabaseMetaData"); } typeMap = new HashMap(); DatabaseMetaData dbmd = con.getMetaData(); ResultSet rs = dbmd.getTypeInfo(); while (rs.next()) { ...
Chromosome.markers = null;
void prepareHapsInput(File infile) throws IOException, HaploViewException{ //this method is called to suck in data from a file (its only argument) //of genotypes and sets up the Chromosome objects. String currentLine; Vector chroms = new Vector(); byte[] genos = new byte[0]; ...
if (loc < prevloc && Chromosome.markers != null){ throw new HaploViewException("Info file out of order with preloaded dataset:\n"+ name + "\nPlease reload data file and info file together."); }
void prepareMarkerInput(File infile, long md, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the...
else {
else if (infile != null){
void prepareMarkerInput(File infile, long md, String[][] hapmapGoodies) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the...
tempVect.add(new Double(45)); tempVect.add(new Double(45));
tempVect.add(new Double(currentResult.getObsHet())); tempVect.add(new Double(currentResult.getPredHet()));
public CheckDataPanel(File file) throws IOException{ //okay, for now we're going to assume the ped file has no header Vector pedFileStrings = new Vector(); BufferedReader reader = new BufferedReader(new FileReader(file)); String line; while((line = reader.readLine())!=null){ ...
if (e.getSource() == table) {
if (e.getSource() == table.getColumnsFolder()) {
public void dbObjectChanged(SQLObjectEvent e) { if (e.getSource() == table) { int[] changedIndices = e.getChangedIndices(); for (int i = 0; i < changedIndices.length; i++) { // XXX: should group contiguous regions into one event! logger.debug("Firing contentsChanged event for index "+i); fireContentsChan...
return table.getChildren().get(index);
return table.getColumnsFolder().getChild(index);
public Object getElementAt(int index) { try { return table.getChildren().get(index); } catch (ArchitectException ex) { throw new RuntimeException("Couldn't get child "+index, ex); } }
return table.getChildCount();
return table.getColumnsFolder().getChildCount();
public int getSize() { try { return table.getChildCount(); } catch (ArchitectException ex) { throw new RuntimeException("Couldn't get child count", ex); } }
} try { ArchitectUtils.unlistenToHierarchy(this, e.getChildren()); if (columnSelection.size() != this.model.getColumns().size()) { logger.error("Repairing out-of-sync selection list: selection="+columnSelection+"; children="+this.model.getColumns()); columnSelection = new ArrayList(); for (int j = 0; j < model.getColum...
try { if (columnSelection.size() != this.model.getColumns().size()) { throw new IllegalStateException("out-of-sync selection list (event source="+e.getSource()+"): selection="+columnSelection+"; children="+this.model.getColumns());
public void dbChildrenRemoved(SQLObjectEvent e) { if (e.getSource() == this.model.getColumnsFolder()) { int ci[] = e.getChangedIndices(); logger.debug("Columns removed. Syncing select/highlight lists. Removed indices="+Arrays.asList(ci)); for (int i = 0; i < ci.length; i++) { columnSelection.remove(ci[i])...
if (columnHighlight.size() != this.model.getColumns().size()) { logger.error("Repairing out-of-sync highlight list: highlights="+columnHighlight+"; children="+this.model.getColumns()); columnHighlight = new ArrayList(); for (int j = 0; j < model.getColumns().size(); j++) { columnHighlight.add(null); } } } catch (Archit...
public void dbChildrenRemoved(SQLObjectEvent e) { if (e.getSource() == this.model.getColumnsFolder()) { int ci[] = e.getChangedIndices(); logger.debug("Columns removed. Syncing select/highlight lists. Removed indices="+Arrays.asList(ci)); for (int i = 0; i < ci.length; i++) { columnSelection.remove(ci[i])...
document = parseBody(output);
String text = getText(); if (text != null) { document = parseText(text); } else { document = parseBody(output); }
public void doTag(XMLOutput output) throws Exception { if (getVar() == null) { throw new IllegalArgumentException("The var attribute cannot be null"); } Document document = null; if (html == null) { document = parseBody(output); } else { doc...
return new PhotoCollectionTransferable(sourcePhotos);
PhotoCollection sourceCollection = view.getCollection(); return new PhotoCollectionTransferable( sourcePhotos );
protected Transferable createTransferable(JComponent c) { log.warn( "createTransferable" ); Collection selection = view.getSelection(); sourcePhotos = new PhotoInfo[selection.size()]; Iterator iter = selection.iterator(); int i = 0; while ( iter.hasNext() ) { sourcePhotos[i] = (PhotoInfo) iter.next(); i++; ...
PhotoCollection coll = view.getCollection(); if ( (action == MOVE) && coll instanceof PhotoFolder ) { PhotoFolder folder = (PhotoFolder) coll;
PhotoCollection collection = view.getCollection(); if ( (collection != lastImportTarget) && (action == MOVE) && collection instanceof PhotoFolder ) { PhotoFolder folder = (PhotoFolder) collection;
protected void exportDone(JComponent c, Transferable data, int action) { PhotoCollection coll = view.getCollection(); if (/*shouldRemove && */ (action == MOVE) && coll instanceof PhotoFolder ) { PhotoFolder folder = (PhotoFolder) coll; for ( int i = 0; i < sourcePhotos.length; i++ ) { folder.removeP...
lastImportTarget = null;
protected void exportDone(JComponent c, Transferable data, int action) { PhotoCollection coll = view.getCollection(); if (/*shouldRemove && */ (action == MOVE) && coll instanceof PhotoFolder ) { PhotoFolder folder = (PhotoFolder) coll; for ( int i = 0; i < sourcePhotos.length; i++ ) { folder.removeP...
lastImportTarget = folder;
public boolean importData(JComponent c, Transferable t) { log.warn( "importData" ); if (canImport(c, t.getTransferDataFlavors())) { //Don't drop on myself.// if (source == c) {// shouldRemove = false;// return true;// } PhotoCollection co...
dPrimeTable = new PairwiseLinkage[((Chromosome) chromosomes.firstElement()).size()][((Chromosome) chromosomes.firstElement()).size()];
dPrimeTable = new PairwiseLinkage[Chromosome.size()][Chromosome.size()];
void generateDPrimeTable(long maxdist){ //calculating D prime requires the number of each possible 2 marker //haplotype in the dataset dPrimeTable = new PairwiseLinkage[((Chromosome) chromosomes.firstElement()).size()][((Chromosome) chromosomes.firstElement()).size()]; int doublehet; ...
long sep = ((SNP)markerInfo.elementAt(pos1)).getPosition() - ((SNP)markerInfo.elementAt(pos2)).getPosition(); if (sep > maxdist || sep < negMaxdist){
long sep = Chromosome.getMarker(pos1).getPosition() - Chromosome.getMarker(pos2).getPosition(); if ((sep > maxdist || sep < negMaxdist) && markersLoaded){
void generateDPrimeTable(long maxdist){ //calculating D prime requires the number of each possible 2 marker //haplotype in the dataset dPrimeTable = new PairwiseLinkage[((Chromosome) chromosomes.firstElement()).size()][((Chromosome) chromosomes.firstElement()).size()]; int doublehet; ...
case 0: returnVec = new FindBlocks(dPrimeTable, markerInfo).doSFS(); break;
case 0: returnVec = new FindBlocks(dPrimeTable).doSFS(); break;
void guessBlocks(int method){ Vector returnVec = new Vector(); switch(method){ case 0: returnVec = new FindBlocks(dPrimeTable, markerInfo).doSFS(); break; case 1: returnVec = new FindBlocks(dPrimeTable).do4Gamete(); break; case 2: returnVec = new FindBlocks(dPrimeTable...
if (markerResults[i]){
public void linkageToChrom(boolean[] markerResults, PedFile pedFile){ Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); Individual currentInd; Family currentFamily; Vector chrom = new Vector(); for(int x=0; x < indList.size()...
}
public void linkageToChrom(boolean[] markerResults, PedFile pedFile){ Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); Individual currentInd; Family currentFamily; Vector chrom = new Vector(); for(int x=0; x < indList.size()...
for (int i = 0; i < numMarkers ; i++){
int count = 0; for (int i = 0; i < numMarkers; i++){ if (markerResults[i]){ count++; } } Chromosome.realIndex = new int[count]; int k = 0; for (int i =0; i < numMarkers; i++){ if (markerResults[i]){ Chromosome.realIndex[k] = i; k++; } } Vector markerInfo = new Vector(); for (int i = 0; i < numMarkers; i++){
public void linkageToChrom(boolean[] markerResults, PedFile pedFile){ Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); Individual currentInd; Family currentFamily; Vector chrom = new Vector(); for(int x=0; x < indList.size()...
byte thisAllele = ((Chromosome)chrom.elementAt(j)).elementAt(i);
byte thisAllele = ((Chromosome)chrom.elementAt(j)).unfilteredElementAt(i);
public void linkageToChrom(boolean[] markerResults, PedFile pedFile){ Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); Individual currentInd; Family currentFamily; Vector chrom = new Vector(); for(int x=0; x < indList.size()...
Chromosome.markers = markerInfo.toArray();
public void linkageToChrom(boolean[] markerResults, PedFile pedFile){ Vector indList = pedFile.getOrder(); int numMarkers = 0; Vector usedParents = new Vector(); Individual currentInd; Family currentFamily; Vector chrom = new Vector(); for(int x=0; x < indList.size()...
byte thisAllele = ((Chromosome)chroms.elementAt(j)).elementAt(i);
byte thisAllele = ((Chromosome)chroms.elementAt(j)).unfilteredElementAt(i);
void prepareGenotypeInput(File infile) throws IOException{ //this method is called to suck in data from a file (its only argument) //of genotypes and return a vector of Chromosome objects. String currentLine; Vector chroms = new Vector(); byte[] genos = new byte[0]; String ...
Chromosome.markers = markerInfo.toArray();
void prepareGenotypeInput(File infile) throws IOException{ //this method is called to suck in data from a file (its only argument) //of genotypes and return a vector of Chromosome objects. String currentLine; Vector chroms = new Vector(); byte[] genos = new byte[0]; String ...
byte thisAllele = ((Chromosome)chromosomes.elementAt(i)).elementAt(snpcount);
byte thisAllele = ((Chromosome)chromosomes.elementAt(i)).unfilteredElementAt(snpcount);
int prepareMarkerInput(File infile) throws IOException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position String currentLine; Vector markers = new Vecto...
if (markerInfo.size() == markers.size()){ markerInfo = markers;
if (Chromosome.markers.length == markers.size()){ Chromosome.markers = markers.toArray(); markersLoaded = true;
int prepareMarkerInput(File infile) throws IOException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position String currentLine; Vector markers = new Vecto...
log.debug( "javaToSql: " + src.getClass().getName() + " " + src );
log.debug( "javaToSql: " + src );
public Object javaToSql( Object src ) { log.debug( "javaToSql: " + src.getClass().getName() + " " + src ); if ( src instanceof Date ) { return new Timestamp( ((Date)src).getTime() ); } return src; }
log.debug( "sqlToJava: " + src.getClass().getName() + " " + src );
log.debug( "sqlToJava: " + src );
public Object sqlToJava( Object src ) { log.debug( "sqlToJava: " + src.getClass().getName() + " " + src ); if ( src instanceof Timestamp ) { return new Date( ((Timestamp)src).getTime() ); } return src; }
System.out.println("DBTree: got dragDropEnd event");
public void dragDropEnd(DragSourceDropEvent dsde) { System.out.println("DBTree: got dragDropEnd event"); }
System.out.println("DBTree: got dragEnter event");
public void dragEnter(DragSourceDragEvent dsde) { System.out.println("DBTree: got dragEnter event"); }
System.out.println("DBTree: got dragExit event");
public void dragExit(DragSourceEvent dse) { System.out.println("DBTree: got dragExit event"); }
System.out.println("DBTree: got dragOver event");
public void dragOver(DragSourceDragEvent dsde) { System.out.println("DBTree: got dragOver event"); }
System.out.println("DBTree: got dropActionChanged event");
public void dropActionChanged(DragSourceDragEvent dsde) { System.out.println("DBTree: got dropActionChanged event"); }
public void run(Context context, XMLOutput output) throws Exception {
public void run(JellyContext context, XMLOutput output) throws Exception {
public void run(Context context, XMLOutput output) throws Exception { output.write( text ); }
Vector result = null;
void readGenotypes(String[] inputOptions, int type){ //input is a 2 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //type is either 3 or 4 for ped and hapmap files respectively final File inFile = new File(inputOptions[0]); try ...
result = theData.linkageToChrom(inFile, type);
theData.linkageToChrom(inFile, type);
void readGenotypes(String[] inputOptions, int type){ //input is a 2 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //type is either 3 or 4 for ped and hapmap files respectively final File inFile = new File(inputOptions[0]); try ...
Vector result = theData.getPedFile().getResults();
void readGenotypes(String[] inputOptions, int type){ //input is a 2 element array with //inputOptions[0] = ped file //inputOptions[1] = info file (null if none) //type is either 3 or 4 for ped and hapmap files respectively final File inFile = new File(inputOptions[0]); try ...
} else if ((a1 >= 5 && a2 >= 5) || (a1 >= 5 && !(a2 == b2)) || (a2 >= 5 && !(a1 == b1))) doublehet++; else if (a1 >= 5){
} else if (((a1 >= 5 || b1 >= 5) && (a2 >= 5 || b2 >= 5)) || (a1 >= 5 && !(a2 == b2)) || (a2 >= 5 && !(a1 == b1))){ doublehet++; } else if (a1 >= 5 || b1 >= 5){
public PairwiseLinkage computeDPrime(int pos1, int pos2){ int doublehet = 0; int[][] twoMarkerHaplos = new int[3][3]; for (int i = 0; i < twoMarkerHaplos.length; i++){ for (int j = 0; j < twoMarkerHaplos[i].length; j++){ twoMarkerHaplos[i][j] = 0; } }...
} else if (a2 >= 5){
} else if (a2 >= 5 || b2 >= 5){
public PairwiseLinkage computeDPrime(int pos1, int pos2){ int doublehet = 0; int[][] twoMarkerHaplos = new int[3][3]; for (int i = 0; i < twoMarkerHaplos.length; i++){ for (int j = 0; j < twoMarkerHaplos[i].length; j++){ twoMarkerHaplos[i][j] = 0; } }...
handlerConfig.addChild(createRemoteManagerHandlerChainConfiguration());
handlerConfig.addChild(createHandlerChainConfiguration());
public void init() { setAttribute("enabled", true); addChild(getValuedConfiguration("port", "" + m_smtpListenerPort)); DefaultConfiguration handlerConfig = new DefaultConfiguration("handler"); handlerConfig.addChild(getValuedConfiguration("helloName", "myMailServer")); handlerConf...
profileFunctionMap.put("DATE", new ProfileFunctionDescriptor("DATE", Types.DATE, true,true,true,false,true,true,true,true));
protected void createProfileFunctionMap() { profileFunctionMap = new HashMap(); profileFunctionMap.put("BIT", new ProfileFunctionDescriptor("BIT", Types.BIT, true,true,true,false,true,true,true,true)); profileFunctionMap.put("CHAR", new ProfileFunctionDescriptor("CHAR", Types....
configureTag(tag,context);
public Tag getTag(JellyContext context) throws JellyException { Tag tag = context.getTagOfTagScript(this); if ( tag == null ) { tag = createTag(); if ( tag != null ) { context.setTagForScript(this,tag); } } configureTag(tag,context); ...
plot.setSectionPaint(0, Color.RED); plot.setSectionPaint(1, Color.GREEN);
private static JFreeChart createChart(final PieDataset dataset) { final JFreeChart chart = ChartFactory.createPieChart( null, // chart title dataset, // data false, // include legend false, false); // E6EEF9 chart.setBa...
throw(new HaploViewException("Info file error:\nToo many markers"));
throw(new HaploViewException("Info file error:\nMarker number mismatch: too many\nmarkers in info file."));
void prepareMarkerInput(File infile, long maxdist) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the maxdist is //...
throw(new HaploViewException("Info file error:\nNot enough markers"));
throw(new HaploViewException("Info file error:\nMarker number mismatch: too few\nmarkers in info file."));
void prepareMarkerInput(File infile, long maxdist) throws IOException, HaploViewException{ //this method is called to gather data about the markers used. //It is assumed that the input file is two columns, the first being //the name and the second the absolute position. the maxdist is //...
NumberFormat nf = NumberFormat.getInstance();
NumberFormat nf = NumberFormat.getInstance(Locale.US);
public void saveHapsToText(Haplotype[][] finishedHaplos, double[] multidprime, File saveHapsFile) throws IOException{ if (finishedHaplos == null) return; NumberFormat nf = NumberFormat.getInstance(); nf.setMinimumFractionDigits(3); nf.setMaximumFractionDigit...
table.getColumnModel().getColumn(1).setPreferredWidth(100);
table.getColumnModel().getColumn(1).setMinWidth(100);
public CheckDataPanel(HaploData hd, boolean disp) throws IOException, PedFileException{ STATUS_COL = 8; setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = hd.getPedFile(); theData = hd; Vector result = pedfile.getResults(); int numResults = result.size(); Vec...
tableScroller.setMaximumSize(new Dimension(600, tableScroller.getPreferredSize().height));
public CheckDataPanel(HaploData hd, boolean disp) throws IOException, PedFileException{ STATUS_COL = 8; setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); pedfile = hd.getPedFile(); theData = hd; Vector result = pedfile.getResults(); int numResults = result.size(); Vec...
log.info("Registering tag library to: " + namespaceURI + " taglib: " + taglib); taglibs.put(namespaceURI, taglib); }
if (log.isDebugEnabled()) { log.debug("Registering tag library to: " + namespaceURI + " taglib: " + taglib); } taglibs.put(namespaceURI, taglib); }
public void registerTagLibrary(String namespaceURI, TagLibrary taglib) { log.info("Registering tag library to: " + namespaceURI + " taglib: " + taglib); taglibs.put(namespaceURI, taglib); }
for (int i = 0; i < inArray.length; i++){ inArray[i] = firstMarker+i; this.isInBlock[firstMarker+i] = true; }
public void addBlock(int firstMarker, int lastMarker) { if (firstMarker < 0){ firstMarker = 0; } if (lastMarker >= Chromosome.realIndex.length){ lastMarker = Chromosome.realIndex.length-1; } if (lastMarker - firstMarker < 1){ return; } ...
for (int i = 0; i < inArray.length; i++){ inArray[i] = firstMarker+i; this.isInBlock[firstMarker+i] = true; }
public void addBlock(int firstMarker, int lastMarker) { if (firstMarker < 0){ firstMarker = 0; } if (lastMarker >= Chromosome.realIndex.length){ lastMarker = Chromosome.realIndex.length-1; } if (lastMarker - firstMarker < 1){ return; } ...
StringBuffer name = new StringBuffer(); name.append("Project");
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { setText(value.toString()); if (value instanceof SQLDatabase) { logger.debug("proj...
Vector names = null; boolean withName=false; if(names!=null && names.size()==numOfMarkers) { withName = true; }
public Vector check() throws PedFileException{ Vector results = new Vector(); //_size = _pedFile.getNumIndividuals(); int numOfMarkers = _pedFile.getNumMarkers(); //not worrying about names right now //TODO: store and use marker names //Vector names = this._pedFile.getMarkerNames(); Vector names = null; boolea...
MarkerResult markerResult; if(withName) { markerResult = checkMarker(i, (String)names.get(i)); }else{ markerResult = checkMarker(i, new String("Marker " + (i+1))); } results.add(markerResult);
results.add(checkMarker(i));
public Vector check() throws PedFileException{ Vector results = new Vector(); //_size = _pedFile.getNumIndividuals(); int numOfMarkers = _pedFile.getNumMarkers(); //not worrying about names right now //TODO: store and use marker names //Vector names = this._pedFile.getMarkerNames(); Vector names = null; boolea...
private MarkerResult checkMarker(int loc, String name)throws PedFileException{
private MarkerResult checkMarker(int loc)throws PedFileException{
private MarkerResult checkMarker(int loc, String name)throws PedFileException{ MarkerResult result = new MarkerResult(); Individual currentInd; //int indivgeno=0, int missing=0, parenthet=0, mendErrNum=0; int allele1=0, allele2=0, hom=0, het=0; //Hashtable allgenos = new Hashtable(); Hashtable numindivs=n...
result.setName(name);
private MarkerResult checkMarker(int loc, String name)throws PedFileException{ MarkerResult result = new MarkerResult(); Individual currentInd; //int indivgeno=0, int missing=0, parenthet=0, mendErrNum=0; int allele1=0, allele2=0, hom=0, het=0; //Hashtable allgenos = new Hashtable(); Hashtable numindivs=n...
instance.updateDB();
public void addInstance( Volume volume, File instanceFile, int instanceType ) { ArrayList origInstances = getInstances(); ImageInstance instance = ImageInstance.create( volume, instanceFile, this ); instance.setInstanceType( instanceType ); origInstances.add( instance ); }
request.setAttribute(RequestAttributes.NAV_CURRENT_PAGE, "Query");
public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { ...
rs.close();
public void findConflicting() throws SQLException { conflicts = new ArrayList(); if (logger.isDebugEnabled()) { logger.debug("About to find conflicting objects for DDL Script: "+ddlStatements); } Iterator it = ddlStatements.iterator(); while (it.hasNext()) { ...
timer = new javax.swing.Timer(500, new ActionListener(){
timer = new javax.swing.Timer(50, new ActionListener(){
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command == "Open"){ int returnVal = fc.showOpenDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { try{ theData = new HaploData(fc.getSelectedFile()); infileName = fc.getSelectedFile().getName(); ...
if (theData.getComplete() == theData.getToBeCompleted()){
if (theData.finished){
public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command == "Open"){ int returnVal = fc.showOpenDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { try{ theData = new HaploData(fc.getSelectedFile()); infileName = fc.getSelectedFile().getName(); ...
if (theData.getComplete() == theData.getToBeCompleted()){
if (theData.finished){
public void actionPerformed(ActionEvent evt){ progressMonitor.setProgress(theData.getComplete()); if (theData.getComplete() == theData.getToBeCompleted()){ timer.stop(); progressMonitor.close(); infoKnown=false; drawPicture(theData); loadInfoMenuItem.setEnabled(true); ...
output.append(refreshInterval + ", " + appId + ")\", " + refreshInterval + ");");
output.append(refreshInterval + ", " + appId + ",''dummy'',''dummy'')\", " + refreshInterval + ");");
public String draw(DashboardContext context) { StringBuffer output = new StringBuffer(); output.append(component.draw(context)); // append script final String dashboardId = context.getDashboardConfig().getDashboardId(); String appId = context.getWebContext().getApplicationConfig()...
pp.selectNone();
public void actionPerformed(ActionEvent evt) { logger.debug("the hashcode is: " + super.hashCode()); pkTable = null; fkTable = null; logger.debug("Starting to create relationship!"); active = true; pp.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); }
if (freqs[i] > FindBlocks.fourGameteCutoff) numGam++;
if (freqs[i] > FindBlocks.fourGameteCutoff + 1E-8) numGam++;
public void colorDPrime(int scheme){ PairwiseLinkage dPrime[][] = theData.filteredDPrimeTable; if (scheme == STD_SCHEME){ // set coloring based on LOD and D' for (int i = 0; i < dPrime.length; i++){ for (int j = i+1; j < dPrime[i].length; j++){ P...
refresh(0);
refresh();
public void mouseClicked(MouseEvent e) { if ((e.getModifiers() & InputEvent.BUTTON1_MASK) == InputEvent.BUTTON1_MASK) { int clickX = e.getX(); int clickY = e.getY(); if (showWM && wmInteriorRect.contains(clickX,clickY)){ //convert a click on the ...
refresh(0);
refresh();
public void mouseReleased(MouseEvent e) { //remove popped up window if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK){ popupExists = false; repaint(); //resize window once user has ceased dragging } else if ((e.getModifiers(...
public void refresh(int scheme){ if (scheme != 0){ colorDPrime(scheme); }
public void refresh(){
public void refresh(int scheme){ if (scheme != 0){ colorDPrime(scheme); } noImage = true; repaint(); }
for (int u = 0; u < haplos[0].length; u++){ haplos[0][u].setListOrder(u); } for (int i = 0; i < haplos.length; i++){ haplos[i][0].clearTags(); } multidprimeArray = new double[haplos.length]; if (haplos.length==1){ Vector theBestSubset = getBestSubset(haplos[0]); for (int i = 0; i < theBestSubset.size(); i++){ haplos...
Haplotype[][] generateCrossovers(Haplotype[][] haplos) throws HaploViewException{ Vector crossBlock = new Vector(); double CROSSOVER_THRESHOLD = 0.001; //to what percentage do we want to consider crossings? if (haplos.length == 0) return null; //seed first block with ordering numbers ...
haplos[gap][0].addTag(((Integer)preGapSubset.elementAt(i)).intValue());
Haplotype[][] generateCrossovers(Haplotype[][] haplos) throws HaploViewException{ Vector crossBlock = new Vector(); double CROSSOVER_THRESHOLD = 0.001; //to what percentage do we want to consider crossings? if (haplos.length == 0) return null; //seed first block with ordering numbers ...
haplos[gap+1][0].addTag(((Integer)postGapSubset.elementAt(i)).intValue());
Haplotype[][] generateCrossovers(Haplotype[][] haplos) throws HaploViewException{ Vector crossBlock = new Vector(); double CROSSOVER_THRESHOLD = 0.001; //to what percentage do we want to consider crossings? if (haplos.length == 0) return null; //seed first block with ordering numbers ...
double[][] multilocusTable = new double[haplos[gap].length][]; double[] rowSum = new double[haplos[gap].length]; double[] colSum = new double[haplos[gap+1].length]; double multilocusTotal = 0;
Haplotype[][] generateCrossovers(Haplotype[][] haplos) throws HaploViewException{ Vector crossBlock = new Vector(); double CROSSOVER_THRESHOLD = 0.001; //to what percentage do we want to consider crossings? if (haplos.length == 0) return null; //seed first block with ordering numbers ...
multilocusTable[i] = crossPercentages; } int hilimit; int lolimit; if (haplos[gap+1].length > haplos[gap].length) { hilimit = haplos[gap+1].length; lolimit = haplos[gap].length; }else{ hilimit = haplos[gap].length; lolimit = haplos[gap+1].length; } boolean[] unavailable = new boolean[hilimit]; int[] prevBlockLocs = n...
Haplotype[][] generateCrossovers(Haplotype[][] haplos) throws HaploViewException{ Vector crossBlock = new Vector(); double CROSSOVER_THRESHOLD = 0.001; //to what percentage do we want to consider crossings? if (haplos.length == 0) return null; //seed first block with ordering numbers ...
Haplotype[][] results = new Haplotype[blocks.size()][];
Haplotype[][] rawHaplotypes = new Haplotype[blocks.size()][];
Haplotype[][] generateHaplotypes(Vector blocks, boolean crossover) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this...
results[k] = new Haplotype[theEM.numHaplos()];
rawHaplotypes[k] = new Haplotype[theEM.numHaplos()];
Haplotype[][] generateHaplotypes(Vector blocks, boolean crossover) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this...
results[k][z] = tempArray[z];
rawHaplotypes[k][z] = tempArray[z];
Haplotype[][] generateHaplotypes(Vector blocks, boolean crossover) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this...
haplotypes = results;
haplotypes = new Haplotype[rawHaplotypes.length][]; for (int i = 0; i < rawHaplotypes.length; i++) { Vector orderedHaps = new Vector(); for (int hapCount = 0; hapCount < rawHaplotypes[i].length; hapCount++) { if (orderedHaps.size() == 0) { orderedHaps.add(rawHaplotypes[i][hapCount]); } else { for (int j = 0; j < order...
Haplotype[][] generateHaplotypes(Vector blocks, boolean crossover) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this...
return results;
return rawHaplotypes;
Haplotype[][] generateHaplotypes(Vector blocks, boolean crossover) throws HaploViewException{ //TODO: output indiv hap estimates Haplotype[][] results = new Haplotype[blocks.size()][]; //String raw = new String(); //String currentLine; this.totalBlocks = blocks.size(); this...
registerPreferenceDialogTag("preferenceDialog", PreferenceDialogTag.class); registerTag("preferencePage", PreferencePageTag.class); registerFieldEditorTag("booleanFieldEditor", BooleanFieldEditor.class); registerFieldEditorTag("colorFieldEditor", ColorFieldEditor.class); registerFieldEditorTag("directoryFieldEditor", ...
public JFaceTagLibrary() { // Viewer tags registerViewerTag("tableViewer", TableViewer.class); registerViewerTag("tableTreeViewer", TableTreeViewer.class); registerViewerTag("treeViewer", TreeViewer.class); registerViewerTag("checkboxTreeViewer", CheckboxTreeViewer.class); ...
public Tag createTag(String name, Attributes attributes) throws JellyException { return new MenuManagerTag();
public Tag createTag(String name, Attributes attributes) throws JellyException { return new ViewerTag(theClass, style);
public Tag createTag(String name, Attributes attributes) throws JellyException { return new MenuManagerTag(); }
public Tag createTag(String name, Attributes attributes) throws JellyException { return new ViewerTag(theclass, style);
public Tag createTag(String name, Attributes attributes) throws JellyException { return new MenuManagerTag();
public Tag createTag(String name, Attributes attributes) throws JellyException { return new ViewerTag(theclass, style); }
if (c instanceof Selectable) {
if (c instanceof Relationship) { ((Relationship) c).setSelected(((Relationship) c).intersects(rubberBand)); } else if (c instanceof Selectable) {
public void mouseMoved(MouseEvent evt) { if (rubberBand != null) { // repaint old region in case of shrinkage Rectangle dirtyRegion = zoomRect(new Rectangle(rubberBand)); Point p = unzoomPoint(new Point(evt.getPoint())); rubberBand.setBounds(rubberBandOrigin.x, rubberBandOrigin.y, 0, 0); rubberBand.a...
Rectangle dirtyRegion = rubberBand;
Rectangle dirtyRegion = new Rectangle(rubberBand); dirtyRegion.width += (int) (dirtyRegion.width * 0.1); dirtyRegion.height += (int) (dirtyRegion.height * 0.1);
public void mouseReleased(MouseEvent evt) { if (rubberBand != null) { if (evt.getButton() == MouseEvent.BUTTON1) { Rectangle dirtyRegion = rubberBand; rubberBandOrigin = null; rubberBand = null; repaint(zoomRect(new Rectangle(dirtyRegion))); } } else if (!retargetToContentPane(evt)) { //(...
repaint(zoomRect(new Rectangle(dirtyRegion)));
repaint(zoomRect(dirtyRegion));
public void mouseReleased(MouseEvent evt) { if (rubberBand != null) { if (evt.getButton() == MouseEvent.BUTTON1) { Rectangle dirtyRegion = rubberBand; rubberBandOrigin = null; rubberBand = null; repaint(zoomRect(new Rectangle(dirtyRegion))); } } else if (!retargetToContentPane(evt)) { //(...
Composite backupComp = g2.getComposite(); g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.3f)); g2.fillRect(rubberBand.x, rubberBand.y, rubberBand.width-1, rubberBand.height-1); g2.setComposite(backupComp);
public void paintComponent(Graphics g) { logger.debug("start of paintComponent, width="+getWidth()+",height="+getHeight()); Graphics2D g2 = (Graphics2D) g; g2.setColor(getBackground()); g2.fillRect(0, 0, getWidth(), getHeight()); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, antialiasSetting); if (logger....
r.setSelected(false);
public void dbChildrenRemoved(SQLObjectEvent e) { logger.debug("SQLObject children got removed: "+e); boolean fireEvent = false; SQLObject o = e.getSQLSource(); SQLObject[] c = e.getChildren(); for (int i = 0; i < c.length; i++) { try { ArchitectUtils.unlistenToHierarchy(this, c[i]); } catch (ArchitectExce...
StringTokenizer enum = new StringTokenizer( text, "," );
StringTokenizer pointEnum = new StringTokenizer( text, "," );
public Object convert(Class type, Object value) { if ( value != null ) { String text = value.toString(); StringTokenizer enum = new StringTokenizer( text, "," ); int x = 0; int y = 0; if ( enum.hasMoreTokens() ) { x = parseNumber( enum.nex...
if ( enum.hasMoreTokens() ) { x = parseNumber( enum.nextToken() );
if ( pointEnum.hasMoreTokens() ) { x = parseNumber( pointEnum.nextToken() );
public Object convert(Class type, Object value) { if ( value != null ) { String text = value.toString(); StringTokenizer enum = new StringTokenizer( text, "," ); int x = 0; int y = 0; if ( enum.hasMoreTokens() ) { x = parseNumber( enum.nex...
if ( enum.hasMoreTokens() ) { y = parseNumber( enum.nextToken() );
if ( pointEnum.hasMoreTokens() ) { y = parseNumber( pointEnum.nextToken() );
public Object convert(Class type, Object value) { if ( value != null ) { String text = value.toString(); StringTokenizer enum = new StringTokenizer( text, "," ); int x = 0; int y = 0; if ( enum.hasMoreTokens() ) { x = parseNumber( enum.nex...
return new Point( x, y ); } return null; }
public Object convert(Class type, Object value) { if ( value != null ) { String text = value.toString(); StringTokenizer enum = new StringTokenizer( text, "," ); int x = 0; int y = 0; if ( enum.hasMoreTokens() ) { x = parseNumber( enum.nex...
this.dynaBean = new ConvertingWrapDynaBean(fileScanner);
public FileScannerTag(FileScanner fileScanner) { this.fileScanner = fileScanner; this.dynaBean = new ConvertingWrapDynaBean(fileScanner); }
byte[] zeroArray = {0,0};
public Vector linkageToChrom(File infile, int type) throws IllegalArgumentException, HaploViewException, PedFileException, IOException{ pedFile = new PedFile(); if (type == PED_FILE){ pedFile.parseLinkage(infile); }else{ pedFile.parseHapMap(infile); ...