rem stringlengths 0 477k | add stringlengths 0 313k | context stringlengths 6 599k |
|---|---|---|
int colNo = table.convertColumnIndexToModel(i); column = table.getColumnModel().getColumn(colNo); | column = table.getColumnModel().getColumn(i); | public void initColumnSizes(JTable table) { AbstractTableModel model = (AbstractTableModel)table.getModel(); TableColumn column = null; Component comp = null; int headerWidth = 0; int cellWidth = 0; TableCellRenderer headerRenderer = table.getTableHeader().getDef... |
null, column.getHeaderValue(), | table, column.getHeaderValue(), | public void initColumnSizes(JTable table) { AbstractTableModel model = (AbstractTableModel)table.getModel(); TableColumn column = null; Component comp = null; int headerWidth = 0; int cellWidth = 0; TableCellRenderer headerRenderer = table.getTableHeader().getDef... |
comp = table.getDefaultRenderer(model.getColumnClass(colNo)). | comp = table.getDefaultRenderer(model.getColumnClass(i)). | public void initColumnSizes(JTable table) { AbstractTableModel model = (AbstractTableModel)table.getModel(); TableColumn column = null; Component comp = null; int headerWidth = 0; int cellWidth = 0; TableCellRenderer headerRenderer = table.getTableHeader().getDef... |
table, table.getValueAt(j,colNo), false, false, j, colNo); | table, table.getValueAt(j,i), false, false, j, i); | public void initColumnSizes(JTable table) { AbstractTableModel model = (AbstractTableModel)table.getModel(); TableColumn column = null; Component comp = null; int headerWidth = 0; int cellWidth = 0; TableCellRenderer headerRenderer = table.getTableHeader().getDef... |
this.pm = pm; | public ProfilePanel(ProfileManager pm) { this.pm = pm; displayPanel = new ProfileGraphPanel(this, 0,pm); setup(); } | |
public void linkageToChrom(boolean[] markerResults, PedFile pedFile, String[][] hmInfo) throws IllegalArgumentException, HaploViewException, PedFileException{ if(markerResults == null){ throw new IllegalArgumentException(); } Vector indList = pedFile.getOrder(); int numMarkers = 0; numSingletons = 0; numTrios = 0; n... | public void linkageToChrom(File infile, int type) throws IllegalArgumentException, HaploViewException, PedFileException, IOException{ this.linkageToChrom(infile, type, false); | public void linkageToChrom(boolean[] markerResults, PedFile pedFile, String[][] hmInfo) throws IllegalArgumentException, HaploViewException, PedFileException{ if(markerResults == null){ throw new IllegalArgumentException(); } Vector indList = pedFile.getOrder(); int... |
int numGaps = filteredDPrimeTable.length; double prev = 0; for (int gap = 0; gap < numGaps; gap++){ for (int x = 0; x < 5; x++){ for (int y = 1; y < 6; y++){ if (gap-x < 0 || gap+y >= numGaps){ continue; } LODSum += filteredDPrimeTable[gap-x][gap+y].getLOD(); | for (int x = 0; x < 5; x++){ for (int y = 1; y < 6; y++){ if (i-x < 0 || i+y >= filteredDPrimeTable.length){ continue; | public void saveDprimeToText(File dumpDprimeFile) throws IOException{ FileWriter saveDprimeWriter = new FileWriter(dumpDprimeFile); if (infoKnown){ saveDprimeWriter.write("L1\tL2\tD'\tLOD\tr^2\tCIlow\tCIhi\tDist\tT-int\n"); long dist; for (int i = 0; i < filteredDPrime... |
LODSum += filteredDPrimeTable[i-x][i+y].getLOD(); | public void saveDprimeToText(File dumpDprimeFile) throws IOException{ FileWriter saveDprimeWriter = new FileWriter(dumpDprimeFile); if (infoKnown){ saveDprimeWriter.write("L1\tL2\tD'\tLOD\tr^2\tCIlow\tCIhi\tDist\tT-int\n"); long dist; for (int i = 0; i < filteredDPrime... | |
hapMapTranslate.put("NA12003.dup", "dup NA12003.dup 0 0 1 1"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 1" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 1"); hapMapTranslate.put("NA12145", "133... | |
return "[TableProfileResult: col: ??; dataType: ??" + | return "[ColumnProfileResult:" + | public String toString() { return "[TableProfileResult: col: ??; dataType: ??" + "; distinctValues: "+distinctValueCount+ "; minLength: "+minLength+ "; maxLength: "+maxLength+ "; avgLength: "+avgLength+ "; minValue: "+minValue+ ... |
"; avgValue: "+avgValue+"]"; | "; avgValue: "+avgValue+ "; nullCount: "+getNullCount()+ "]"; | public String toString() { return "[TableProfileResult: col: ??; dataType: ??" + "; distinctValues: "+distinctValueCount+ "; minLength: "+minLength+ "; maxLength: "+maxLength+ "; avgLength: "+avgLength+ "; minValue: "+minValue+ ... |
protected abstract void init(Map<String, String> properties); | public void init(Element componentConfig) { id = componentConfig.getAttribute(ID).getValue(); properties = new Properties(componentConfig); init(properties); Element eventElement = componentConfig.getChild("event"); if(eventElement != null){ event = new Event(eventElement); } } | protected abstract void init(Map<String, String> properties); |
protected XMLOutput createXMLOutput() throws Exception { | protected XMLOutput createXMLOutput(Writer writer) throws Exception { | protected XMLOutput createXMLOutput() throws Exception { OutputFormat format = null; if (prettyPrint) { format = OutputFormat.createPrettyPrint(); } else { format = new OutputFormat(); } if ( encoding != null ) { format.setEncoding( ... |
OutputStream out = new FileOutputStream(name); | protected XMLOutput createXMLOutput() throws Exception { OutputFormat format = null; if (prettyPrint) { format = OutputFormat.createPrettyPrint(); } else { format = new OutputFormat(); } if ( encoding != null ) { format.setEncoding( ... | |
? new HTMLWriter(out, format) : new XMLWriter(out, format); | ? new HTMLWriter(writer, format) : new XMLWriter(writer, format); | protected XMLOutput createXMLOutput() throws Exception { OutputFormat format = null; if (prettyPrint) { format = OutputFormat.createPrettyPrint(); } else { format = new OutputFormat(); } if ( encoding != null ) { format.setEncoding( ... |
if ( name == null ) { throw new MissingAttributeException( "name" ); | if ( name != null ) { Writer writer = new FileWriter(name); writeBody(writer); | public void doTag(final XMLOutput output) throws Exception { if ( name == null ) { throw new MissingAttributeException( "name" ); } XMLOutput newOutput = createXMLOutput(); try { newOutput.startDocument(); invokeBody(newOutput); newOutput.endDo... |
XMLOutput newOutput = createXMLOutput(); try { newOutput.startDocument(); invokeBody(newOutput); newOutput.endDocument(); | else if (var != null) { StringWriter writer = new StringWriter(); writeBody(writer); context.setVariable(var, writer.toString()); | public void doTag(final XMLOutput output) throws Exception { if ( name == null ) { throw new MissingAttributeException( "name" ); } XMLOutput newOutput = createXMLOutput(); try { newOutput.startDocument(); invokeBody(newOutput); newOutput.endDo... |
finally { newOutput.close(); | else { throw new JellyException( "This tag must have either the 'name' or the 'var' variables defined" ); | public void doTag(final XMLOutput output) throws Exception { if ( name == null ) { throw new MissingAttributeException( "name" ); } XMLOutput newOutput = createXMLOutput(); try { newOutput.startDocument(); invokeBody(newOutput); newOutput.endDo... |
String dbTableName = rs.getString(3); if (dbTableName != null) { if (!dbTableName.equalsIgnoreCase(tableName)) { logger.warn("Got column "+col.getName()+" from "+dbTableName +" in metadata for "+tableName+"; not adding this column."); continue; } } else { logger.warn("Table name not specified in metadata. Continuing a... | static void addColumnsToTable(SQLTable addTo, String catalog, String schema, String tableName) throws SQLException, DuplicateColumnException, ArchitectException { Connection con = addTo.parentDatabase.getConnection(); ResultSet rs = null; try { DatabaseMetaData dbmd = con.getMetaDa... | |
pvd.addDatabase( db1 ); | try { pvd.addDatabase( db1 ); } catch (PhotovaultException ex) { fail( "Exception while registering database: " + ex.getMessage() ); } | public void testDatabaseCollection() { PhotovaultDatabases pvd = new PhotovaultDatabases(); PVDatabase db1 = new PVDatabase(); db1.setName( "test1" ); db1.setDbName( "database1" ); db1.setDbHost( "machine" ); pvd.addDatabase( db1 ); PVDatabase db2 = new PVDat... |
pvd.addDatabase( db2 ); | try { pvd.addDatabase( db2 ); } catch (PhotovaultException ex) { fail( "Exception while registering database: " + ex.getMessage() ); } | public void testDatabaseCollection() { PhotovaultDatabases pvd = new PhotovaultDatabases(); PVDatabase db1 = new PVDatabase(); db1.setName( "test1" ); db1.setDbName( "database1" ); db1.setDbHost( "machine" ); pvd.addDatabase( db1 ); PVDatabase db2 = new PVDat... |
if ( folders != null ) { Object[] foldersArray = folders.toArray(); for ( int n = 0; n < foldersArray.length; n++ ) { ((PhotoFolder)foldersArray[n]).removePhoto( this ); } } | public void delete() { Implementation odmg = ODMG.getODMGImplementation(); Database db = ODMG.getODMGDatabase(); ODMGXAWrapper txw = new ODMGXAWrapper(); // First delete all instances for ( int i = 0; i < instances.size(); i++ ) { ImageInstance f = (ImageInstance) instances.get( i ); f.delete(); } // Then ... | |
return null; | return getDefaultThumbnail(); | protected static Thumbnail createThumbnail( PhotoInfo photo, File thumbnailFile ) { Thumbnail thumb = new Thumbnail(); thumb.photo = photo; log.debug( "Creating thumbnail for " + photo.getUid() ); log.debug( " - " + thumbnailFile.getPath() ); try { thumb.image = ImageIO.read( thumbnailFile ); } catch ( IOExcep... |
String thisOne = new String(x + " "); boolean start = false; | Vector do4Gamete(){ Vector blocks = new Vector(); for (int x = 0; x < dPrime.length-1; x++){ String thisOne = new String(x + " "); boolean start = false; for (int y = x+1; y < dPrime.length; y++){ PairwiseLinkage thisPair = dPrime[x][y]; double[] freqs = thisPair.getFreqs(); int numGam = 0; for (int... | |
if (numGam == 4){ if (start){ boolean isABlock = true; if (isABlock){ thisOne += y-1; blocks.add(thisOne); x=y-1; | if (numGam > 3){ continue; } Vector addMe = new Vector(); int sep = y - x - 1; addMe.add(String.valueOf(x)); addMe.add(String.valueOf(y)); addMe.add(String.valueOf(sep)); if (strongPairs.size() == 0){ strongPairs.add(addMe); }else{ for (int v = 0; v < strongPairs.size(); v ++){ if (sep >= Integer.parseInt((String)((V... | Vector do4Gamete(){ Vector blocks = new Vector(); for (int x = 0; x < dPrime.length-1; x++){ String thisOne = new String(x + " "); boolean start = false; for (int y = x+1; y < dPrime.length; y++){ PairwiseLinkage thisPair = dPrime[x][y]; double[] freqs = thisPair.getFreqs(); int numGam = 0; for (int... |
break; | Vector do4Gamete(){ Vector blocks = new Vector(); for (int x = 0; x < dPrime.length-1; x++){ String thisOne = new String(x + " "); boolean start = false; for (int y = x+1; y < dPrime.length; y++){ PairwiseLinkage thisPair = dPrime[x][y]; double[] freqs = thisPair.getFreqs(); int numGam = 0; for (int... | |
start = true; | } } boolean[] usedInBlock = new boolean[dPrime.length + 1]; for (int v = 0; v < strongPairs.size(); v++){ boolean isABlock = true; int first = Integer.parseInt((String)((Vector)strongPairs.elementAt(v)).elementAt(0)); int last = Integer.parseInt((String)((Vector)strongPairs.elementAt(v)).elementAt(1)); if (usedInBlo... | Vector do4Gamete(){ Vector blocks = new Vector(); for (int x = 0; x < dPrime.length-1; x++){ String thisOne = new String(x + " "); boolean start = false; for (int y = x+1; y < dPrime.length; y++){ PairwiseLinkage thisPair = dPrime[x][y]; double[] freqs = thisPair.getFreqs(); int numGam = 0; for (int... |
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 { DefineTagLibTag tag = (DefineTagLibTag) findAncestorWithClass(this, DefineTagLibTag.class); if ( tag == null ) { throw new JellyException( "<define:tag> must be inside <define:taglib>" ); } tag.g... |
public Object evaluate(Context context) { | public Object evaluate(JellyContext context) { | public Object evaluate(Context context) { this.context = context; xpath.setVariableContext( this ); return xpath; } |
throw new JellyTagException(e); | throw new JellyTagException(inner); | public void doTag(XMLOutput output) throws JellyTagException { // lets find any attributes that are not set and for ( Iterator iter = attributes.values().iterator(); iter.hasNext(); ) { Attribute attribute = (Attribute) iter.next(); String name = attribute.getName(); ... |
}else{ useable.addAll(victor); | }else if (victor.size() == 1){ Individual singleton = (Individual) victor.elementAt(0); if (!(singleton.getGenoPC() < 1 - Options.getMissingThreshold())){ useable.addAll(victor); } | public Vector check() throws PedFileException{ //before we perform the check we want to prune out individuals with too much missing data //or trios which contain individuals with too much missing data Iterator fitr = families.values().iterator(); Vector useable = new Vector(); whi... |
AffineTransformOp atOp = new AffineTransformOp( xform, AffineTransformOp.TYPE_BILINEAR ); | AffineTransformOp atOp = new AffineTransformOp( xform, AffineTransformOp.TYPE_NEAREST_NEIGHBOR ); log.warn( "Filtering..." ); | protected void createThumbnail( Volume volume ) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instances.g... |
log.warn( "Loading thumbnail..." ); | protected void createThumbnail( Volume volume ) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instances.g... | |
return Thumbnail.getDefaultThumbnail(); | thumbnail = Thumbnail.getDefaultThumbnail(); | public Thumbnail getThumbnail() { log.debug( "Finding thumbnail for " + uid ); if ( thumbnail == null ) { // First try to find an instance from existing instances ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ImageInstance instance = (ImageInstance) instances.get( n ); ... |
multidprime += (rowSum[i]/multilocusTotal)*(colSum[j]/multilocusTotal)*Math.abs(num/denom); | if (denom != 0){ noDivByZero = true; multidprime += (rowSum[i]/multilocusTotal)*(colSum[j]/multilocusTotal)*Math.abs(num/denom); } | Haplotype[][] generateCrossovers(Haplotype[][] haplos) throws HaploViewException{ Vector crossBlock = new Vector(); double CROSSOVER_THRESHOLD = 0.01; //to what percentage do we want to consider crossings? if (haplos.length == 0) return null; //seed first block with ordering numbers ... |
multidprimeArray[gap] = multidprime; | if (noDivByZero){ multidprimeArray[gap] = multidprime; }else{ multidprimeArray[gap] = 1.00; } | Haplotype[][] generateCrossovers(Haplotype[][] haplos) throws HaploViewException{ Vector crossBlock = new Vector(); double CROSSOVER_THRESHOLD = 0.01; //to what percentage do we want to consider crossings? if (haplos.length == 0) return null; //seed first block with ordering numbers ... |
registerTag( "script", DefineScriptTag.class ); | public DefineTagLibrary() { registerTag( "taglib", DefineTagLibTag.class ); registerTag( "tag", DefineTagTag.class ); registerTag( "invokeBody", InvokeBodyTag.class ); } | |
if (currentColor != null) { g2.setColor(tp.getForeground()); } | public void paint(Graphics g, JComponent c) { TablePane tp = (TablePane) c; try { Graphics2D g2 = (Graphics2D) g; if (logger.isDebugEnabled()) { Rectangle clip = g2.getClipBounds(); if (clip != null) { g2.setColor(Color.red); clip.width--; clip.height--; g2.draw(clip); g2.setColor... | |
protected void doCreateRelationship() { | static public void doCreateRelationship(SQLTable pkTable,SQLTable fkTable,PlayPen pp, boolean identifying) { | protected void doCreateRelationship() { try { SQLRelationship model = new SQLRelationship(); // XXX: need to ensure uniqueness of setName(), but // to_identifier should take care of this... model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identify... |
model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); | model.setName(pkTable.getName()+"_"+fkTable.getName()+"_fk"); | protected void doCreateRelationship() { try { SQLRelationship model = new SQLRelationship(); // XXX: need to ensure uniqueness of setName(), but // to_identifier should take care of this... model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identify... |
model.setPkTable(pkTable.getModel()); model.setFkTable(fkTable.getModel()); | model.setPkTable(pkTable); model.setFkTable(fkTable); | protected void doCreateRelationship() { try { SQLRelationship model = new SQLRelationship(); // XXX: need to ensure uniqueness of setName(), but // to_identifier should take care of this... model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identify... |
pkTable.getModel().addExportedKey(model); fkTable.getModel().addImportedKey(model); | pkTable.addExportedKey(model); fkTable.addImportedKey(model); | protected void doCreateRelationship() { try { SQLRelationship model = new SQLRelationship(); // XXX: need to ensure uniqueness of setName(), but // to_identifier should take care of this... model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identify... |
java.util.List pkColListCopy = new ArrayList(pkTable.getModel().getColumns().size()); pkColListCopy.addAll(pkTable.getModel().getColumns()); | java.util.List pkColListCopy = new ArrayList(pkTable.getColumns().size()); pkColListCopy.addAll(pkTable.getColumns()); | protected void doCreateRelationship() { try { SQLRelationship model = new SQLRelationship(); // XXX: need to ensure uniqueness of setName(), but // to_identifier should take care of this... model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identify... |
SQLColumn match = fkTable.getModel().getColumnByName(pkCol.getName()); | SQLColumn match = fkTable.getColumnByName(pkCol.getName()); | protected void doCreateRelationship() { try { SQLRelationship model = new SQLRelationship(); // XXX: need to ensure uniqueness of setName(), but // to_identifier should take care of this... model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identify... |
"The primary key column " + pkCol.getName() + " already exists " + " in the child table. Continue using new name " + | "The primary key column " + pkCol.getName() + " already exists\n" + " in the child table, but has an incompatible type. Continue using new name\n" + | protected void doCreateRelationship() { try { SQLRelationship model = new SQLRelationship(); // XXX: need to ensure uniqueness of setName(), but // to_identifier should take care of this... model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identify... |
fkCol.setName(generateUniqueColumnName(pkCol,fkTable.getModel())); | fkCol.setName(generateUniqueColumnName(pkCol,fkTable)); | protected void doCreateRelationship() { try { SQLRelationship model = new SQLRelationship(); // XXX: need to ensure uniqueness of setName(), but // to_identifier should take care of this... model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identify... |
fkTable.getModel().addColumn(fkCol); | fkTable.addColumn(fkCol); | protected void doCreateRelationship() { try { SQLRelationship model = new SQLRelationship(); // XXX: need to ensure uniqueness of setName(), but // to_identifier should take care of this... model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identify... |
fkCol.setPrimaryKeySeq(new Integer(fkTable.getModel().getPkSize())); | fkCol.setPrimaryKeySeq(new Integer(fkTable.getPkSize())); | protected void doCreateRelationship() { try { SQLRelationship model = new SQLRelationship(); // XXX: need to ensure uniqueness of setName(), but // to_identifier should take care of this... model.setName(pkTable.getModel().getName()+"_"+fkTable.getModel().getName()+"_fk"); model.setIdentifying(identify... |
put(PL_SCHEMA_OWNER, schema); | putImpl(PL_SCHEMA_OWNER, schema, "plSchema"); | public void setPlSchema(String schema) { put(PL_SCHEMA_OWNER, schema); } |
put(PL_TYPE, type); | putImpl(PL_TYPE, type, "plDbType"); | public void setPlDbType(String type) { put(PL_TYPE, type); } |
put(PL_DSN, dsn); | putImpl(PL_DSN, dsn, "odbcDsn"); | public void setOdbcDsn(String dsn) { put(PL_DSN, dsn); } |
protected void handleException(JellyException e) throws JellyTagException { | protected void handleException(JellyTagException e) throws JellyTagException { | protected void handleException(JellyException e) throws JellyTagException { if (log.isTraceEnabled()) { log.trace( "Caught exception: " + e, e ); } applyLocation(e); throw new JellyTagException(e); } |
throw new JellyTagException(e); | throw e; | protected void handleException(JellyException e) throws JellyTagException { if (log.isTraceEnabled()) { log.trace( "Caught exception: " + e, e ); } applyLocation(e); throw new JellyTagException(e); } |
JMenu zoomMenu = new JMenu("D prime zoom"); | JMenu zoomMenu = new JMenu("LD zoom"); | public HaploView(){ try{ fc = new JFileChooser(System.getProperty("user.dir")); }catch(NullPointerException n){ try{ UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); fc = new JFileChooser(System.getProperty("user.dir")); ... |
JMenu colorMenu = new JMenu("D prime color scheme"); | JMenu colorMenu = new JMenu("LD color scheme"); | public HaploView(){ try{ fc = new JFileChooser(System.getProperty("user.dir")); }catch(NullPointerException n){ try{ UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); fc = new JFileChooser(System.getProperty("user.dir")); ... |
if (inputOptions[2].equals("")){ inputOptions[2] = "0"; } maxCompDist = Long.parseLong(inputOptions[2])*1000; | void readGenotypes(String[] inputOptions, int type){ //input is a 3 element array with //inputOptions[0] = ped file //inputOptions[1] = info file ("" if none) //inputOptions[2] = max comparison distance (don't compute d' if markers are greater than this dist apart) //type is eithe... | |
DynaTag dynaTag = (DynaTag) tag; | public void run(JellyContext context, XMLOutput output) throws Exception { try { tag.setContext(context); DynaTag dynaTag = (DynaTag) tag; // ### probably compiling this to 2 arrays might be quicker and smaller for (Iterator iter = attributes.entryS... | |
for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.getKey(); Expression expression = (Expression) entry.getValue(); Object value = expression.evaluate(context); dynaTag.setAttribute(name, value); | if ( tag instanceof DynaTag ) { DynaTag dynaTag = (DynaTag) tag; for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.getKey(); Expression expression = (Expression) entry.getValue(); Object value = expression.evaluate(contex... | public void run(JellyContext context, XMLOutput output) throws Exception { try { tag.setContext(context); DynaTag dynaTag = (DynaTag) tag; // ### probably compiling this to 2 arrays might be quicker and smaller for (Iterator iter = attributes.entryS... |
byte[] markers = currentInd.getMarker(loc); | byte[] markers; byte[] zeroArray = {0,0}; if (currentInd.getZeroed(loc)){ markers = zeroArray; }else{ markers = currentInd.getMarker(loc); } | 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... |
double preHET = getPreHET(count); | double[] freqStuff = getFreqStuff(count); double preHET = freqStuff[0]; double maf = freqStuff[1]; | 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... |
int rating = this.getRating(genopct, pvalue, obsHET, mendErrNum); | int rating = this.getRating(genopct, pvalue, obsHET, mendErrNum,maf); | 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.setMAF(maf); | 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... | |
private int getRating(double genopct, double pval, double obsHet, int menderr){ | private int getRating(double genopct, double pval, double obsHet, int menderr, double maf){ | private int getRating(double genopct, double pval, double obsHet, int menderr){ int rating = 0; if (obsHet < 0.01){ rating -= 1; } if (genopct < failedGenoCut){ rating -= 2; } if (pval < hwCut){ rating -= 4; } if (menderr > numMendErrCut){ rating -= 8; } if (rating == 0){ ra... |
return "To be implemented:errorCode:" + errorCode; | return ErrorCatalog.getMessage(errorCode, values); | public String getMessage(){ // TODO: look in the message catalog and get an error string return "To be implemented:errorCode:" + errorCode; } |
if (Constants.BETA_VERSION > 0){ UpdateChecker betaUc; betaUc = new UpdateChecker(); try { betaUc.checkForUpdate(); } catch(IOException ioe) { } if (betaUc.isNewVersionAvailable()){ UpdateDisplayDialog betaUdp = new UpdateDisplayDialog(window,"Update Check",betaUc); betaUdp.pack(); betaUdp.setVisible(true); } } | public static void main(String[] args) { //this parses the command line arguments. if nogui mode is specified, //then haploText will execute whatever the user specified HaploText argParser = new HaploText(args); //if nogui is specified, then HaploText has already executed everything, and... | |
if(uc != null) { | if(uc != null && Constants.BETA_VERSION == 0) { | public static SwingWorker showUpdatePanel(){ final SwingWorker worker; worker = new SwingWorker(){ UpdateChecker uc; public Object construct() { uc = new UpdateChecker(); try { uc.checkForUpdate(); } catch(IOExceptio... |
if (Constants.BETA_VERSION == 0){ udp.setLayout(new BoxLayout(udp, BoxLayout.Y_AXIS)); double version = uc.getNewVersion(); Font detailsFont = new Font("Default", Font.PLAIN, 14); JLabel announceLabel = new JLabel("A newer version of Haploview (" +version+") is available."); announceLabel.setFont(detailsFont); JLabel d... | udp.setLayout(new BoxLayout(udp, BoxLayout.Y_AXIS)); double version = uc.getNewVersion(); Font detailsFont = new Font("Default", Font.PLAIN, 14); JLabel announceLabel = new JLabel("A newer version of Haploview (" +version+") is available."); announceLabel.setFont(detailsFont); JLabel detailsLabel = new JLabel("See \"Ch... | public static SwingWorker showUpdatePanel(){ final SwingWorker worker; worker = new SwingWorker(){ UpdateChecker uc; public Object construct() { uc = new UpdateChecker(); try { uc.checkForUpdate(); } catch(IOExceptio... |
java.util.Timer updateTimer = new java.util.Timer(); updateTimer.schedule(new TimerTask() { public void run() { jlp.remove(udp); jlp.repaint(); } },6000); }else{ UpdateDisplayDialog betaUdp = new UpdateDisplayDialog(window,"Update Check",uc); betaUdp.pack(); betaUdp.setVisible(true); } | java.util.Timer updateTimer = new java.util.Timer(); updateTimer.schedule(new TimerTask() { public void run() { jlp.remove(udp); jlp.repaint(); } },6000); | public static SwingWorker showUpdatePanel(){ final SwingWorker worker; worker = new SwingWorker(){ UpdateChecker uc; public Object construct() { uc = new UpdateChecker(); try { uc.checkForUpdate(); } catch(IOExceptio... |
if(uc != null) { | if(uc != null && Constants.BETA_VERSION == 0) { | public void finished() { if(uc != null) { if(uc.isNewVersionAvailable()) { //theres an update available so lets pop some crap up final JLayeredPane jlp = window.getLayeredPane(); final JPanel udp = new JPa... |
if (Constants.BETA_VERSION == 0){ udp.setLayout(new BoxLayout(udp, BoxLayout.Y_AXIS)); double version = uc.getNewVersion(); Font detailsFont = new Font("Default", Font.PLAIN, 14); JLabel announceLabel = new JLabel("A newer version of Haploview (" +version+") is available."); announceLabel.setFont(detailsFont); JLabel d... | udp.setLayout(new BoxLayout(udp, BoxLayout.Y_AXIS)); double version = uc.getNewVersion(); Font detailsFont = new Font("Default", Font.PLAIN, 14); JLabel announceLabel = new JLabel("A newer version of Haploview (" +version+") is available."); announceLabel.setFont(detailsFont); JLabel detailsLabel = new JLabel("See \"Ch... | public void finished() { if(uc != null) { if(uc.isNewVersionAvailable()) { //theres an update available so lets pop some crap up final JLayeredPane jlp = window.getLayeredPane(); final JPanel udp = new JPa... |
java.util.Timer updateTimer = new java.util.Timer(); updateTimer.schedule(new TimerTask() { public void run() { jlp.remove(udp); jlp.repaint(); } },6000); }else{ UpdateDisplayDialog betaUdp = new UpdateDisplayDialog(window,"Update Check",uc); betaUdp.pack(); betaUdp.setVisible(true); } | java.util.Timer updateTimer = new java.util.Timer(); updateTimer.schedule(new TimerTask() { public void run() { jlp.remove(udp); jlp.repaint(); } },6000); | public void finished() { if(uc != null) { if(uc.isNewVersionAvailable()) { //theres an update available so lets pop some crap up final JLayeredPane jlp = window.getLayeredPane(); final JPanel udp = new JPa... |
JMenuItem clearItem = new JMenuItem("Clear Recent Files"); clearItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { recent.clear(); } }); | private void init() throws ArchitectException { int accelMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); prefs = PrefsUtils.getUserPrefsNode(architectSession); CoreUserSettings us; // must be done right away, because a static // initializer in this class effects BeanUtils // behaviour wh... | |
fileMenu.add(recent); fileMenu.add(clearItem); | fileMenu.add(recent); | private void init() throws ArchitectException { int accelMask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); prefs = PrefsUtils.getUserPrefsNode(architectSession); CoreUserSettings us; // must be done right away, because a static // initializer in this class effects BeanUtils // behaviour wh... |
ExportCSV export = new ExportCSV(getProject().getPlayPen().getDatabase().getTables()); | final MappingReport mr ; final List<SQLTable> selectedTables; if (playpen.getSelectedTables().size() == 0) { selectedTables = new ArrayList(playpen.getTables()); } else { if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(ArchitectFrame.getMainInstance(),"View only the "+playpen.getSelectedTables().size()+" se... | public void actionPerformed(ActionEvent e) { try { ExportCSV export = new ExportCSV(getProject().getPlayPen().getDatabase().getTables()); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setS... |
File file = null; | final JFrame f = new JFrame("Mapping Report"); | public void actionPerformed(ActionEvent e) { try { ExportCSV export = new ExportCSV(getProject().getPlayPen().getDatabase().getTables()); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setS... |
JFileChooser fileDialog = new JFileChooser(); fileDialog.setSelectedFile(new File("map.csv")); | JPanel mrPanel = new JPanel() { protected void paintComponent(java.awt.Graphics g) { | public void actionPerformed(ActionEvent e) { try { ExportCSV export = new ExportCSV(getProject().getPlayPen().getDatabase().getTables()); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setS... |
if (fileDialog.showSaveDialog(ArchitectFrame.getMainInstance()) == JFileChooser.APPROVE_OPTION){ file = fileDialog.getSelectedFile(); } else { return; } | super.paintComponent(g); try { mr.drawHighLevelReport((Graphics2D) g,null); } catch (ArchitectException e1) { logger.error("ArchitectException while generating mapping diagram", e1); ASUtils.showExceptionDialog(ArchitectFrame.this, "Couldn't generate mapping diagram", e1); } } }; mrPanel.setDoubleBuffered(true); mrPane... | public void actionPerformed(ActionEvent e) { try { ExportCSV export = new ExportCSV(getProject().getPlayPen().getDatabase().getTables()); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setS... |
FileWriter output = null; output = new FileWriter(file); output.write(export.getCSVMapping()); output.flush(); } catch (IOException e1) { throw new RuntimeException(e1); | public void actionPerformed(ActionEvent e) { try { ExportCSV export = new ExportCSV(selectedTables); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setSelectedFile(new File("map.csv")); if (fileDialog.showSaveDialog(ArchitectFrame.getMainInstance()) == JFileChooser.APPROVE_OPTION){ file =... | public void actionPerformed(ActionEvent e) { try { ExportCSV export = new ExportCSV(getProject().getPlayPen().getDatabase().getTables()); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setS... |
try { ExportCSV export = new ExportCSV(selectedTables); File file = null; JFileChooser fileDialog = new JFileChooser(); fileDialog.setSelectedFile(new File("map.csv")); if (fileDialog.showSaveDialog(ArchitectFrame.getMainInstance()) == JFileChooser.APPROVE_OPTION){ file = fileDialog.getSelectedFile(); } else { retur... | f.setVisible(false); | public void actionPerformed(ActionEvent e) { try { ExportCSV export = new ExportCSV(selectedTables); File file = null; JFileChooser fileDialog = new JFileChooser(); ... |
recent.clear(); } | saveOrSaveAs(false, true); } | public void actionPerformed(ActionEvent e) { recent.clear(); } |
saveOrSaveAs(false, true); | saveOrSaveAs(true, true); | public void actionPerformed(ActionEvent e) { saveOrSaveAs(false, true); } |
saveOrSaveAs(true, true); | playpen.setZoom(1.0); | public void actionPerformed(ActionEvent e) { saveOrSaveAs(true, true); } |
playpen.setZoom(1.0); | Rectangle rect = null; if ( playpen != null ) { for (int i = 0; i < playpen.getContentPane().getComponentCount(); i++) { PlayPenComponent ppc = playpen.getContentPane().getComponent(i); if ( rect == null ) { rect = new Rectangle(ppc.getLocation(),ppc.getSize()); } else { rect.add(ppc.getBounds()); } } | public void actionPerformed(ActionEvent e) { playpen.setZoom(1.0); } |
if ( rect == null ) return; double zoom = Math.min(playpen.getViewportSize().getHeight()/rect.height, playpen.getViewportSize().getWidth()/rect.width); zoom *= 0.90; playpen.setZoom(zoom); playpen.scrollRectToVisible(playpen.zoomRect(rect)); } | public void actionPerformed(ActionEvent e) { playpen.setZoom(1.0); } | |
Rectangle rect = null; if ( playpen != null ) { for (int i = 0; i < playpen.getContentPane().getComponentCount(); i++) { PlayPenComponent ppc = playpen.getContentPane().getComponent(i); if ( rect == null ) { rect = new Rectangle(ppc.getLocation(),ppc.getSize()); } else { rect.add(ppc.getBounds()); } } } | try { ExportCSV export = new ExportCSV(getProject().getPlayPen().getDatabase().getTables()); | public void actionPerformed(ActionEvent e) { Rectangle rect = null; if ( playpen != null ) { for (int i = 0; i < playpen.getContentPane().getComponentCount(); i++) { PlayPenComponent ppc = playpen.getContentPane().getComponent(i); if ( rect == null ) { rect = new Rectangle(ppc.getLoc... |
if ( rect == null ) return; | File file = null; | public void actionPerformed(ActionEvent e) { Rectangle rect = null; if ( playpen != null ) { for (int i = 0; i < playpen.getContentPane().getComponentCount(); i++) { PlayPenComponent ppc = playpen.getContentPane().getComponent(i); if ( rect == null ) { rect = new Rectangle(ppc.getLoc... |
double zoom = Math.min(playpen.getViewportSize().getHeight()/rect.height, playpen.getViewportSize().getWidth()/rect.width); zoom *= 0.90; | JFileChooser fileDialog = new JFileChooser(); fileDialog.setSelectedFile(new File("map.csv")); | public void actionPerformed(ActionEvent e) { Rectangle rect = null; if ( playpen != null ) { for (int i = 0; i < playpen.getContentPane().getComponentCount(); i++) { PlayPenComponent ppc = playpen.getContentPane().getComponent(i); if ( rect == null ) { rect = new Rectangle(ppc.getLoc... |
playpen.setZoom(zoom); playpen.scrollRectToVisible(playpen.zoomRect(rect)); } | if (fileDialog.showSaveDialog(ArchitectFrame.getMainInstance()) == JFileChooser.APPROVE_OPTION){ file = fileDialog.getSelectedFile(); } else { return; } FileWriter output = null; output = new FileWriter(file); output.write(export.getCSVMapping()); output.flush(); } catch (IOException e1) { throw new RuntimeException(e... | public void actionPerformed(ActionEvent e) { Rectangle rect = null; if ( playpen != null ) { for (int i = 0; i < playpen.getContentPane().getComponentCount(); i++) { PlayPenComponent ppc = playpen.getContentPane().getComponent(i); if ( rect == null ) { rect = new Rectangle(ppc.getLoc... |
Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler()); logger.debug("current motion threshold is: " + System.getProperty("awt.dnd.drag.threshold")); System.setProperty("awt.dnd.drag.threshold","10"); logger.debug("new motion threshold is: " + System.getProperty("awt.dnd.drag.threshold")); getMainInstance... | try { lastSaveOpSuccessful = false; project.setSaveInProgress(true); project.save(finalSeparateThread ? pm : null); lastSaveOpSuccessful = true; JOptionPane.showMessageDialog(ArchitectFrame.this, "Save successful"); } catch (Exception ex) { lastSaveOpSuccessful = false; JOptionPane.showMessageDialog (ArchitectFrame.thi... | public void run() { Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler()); // this doesn't appear to have any effect on the motion threshold // in the Playpen, but it does seem to work on the DBTree... logger.debug("current motion threshold is: " + System.getPropert... |
logger.debug("bounds: " + cbounds); | public Dimension getPreferredSize() { Rectangle cbounds = null; //int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE, maxx = 0, maxy = 0; int minx = 0, miny = 0, maxx = 0, maxy = 0; for (int i = 0; i < contentPane.getComponentCount(); i++) { Component c = contentPane.getComponent(i); if (c.isVisible()) { ... | |
logger.debug("min:("+minx+","+miny+"),max:("+maxx+","+maxy+")"); | public Dimension getPreferredSize() { Rectangle cbounds = null; //int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE, maxx = 0, maxy = 0; int minx = 0, miny = 0, maxx = 0, maxy = 0; for (int i = 0; i < contentPane.getComponentCount(); i++) { Component c = contentPane.getComponent(i); if (c.isVisible()) { ... | |
Dimension min = getMinimumSize(); | public Dimension getPreferredSize() { Rectangle cbounds = null; //int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE, maxx = 0, maxy = 0; int minx = 0, miny = 0, maxx = 0, maxy = 0; for (int i = 0; i < contentPane.getComponentCount(); i++) { Component c = contentPane.getComponent(i); if (c.isVisible()) { ... | |
logger.debug("userDim is: " + userDim); Dimension usedSpace = new Dimension((int) ((double) Math.max(maxx - minx, min.width) * zoom), (int) ((double) Math.max(maxy - miny, min.height) * zoom)); logger.debug("zoom="+zoom+",usedSpace size is viewport size: " + usedSpace); | Dimension usedSpace = new Dimension((int) ((double) Math.max(maxx - minx, getMinimumSize().width) * zoom), (int) ((double) Math.max(maxy - miny, getMinimumSize().height) * zoom)); Dimension vpSize = getViewportSize(); Dimension ppSize = null; | public Dimension getPreferredSize() { Rectangle cbounds = null; //int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE, maxx = 0, maxy = 0; int minx = 0, miny = 0, maxx = 0, maxy = 0; for (int i = 0; i < contentPane.getComponentCount(); i++) { Component c = contentPane.getComponent(i); if (c.isVisible()) { ... |
Dimension vpSize = getViewportSize(); if (vpSize != null) { if (vpSize.width > usedSpace.width && vpSize.height > usedSpace.height) { logger.debug("preferered size is viewport?: " + vpSize); return vpSize; } | if (vpSize != null) { ppSize = new Dimension(Math.max(usedSpace.width, vpSize.width), Math.max(usedSpace.height, vpSize.height)); | public Dimension getPreferredSize() { Rectangle cbounds = null; //int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE, maxx = 0, maxy = 0; int minx = 0, miny = 0, maxx = 0, maxy = 0; for (int i = 0; i < contentPane.getComponentCount(); i++) { Component c = contentPane.getComponent(i); if (c.isVisible()) { ... |
logger.debug("preferred size is usedSpace?: " + usedSpace); return usedSpace; | logger.debug("minsize is: " + getMinimumSize()); logger.debug("unzoomed userDim is: " + userDim); logger.debug("zoom="+zoom+",usedSpace size is " + usedSpace); if (ppSize != null) { logger.debug("preferred size is ppSize (viewport size was null): " + ppSize); return ppSize; } else { logger.debug("preferred size is use... | public Dimension getPreferredSize() { Rectangle cbounds = null; //int minx = Integer.MAX_VALUE, miny = Integer.MAX_VALUE, maxx = 0, maxy = 0; int minx = 0, miny = 0, maxx = 0, maxy = 0; for (int i = 0; i < contentPane.getComponentCount(); i++) { Component c = contentPane.getComponent(i); if (c.isVisible()) { ... |
registerBeanFactory( "progressBar", JProgressBar.class ); | protected void registerFactories() { registerBeanFactory( "button", JButton.class ); registerBeanFactory( "buttonGroup", ButtonGroup.class ); registerBeanFactory( "checkBox", JCheckBox.class ); registerBeanFactory( "checkBoxMenuItem", JCheckBoxMenuItem.class ); registerBeanFacto... | |
getBody().run(context, new XMLOutput( handler ) ); | invokeBody( new XMLOutput( handler ) ); | public void doTag(final XMLOutput output) throws Exception { if ( verifier == null ) { throw new MissingAttributeException("verifier"); } boolean valid = false; // evaluate the body using the current Verifier if ( errorHandler != null ) { // we a... |
if ( exportImage.getSampleModel().getSampleSize( 0 ) == 16 ) { double[] subtract = new double[1]; subtract[0] = 0; double[] divide = new double[1]; divide[0] = 1./256.; ParameterBlock pbRescale = new ParameterBlock(); pbRescale.add(divide); pbRescale.add(subtract); pbRescale.addSource( exportImage ); PlanarImage o... | public void exportPhoto( File file, int width, int height ) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); // Find the original image to use as a staring point ImageInstance original = null; for ( int n = 0; n < instances.size(); n++ ) { ... | |
columnsFolder.children.add(newIdx, col); | getColumns().add(newIdx, col); | public void changeColumnIndex(int oldIdx, int newIdx) throws ArchitectException { // remove and add the column directly, then manually fire the event. // This is necessary because the relationships prevent deletion of locked keys. SQLColumn col = (SQLColumn) columnsFolder.children.remove(oldIdx); columnsFolde... |
|| ((SQLColumn) columnsFolder.children.get(newIdx-1)).primaryKeySeq != null) { | || ((SQLColumn) getColumns().get(newIdx-1)).primaryKeySeq != null) { | public void changeColumnIndex(int oldIdx, int newIdx) throws ArchitectException { // remove and add the column directly, then manually fire the event. // This is necessary because the relationships prevent deletion of locked keys. SQLColumn col = (SQLColumn) columnsFolder.children.remove(oldIdx); columnsFolde... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.