rem
stringlengths 0
477k
| add
stringlengths 0
313k
| context
stringlengths 6
599k
|
---|---|---|
public String makeDropForeignKeySQL(String fkCatalog, String fkSchema, String fkTable, String fkName) { | public String makeDropForeignKeySQL(String fkTable, String fkName) { | public String makeDropForeignKeySQL(String fkCatalog, String fkSchema, String fkTable, String fkName) { return "\n ALTER TABLE ONLY " +DDLUtils.toQualifiedName(fkCatalog, fkSchema, fkTable) +" DROP CONSTRAINT " +fkName; } |
+DDLUtils.toQualifiedName(fkCatalog, fkSchema, fkTable) +" DROP CONSTRAINT " +fkName; | + toQualifiedName(fkTable) + " DROP CONSTRAINT " + fkName; | public String makeDropForeignKeySQL(String fkCatalog, String fkSchema, String fkTable, String fkName) { return "\n ALTER TABLE ONLY " +DDLUtils.toQualifiedName(fkCatalog, fkSchema, fkTable) +" DROP CONSTRAINT " +fkName; } |
public void modifyColumn(SQLColumn c) throws ArchitectDiffException { | public void modifyColumn(SQLColumn c) { | public void modifyColumn(SQLColumn c) throws ArchitectDiffException { Map colNameMap = new HashMap(); SQLTable t = c.getParentTable(); print("\n ALTER TABLE ONLY "); print( toQualifiedName(t) ); print(" ALTER COLUMN "); // Column name String columnPhysName = createPhysicalName(colNameMap,c); print(columnPhysName); print(" TYPE "); print(columnType(c)); // Column nullability print(", ALTER COLUMN "); print(columnPhysName); print(" "); print(c.isDefinitelyNullable() ? "DROP" : "SET"); print(" NOT NULL"); endStatement(DDLStatement.StatementType.MODIFY, c); } |
public String toIdentifier(String logicalName, String physicalName) { | private String toIdentifier(String logicalName, String physicalName) { | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; if (logger.isDebugEnabled()) logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toLowerCase(); if (logger.isDebugEnabled()) logger.debug("after replace of spaces: " + ident); // make sure first character is alpha Pattern p = Pattern.compile("^[^a-zA-Z]+"); Matcher m = p.matcher(ident); if (m.find()) { // just add something alpha to the front for now ident = "X" + ident; if (logger.isDebugEnabled()) logger.debug("identifiers must start with letter; prepending X: " + ident); } // see if it's a reserved word, and add something alpha to front if it is... if (isReservedWord(ident)) { ident = "X" + ident; if (logger.isDebugEnabled()) logger.debug("identifier was reserved word, prepending X: " + ident); } // replace anything that is not a letter, character, or underscore with an underscore... ident = ident.replaceAll("[^a-zA-Z0-9_$]", "_"); // first time through // XXX clean this up if (physicalName == null) { // length is ok if (ident.length() <= 63) { return ident; } else { // length is too big if (logger.isDebugEnabled()) logger.debug("truncating identifier: " + ident); String base = ident.substring(0, 60); int tiebreaker = ((ident.hashCode() % 1000) + 1000) % 1000; if (logger.isDebugEnabled()) logger.debug("new identifier: " + base + tiebreaker); return (base + tiebreaker); } } else { // back for more, which means that we probably // had a namespace conflict. Hack the ident down // to size if it's too big, and then generate // a hash tiebreaker using the ident and the // passed value physicalName if (logger.isDebugEnabled()) logger.debug("physical identifier is not unique, regenerating: " + physicalName); String base = ident; if (ident.length() > 63) { base = ident.substring(0, 60); } int tiebreaker = (((ident + physicalName).hashCode() % 1000) + 1000) % 1000; if (logger.isDebugEnabled()) logger.debug("regenerated identifier is: " + (base + tiebreaker)); return (base + tiebreaker); } } |
if (currentInd.getIsTyped()){ byte[] markers = currentInd.getMarker(loc); allele1 = markers[0]; allele2 = markers[1]; String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } if(allele1 > 0 && allele2 >0){ if(!(currentInd.getMomID().equals("0") || currentInd.getDadID().equals("0"))){ byte[] marker = (currentFamily.getMember(currentInd.getMomID())).getMarker(loc); int momAllele1 = marker[0]; int momAllele2 = marker[1]; marker = (currentFamily.getMember(currentInd.getDadID())).getMarker(loc); int dadAllele1 = marker[0]; int dadAllele2 = marker[1]; if (!(momAllele1 == 0 || momAllele2 == 0 || dadAllele1 == 0 || dadAllele2 ==0)){ if(momAllele1 == momAllele2){ if (dadAllele1 == dadAllele2){ if (momAllele1 == dadAllele1){ if (allele1 != momAllele1 || allele2 != momAllele1) { mendErrNum ++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } }else{ if (allele1 == allele2) { mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } | byte[] markers = currentInd.getMarker(loc); allele1 = markers[0]; allele2 = markers[1]; String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } if(allele1 > 0 && allele2 >0){ if(!(currentInd.getMomID().equals("0") || currentInd.getDadID().equals("0"))){ byte[] marker = (currentFamily.getMember(currentInd.getMomID())).getMarker(loc); int momAllele1 = marker[0]; int momAllele2 = marker[1]; marker = (currentFamily.getMember(currentInd.getDadID())).getMarker(loc); int dadAllele1 = marker[0]; int dadAllele2 = marker[1]; if (!(momAllele1 == 0 || momAllele2 == 0 || dadAllele1 == 0 || dadAllele2 ==0)){ if(momAllele1 == momAllele2){ if (dadAllele1 == dadAllele2){ if (momAllele1 == dadAllele1){ if (allele1 != momAllele1 || allele2 != momAllele1) { mendErrNum ++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); | private MarkerResult checkMarker(int loc)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=new Hashtable(); Hashtable parentgeno = new Hashtable(); Hashtable kidgeno = new Hashtable(); //Hashtable parenthom = new Hashtable(); int[] parentHom = new int[5]; //Hashtable count = new Hashtable(); int[] count = new int[5]; for(int i=0;i<5;i++) { parentHom[i] =0; count[i]=0; } //String allele1_string, allele2_string; //loop through each family, check data for marker loc Enumeration famList = _pedFile.getFamList(); while(famList.hasMoreElements()){ Family currentFamily = _pedFile.getFamily((String)famList.nextElement()); Enumeration indList = currentFamily.getMemberList(); //loop through each individual in the current Family while(indList.hasMoreElements()){ currentInd = currentFamily.getMember((String)indList.nextElement()); if (currentInd.getIsTyped()){ byte[] markers = currentInd.getMarker(loc); allele1 = markers[0]; //allele1_string = Integer.toString(allele1); allele2 = markers[1]; //allele2_string = Integer.toString(allele2); String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } //no allele data missing if(allele1 > 0 && allele2 >0){ //make sure entry has parents if(!(currentInd.getMomID().equals("0") || currentInd.getDadID().equals("0"))){ //do mendel check //byte[] marker = ((Individual)pedFileHash.get(familyID + " " + currentInd.getMomID())).getUnfilteredMarker(loc); byte[] marker = (currentFamily.getMember(currentInd.getMomID())).getMarker(loc); int momAllele1 = marker[0]; int momAllele2 = marker[1]; //marker = ((Individual)pedFileHash.get(familyID + " " + currentInd.getDadID())).getUnfilteredMarker(loc); marker = (currentFamily.getMember(currentInd.getDadID())).getMarker(loc); int dadAllele1 = marker[0]; int dadAllele2 = marker[1]; //don't check if parents are missing any data if (!(momAllele1 == 0 || momAllele2 == 0 || dadAllele1 == 0 || dadAllele2 ==0)){ //mom hom if(momAllele1 == momAllele2){ //both parents hom if (dadAllele1 == dadAllele2){ //both parents hom same allele if (momAllele1 == dadAllele1){ //kid must be hom same allele if (allele1 != momAllele1 || allele2 != momAllele1) { mendErrNum ++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } //parents hom diff allele }else{ //kid must be het if (allele1 == allele2) { mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //mom hom dad het }else{ //kid can't be hom for non-momallele if (allele1 != momAllele1 && allele2 != momAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //mom het }else{ //dad hom if (dadAllele1 == dadAllele2){ //kid can't be hom for non-dadallele if(allele1 != dadAllele1 && allele2 != dadAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //both parents het no mend err poss } } } //end mendel check } } } indList = currentFamily.getMemberList(); //loop through each individual in the current Family while(indList.hasMoreElements()){ currentInd = currentFamily.getMember((String)indList.nextElement()); if (currentInd.getIsTyped()){ byte[] markers; byte[] zeroArray = {0,0}; if (currentInd.getZeroed(loc)){ markers = zeroArray; }else{ markers = currentInd.getMarker(loc); } allele1 = markers[0]; //allele1_string = Integer.toString(allele1); allele2 = markers[1]; //allele2_string = Integer.toString(allele2); String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } //no allele data missing if(allele1 > 0 && allele2 >0){ //indiv has no parents -- i.e. is a founder if(currentInd.getMomID().compareTo(Individual.DATA_MISSING)==0 && currentInd.getDadID().compareTo(Individual.DATA_MISSING)==0){ //$parentgeno{$ped}++ //set parentgeno if(parentgeno.containsKey(familyID)){ int value = ((Integer)parentgeno.get(familyID)).intValue() +1; parentgeno.put(familyID, new Integer(value)); } else{ parentgeno.put(familyID, new Integer(1)); } if(allele1 != allele2) { parenthet++; } else{ //incOrSetOne(parenthom,allele1_string); parentHom[allele1]++; } count[allele1]++; count[allele2]++; } else{//$kidgeno{$ped}++ if(kidgeno.containsKey(familyID)){ int value = ((Integer)kidgeno.get(familyID)).intValue() +1; kidgeno.put(familyID, new Integer(value)); } else{ kidgeno.put(familyID, new Integer(1)); } } if(allele1 == allele2) { hom++; } else { het++; } } //missing data else missing++; } } } double obsHET = getObsHET(het, hom); double[] freqStuff = getFreqStuff(count); double preHET = freqStuff[0]; double maf = freqStuff[1]; //HW p value double pvalue = getPValue(parentHom, parenthet); //geno percent double genopct = getGenoPercent(het, hom, missing); // num of families with a fully genotyped trio //int famTrio =0; int famTrio = getNumOfFamTrio(numindivs, parentgeno, kidgeno); //rating int rating = this.getRating(genopct, pvalue, obsHET, mendErrNum,maf); result.setObsHet(obsHET); result.setPredHet(preHET); result.setMAF(maf); result.setHWpvalue(pvalue); result.setGenoPercent(genopct); result.setFamTrioNum(famTrio); result.setMendErrNum(mendErrNum); result.setRating(rating); return result; } |
if (allele1 != momAllele1 && allele2 != momAllele1){ | if (allele1 == allele2) { | private MarkerResult checkMarker(int loc)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=new Hashtable(); Hashtable parentgeno = new Hashtable(); Hashtable kidgeno = new Hashtable(); //Hashtable parenthom = new Hashtable(); int[] parentHom = new int[5]; //Hashtable count = new Hashtable(); int[] count = new int[5]; for(int i=0;i<5;i++) { parentHom[i] =0; count[i]=0; } //String allele1_string, allele2_string; //loop through each family, check data for marker loc Enumeration famList = _pedFile.getFamList(); while(famList.hasMoreElements()){ Family currentFamily = _pedFile.getFamily((String)famList.nextElement()); Enumeration indList = currentFamily.getMemberList(); //loop through each individual in the current Family while(indList.hasMoreElements()){ currentInd = currentFamily.getMember((String)indList.nextElement()); if (currentInd.getIsTyped()){ byte[] markers = currentInd.getMarker(loc); allele1 = markers[0]; //allele1_string = Integer.toString(allele1); allele2 = markers[1]; //allele2_string = Integer.toString(allele2); String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } //no allele data missing if(allele1 > 0 && allele2 >0){ //make sure entry has parents if(!(currentInd.getMomID().equals("0") || currentInd.getDadID().equals("0"))){ //do mendel check //byte[] marker = ((Individual)pedFileHash.get(familyID + " " + currentInd.getMomID())).getUnfilteredMarker(loc); byte[] marker = (currentFamily.getMember(currentInd.getMomID())).getMarker(loc); int momAllele1 = marker[0]; int momAllele2 = marker[1]; //marker = ((Individual)pedFileHash.get(familyID + " " + currentInd.getDadID())).getUnfilteredMarker(loc); marker = (currentFamily.getMember(currentInd.getDadID())).getMarker(loc); int dadAllele1 = marker[0]; int dadAllele2 = marker[1]; //don't check if parents are missing any data if (!(momAllele1 == 0 || momAllele2 == 0 || dadAllele1 == 0 || dadAllele2 ==0)){ //mom hom if(momAllele1 == momAllele2){ //both parents hom if (dadAllele1 == dadAllele2){ //both parents hom same allele if (momAllele1 == dadAllele1){ //kid must be hom same allele if (allele1 != momAllele1 || allele2 != momAllele1) { mendErrNum ++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } //parents hom diff allele }else{ //kid must be het if (allele1 == allele2) { mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //mom hom dad het }else{ //kid can't be hom for non-momallele if (allele1 != momAllele1 && allele2 != momAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //mom het }else{ //dad hom if (dadAllele1 == dadAllele2){ //kid can't be hom for non-dadallele if(allele1 != dadAllele1 && allele2 != dadAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //both parents het no mend err poss } } } //end mendel check } } } indList = currentFamily.getMemberList(); //loop through each individual in the current Family while(indList.hasMoreElements()){ currentInd = currentFamily.getMember((String)indList.nextElement()); if (currentInd.getIsTyped()){ byte[] markers; byte[] zeroArray = {0,0}; if (currentInd.getZeroed(loc)){ markers = zeroArray; }else{ markers = currentInd.getMarker(loc); } allele1 = markers[0]; //allele1_string = Integer.toString(allele1); allele2 = markers[1]; //allele2_string = Integer.toString(allele2); String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } //no allele data missing if(allele1 > 0 && allele2 >0){ //indiv has no parents -- i.e. is a founder if(currentInd.getMomID().compareTo(Individual.DATA_MISSING)==0 && currentInd.getDadID().compareTo(Individual.DATA_MISSING)==0){ //$parentgeno{$ped}++ //set parentgeno if(parentgeno.containsKey(familyID)){ int value = ((Integer)parentgeno.get(familyID)).intValue() +1; parentgeno.put(familyID, new Integer(value)); } else{ parentgeno.put(familyID, new Integer(1)); } if(allele1 != allele2) { parenthet++; } else{ //incOrSetOne(parenthom,allele1_string); parentHom[allele1]++; } count[allele1]++; count[allele2]++; } else{//$kidgeno{$ped}++ if(kidgeno.containsKey(familyID)){ int value = ((Integer)kidgeno.get(familyID)).intValue() +1; kidgeno.put(familyID, new Integer(value)); } else{ kidgeno.put(familyID, new Integer(1)); } } if(allele1 == allele2) { hom++; } else { het++; } } //missing data else missing++; } } } double obsHET = getObsHET(het, hom); double[] freqStuff = getFreqStuff(count); double preHET = freqStuff[0]; double maf = freqStuff[1]; //HW p value double pvalue = getPValue(parentHom, parenthet); //geno percent double genopct = getGenoPercent(het, hom, missing); // num of families with a fully genotyped trio //int famTrio =0; int famTrio = getNumOfFamTrio(numindivs, parentgeno, kidgeno); //rating int rating = this.getRating(genopct, pvalue, obsHET, mendErrNum,maf); result.setObsHet(obsHET); result.setPredHet(preHET); result.setMAF(maf); result.setHWpvalue(pvalue); result.setGenoPercent(genopct); result.setFamTrioNum(famTrio); result.setMendErrNum(mendErrNum); result.setRating(rating); return result; } |
if (dadAllele1 == dadAllele2){ if(allele1 != dadAllele1 && allele2 != dadAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } | if (allele1 != momAllele1 && allele2 != momAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); | private MarkerResult checkMarker(int loc)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=new Hashtable(); Hashtable parentgeno = new Hashtable(); Hashtable kidgeno = new Hashtable(); //Hashtable parenthom = new Hashtable(); int[] parentHom = new int[5]; //Hashtable count = new Hashtable(); int[] count = new int[5]; for(int i=0;i<5;i++) { parentHom[i] =0; count[i]=0; } //String allele1_string, allele2_string; //loop through each family, check data for marker loc Enumeration famList = _pedFile.getFamList(); while(famList.hasMoreElements()){ Family currentFamily = _pedFile.getFamily((String)famList.nextElement()); Enumeration indList = currentFamily.getMemberList(); //loop through each individual in the current Family while(indList.hasMoreElements()){ currentInd = currentFamily.getMember((String)indList.nextElement()); if (currentInd.getIsTyped()){ byte[] markers = currentInd.getMarker(loc); allele1 = markers[0]; //allele1_string = Integer.toString(allele1); allele2 = markers[1]; //allele2_string = Integer.toString(allele2); String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } //no allele data missing if(allele1 > 0 && allele2 >0){ //make sure entry has parents if(!(currentInd.getMomID().equals("0") || currentInd.getDadID().equals("0"))){ //do mendel check //byte[] marker = ((Individual)pedFileHash.get(familyID + " " + currentInd.getMomID())).getUnfilteredMarker(loc); byte[] marker = (currentFamily.getMember(currentInd.getMomID())).getMarker(loc); int momAllele1 = marker[0]; int momAllele2 = marker[1]; //marker = ((Individual)pedFileHash.get(familyID + " " + currentInd.getDadID())).getUnfilteredMarker(loc); marker = (currentFamily.getMember(currentInd.getDadID())).getMarker(loc); int dadAllele1 = marker[0]; int dadAllele2 = marker[1]; //don't check if parents are missing any data if (!(momAllele1 == 0 || momAllele2 == 0 || dadAllele1 == 0 || dadAllele2 ==0)){ //mom hom if(momAllele1 == momAllele2){ //both parents hom if (dadAllele1 == dadAllele2){ //both parents hom same allele if (momAllele1 == dadAllele1){ //kid must be hom same allele if (allele1 != momAllele1 || allele2 != momAllele1) { mendErrNum ++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } //parents hom diff allele }else{ //kid must be het if (allele1 == allele2) { mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //mom hom dad het }else{ //kid can't be hom for non-momallele if (allele1 != momAllele1 && allele2 != momAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //mom het }else{ //dad hom if (dadAllele1 == dadAllele2){ //kid can't be hom for non-dadallele if(allele1 != dadAllele1 && allele2 != dadAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //both parents het no mend err poss } } } //end mendel check } } } indList = currentFamily.getMemberList(); //loop through each individual in the current Family while(indList.hasMoreElements()){ currentInd = currentFamily.getMember((String)indList.nextElement()); if (currentInd.getIsTyped()){ byte[] markers; byte[] zeroArray = {0,0}; if (currentInd.getZeroed(loc)){ markers = zeroArray; }else{ markers = currentInd.getMarker(loc); } allele1 = markers[0]; //allele1_string = Integer.toString(allele1); allele2 = markers[1]; //allele2_string = Integer.toString(allele2); String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } //no allele data missing if(allele1 > 0 && allele2 >0){ //indiv has no parents -- i.e. is a founder if(currentInd.getMomID().compareTo(Individual.DATA_MISSING)==0 && currentInd.getDadID().compareTo(Individual.DATA_MISSING)==0){ //$parentgeno{$ped}++ //set parentgeno if(parentgeno.containsKey(familyID)){ int value = ((Integer)parentgeno.get(familyID)).intValue() +1; parentgeno.put(familyID, new Integer(value)); } else{ parentgeno.put(familyID, new Integer(1)); } if(allele1 != allele2) { parenthet++; } else{ //incOrSetOne(parenthom,allele1_string); parentHom[allele1]++; } count[allele1]++; count[allele2]++; } else{//$kidgeno{$ped}++ if(kidgeno.containsKey(familyID)){ int value = ((Integer)kidgeno.get(familyID)).intValue() +1; kidgeno.put(familyID, new Integer(value)); } else{ kidgeno.put(familyID, new Integer(1)); } } if(allele1 == allele2) { hom++; } else { het++; } } //missing data else missing++; } } } double obsHET = getObsHET(het, hom); double[] freqStuff = getFreqStuff(count); double preHET = freqStuff[0]; double maf = freqStuff[1]; //HW p value double pvalue = getPValue(parentHom, parenthet); //geno percent double genopct = getGenoPercent(het, hom, missing); // num of families with a fully genotyped trio //int famTrio =0; int famTrio = getNumOfFamTrio(numindivs, parentgeno, kidgeno); //rating int rating = this.getRating(genopct, pvalue, obsHET, mendErrNum,maf); result.setObsHet(obsHET); result.setPredHet(preHET); result.setMAF(maf); result.setHWpvalue(pvalue); result.setGenoPercent(genopct); result.setFamTrioNum(famTrio); result.setMendErrNum(mendErrNum); result.setRating(rating); return result; } |
if (currentInd.getIsTyped()){ byte[] markers; byte[] zeroArray = {0,0}; if (currentInd.getZeroed(loc)){ markers = zeroArray; }else{ markers = currentInd.getMarker(loc); } allele1 = markers[0]; allele2 = markers[1]; String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } if(allele1 > 0 && allele2 >0){ if(currentInd.getMomID().compareTo(Individual.DATA_MISSING)==0 && currentInd.getDadID().compareTo(Individual.DATA_MISSING)==0){ if(parentgeno.containsKey(familyID)){ int value = ((Integer)parentgeno.get(familyID)).intValue() +1; parentgeno.put(familyID, new Integer(value)); } else{ parentgeno.put(familyID, new Integer(1)); } if(allele1 != allele2) { parenthet++; } else{ parentHom[allele1]++; } count[allele1]++; count[allele2]++; } else{ if(kidgeno.containsKey(familyID)){ int value = ((Integer)kidgeno.get(familyID)).intValue() +1; kidgeno.put(familyID, new Integer(value)); } else{ kidgeno.put(familyID, new Integer(1)); } } if(allele1 == allele2) { hom++; } else { het++; } } else missing++; } | byte[] markers; byte[] zeroArray = {0,0}; if (currentInd.getZeroed(loc)){ markers = zeroArray; }else{ markers = currentInd.getMarker(loc); } allele1 = markers[0]; allele2 = markers[1]; String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } if(allele1 > 0 && allele2 >0){ if(currentInd.getMomID().compareTo(Individual.DATA_MISSING)==0 && currentInd.getDadID().compareTo(Individual.DATA_MISSING)==0){ if(parentgeno.containsKey(familyID)){ int value = ((Integer)parentgeno.get(familyID)).intValue() +1; parentgeno.put(familyID, new Integer(value)); } else{ parentgeno.put(familyID, new Integer(1)); } if(allele1 != allele2) { parenthet++; } else{ parentHom[allele1]++; } count[allele1]++; count[allele2]++; } else{ if(kidgeno.containsKey(familyID)){ int value = ((Integer)kidgeno.get(familyID)).intValue() +1; kidgeno.put(familyID, new Integer(value)); } else{ kidgeno.put(familyID, new Integer(1)); } } if(allele1 == allele2) { hom++; } else { het++; } } else missing++; | private MarkerResult checkMarker(int loc)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=new Hashtable(); Hashtable parentgeno = new Hashtable(); Hashtable kidgeno = new Hashtable(); //Hashtable parenthom = new Hashtable(); int[] parentHom = new int[5]; //Hashtable count = new Hashtable(); int[] count = new int[5]; for(int i=0;i<5;i++) { parentHom[i] =0; count[i]=0; } //String allele1_string, allele2_string; //loop through each family, check data for marker loc Enumeration famList = _pedFile.getFamList(); while(famList.hasMoreElements()){ Family currentFamily = _pedFile.getFamily((String)famList.nextElement()); Enumeration indList = currentFamily.getMemberList(); //loop through each individual in the current Family while(indList.hasMoreElements()){ currentInd = currentFamily.getMember((String)indList.nextElement()); if (currentInd.getIsTyped()){ byte[] markers = currentInd.getMarker(loc); allele1 = markers[0]; //allele1_string = Integer.toString(allele1); allele2 = markers[1]; //allele2_string = Integer.toString(allele2); String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } //no allele data missing if(allele1 > 0 && allele2 >0){ //make sure entry has parents if(!(currentInd.getMomID().equals("0") || currentInd.getDadID().equals("0"))){ //do mendel check //byte[] marker = ((Individual)pedFileHash.get(familyID + " " + currentInd.getMomID())).getUnfilteredMarker(loc); byte[] marker = (currentFamily.getMember(currentInd.getMomID())).getMarker(loc); int momAllele1 = marker[0]; int momAllele2 = marker[1]; //marker = ((Individual)pedFileHash.get(familyID + " " + currentInd.getDadID())).getUnfilteredMarker(loc); marker = (currentFamily.getMember(currentInd.getDadID())).getMarker(loc); int dadAllele1 = marker[0]; int dadAllele2 = marker[1]; //don't check if parents are missing any data if (!(momAllele1 == 0 || momAllele2 == 0 || dadAllele1 == 0 || dadAllele2 ==0)){ //mom hom if(momAllele1 == momAllele2){ //both parents hom if (dadAllele1 == dadAllele2){ //both parents hom same allele if (momAllele1 == dadAllele1){ //kid must be hom same allele if (allele1 != momAllele1 || allele2 != momAllele1) { mendErrNum ++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } //parents hom diff allele }else{ //kid must be het if (allele1 == allele2) { mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //mom hom dad het }else{ //kid can't be hom for non-momallele if (allele1 != momAllele1 && allele2 != momAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //mom het }else{ //dad hom if (dadAllele1 == dadAllele2){ //kid can't be hom for non-dadallele if(allele1 != dadAllele1 && allele2 != dadAllele1){ mendErrNum++; currentInd.zeroOutMarker(loc); currentFamily.getMember(currentInd.getMomID()).zeroOutMarker(loc); currentFamily.getMember(currentInd.getDadID()).zeroOutMarker(loc); } } //both parents het no mend err poss } } } //end mendel check } } } indList = currentFamily.getMemberList(); //loop through each individual in the current Family while(indList.hasMoreElements()){ currentInd = currentFamily.getMember((String)indList.nextElement()); if (currentInd.getIsTyped()){ byte[] markers; byte[] zeroArray = {0,0}; if (currentInd.getZeroed(loc)){ markers = zeroArray; }else{ markers = currentInd.getMarker(loc); } allele1 = markers[0]; //allele1_string = Integer.toString(allele1); allele2 = markers[1]; //allele2_string = Integer.toString(allele2); String familyID = currentInd.getFamilyID(); if(numindivs.containsKey(familyID)){ int value = ((Integer)numindivs.get(familyID)).intValue() +1; numindivs.put(familyID, new Integer(value)); } else{ numindivs.put(familyID, new Integer(1)); } //no allele data missing if(allele1 > 0 && allele2 >0){ //indiv has no parents -- i.e. is a founder if(currentInd.getMomID().compareTo(Individual.DATA_MISSING)==0 && currentInd.getDadID().compareTo(Individual.DATA_MISSING)==0){ //$parentgeno{$ped}++ //set parentgeno if(parentgeno.containsKey(familyID)){ int value = ((Integer)parentgeno.get(familyID)).intValue() +1; parentgeno.put(familyID, new Integer(value)); } else{ parentgeno.put(familyID, new Integer(1)); } if(allele1 != allele2) { parenthet++; } else{ //incOrSetOne(parenthom,allele1_string); parentHom[allele1]++; } count[allele1]++; count[allele2]++; } else{//$kidgeno{$ped}++ if(kidgeno.containsKey(familyID)){ int value = ((Integer)kidgeno.get(familyID)).intValue() +1; kidgeno.put(familyID, new Integer(value)); } else{ kidgeno.put(familyID, new Integer(1)); } } if(allele1 == allele2) { hom++; } else { het++; } } //missing data else missing++; } } } double obsHET = getObsHET(het, hom); double[] freqStuff = getFreqStuff(count); double preHET = freqStuff[0]; double maf = freqStuff[1]; //HW p value double pvalue = getPValue(parentHom, parenthet); //geno percent double genopct = getGenoPercent(het, hom, missing); // num of families with a fully genotyped trio //int famTrio =0; int famTrio = getNumOfFamTrio(numindivs, parentgeno, kidgeno); //rating int rating = this.getRating(genopct, pvalue, obsHET, mendErrNum,maf); result.setObsHet(obsHET); result.setPredHet(preHET); result.setMAF(maf); result.setHWpvalue(pvalue); result.setGenoPercent(genopct); result.setFamTrioNum(famTrio); result.setMendErrNum(mendErrNum); result.setRating(rating); return result; } |
super(c,d); | columnNames=c; data=d; | public CheckDataTableModel(Vector c, Vector d, int[] r, int[] dups){ super(c,d); ratings = r; this.dups = dups; } |
Method method = taskClass.getMethod( methodName, emptyParameterTypes ); | Method method = MethodUtils.getAccessibleMethod( taskClass, methodName, emptyParameterTypes ); | public void compile() throws Exception { TaskTag tag = (TaskTag) findAncestorWithClass( TaskTag.class ); if ( tag == null ) { throw new JellyException( "You should only use Ant DataType tags within an Ant Task" ); } Task task = tag.getTask(); Class taskClass = task.getClass(); String methodName = "create" + name.substring(0,1).toUpperCase() + name.substring(1); Method method = taskClass.getMethod( methodName, emptyParameterTypes ); if ( method == null ) { throw new JellyException( "Cannot create Task property: " + name + " of Ant task: " + task + " as no method called: " + methodName + " could be found" ); } Object propertyBean = method.invoke( task, emptyParameters ); if ( propertyBean == null ) { throw new JellyException( "No property: " + name + " of task: " + task + " was returned." ); } setDynaBean( new ConvertingWrapDynaBean(propertyBean) ); } |
registerTag("image", ImageTag.class); | public SwtTagLibrary() { // widgets registerWidgetTag( "button", Button.class, SWT.BORDER | SWT.PUSH | SWT.CENTER ); registerWidgetTag( "canvas", Canvas.class ); registerWidgetTag( "caret", Caret.class ); registerWidgetTag( "combo", Combo.class, SWT.DROP_DOWN ); registerWidgetTag( "composite", Composite.class ); registerWidgetTag( "coolBar", CoolBar.class, SWT.VERTICAL ); registerWidgetTag( "coolItem", CoolItem.class ); registerWidgetTag( "decorations", Decorations.class ); registerWidgetTag( "group", Group.class ); registerWidgetTag( "label", Label.class, SWT.HORIZONTAL | SWT.SHADOW_IN ); registerWidgetTag( "list", List.class ); registerMenuTag( "menu", SWT.DEFAULT ); registerMenuTag( "menuBar", SWT.BAR ); registerWidgetTag( "menuSeparator", MenuItem.class, SWT.SEPARATOR ); registerWidgetTag( "menuItem", MenuItem.class ); registerWidgetTag( "messageBox", MessageBox.class ); registerWidgetTag( "progressBar", ProgressBar.class, SWT.HORIZONTAL ); registerWidgetTag( "sash", Sash.class ); registerWidgetTag( "scale", Scale.class ); registerWidgetTag( "shell", Shell.class, SWT.BORDER | SWT.CLOSE | SWT.MIN | SWT.MAX | SWT.RESIZE | SWT.TITLE ); registerWidgetTag( "slider", Slider.class ); registerWidgetTag( "tabFolder", TabFolder.class ); registerWidgetTag( "tabItem", TabItem.class ); registerWidgetTag( "table", Table.class, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION ); registerWidgetTag( "tableColumn", TableColumn.class ); registerWidgetTag( "tableItem", TableItem.class ); registerWidgetTag( "text", Text.class ); registerWidgetTag( "toolBar", ToolBar.class, SWT.VERTICAL ); registerWidgetTag( "toolItem", ToolItem.class ); registerWidgetTag( "tracker", Tracker.class ); registerWidgetTag( "tree", Tree.class, SWT.MULTI ); registerWidgetTag( "treeItem", TreeItem.class ); // custom widgets registerWidgetTag( "tableTree", TableTree.class ); registerWidgetTag( "tableTreeItem", TableTreeItem.class ); // layouts registerLayoutTag("fillLayout", FillLayout.class); registerLayoutTag("gridLayout", GridLayout.class); registerLayoutTag("rowLayout", RowLayout.class); // layout data objects registerLayoutDataTag( "gridData", GridData.class ); registerLayoutDataTag( "rowData", RowData.class ); // dialogs //registerWidgetTag( "colorDialog", ColorDialog.class ); //registerWidgetTag( "directoryDialog", DirectoryDialog.class ); //registerWidgetTag( "fileDialog", FileDialog.class ); //registerWidgetTag( "fontDialog", FontDialog.class ); // events registerTag("onEvent", OnEventTag.class); } |
|
if (args[a].equals("-n")){ | if (args[a].equals("-n") || args[a].equalsIgnoreCase("-nogui")){ | public static void main(String[] args) { int exitValue = 0; String dir = System.getProperty("user.dir"); String sep = System.getProperty("file.separator"); String ver = System.getProperty("java.version"); System.out.println(ver); String jarfile = System.getProperty("java.class.path"); String argsToBePassed = new String(); boolean headless = false; for (int a = 0; a < args.length; a++){ argsToBePassed = argsToBePassed.concat(" " + args[a]); if (args[a].equals("-n")){ headless=true; } } try { //if the nogui flag is present we force it into headless mode String runString = "java -Xmx650m -classpath " + jarfile; if (headless){ runString += " -Djava.awt.headless=true"; } runString += " edu.mit.wi.haploview.HaploView"+argsToBePassed; Process child = Runtime.getRuntime().exec(runString); //start up a thread to simply pump out all messages to stdout StreamGobbler isg = new StreamGobbler(child.getInputStream()); isg.start(); //while the child is alive we wait for error messages boolean dead = false; StringBuffer errorMsg = new StringBuffer("Fatal Error:\n"); BufferedReader besr = new BufferedReader(new InputStreamReader(child.getErrorStream())); String line = null; if ((line = besr.readLine()) != null) { errorMsg.append(line); //if the child generated an error message, kill it child.destroy(); dead = true; } //if the child died painfully throw up R.I.P. dialog if (dead){ if (headless){ System.out.println(errorMsg); }else{ JFrame jf = new JFrame(); JOptionPane.showMessageDialog(jf, errorMsg, null, JOptionPane.ERROR_MESSAGE); } exitValue = -1; } } catch (Exception e) { if (headless){ System.out.println("Error:\nUnable to launch Haploview.\n"+e.getMessage()); }else{ JFrame jf = new JFrame(); JOptionPane.showMessageDialog(jf, "Error:\nUnable to launch Haploview.\n"+e.getMessage(), null, JOptionPane.ERROR_MESSAGE); } } System.exit(exitValue); } |
PairwiseLinkage[][] dPrimeTable = theData.getFilteredTable(); | PairwiseLinkage[][] dPrimeTable = theData.filteredDPrimeTable; | public void mousePressed (MouseEvent e) { //if users right clicks & holds, pop up the info if ((e.getModifiers() & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK){ PairwiseLinkage[][] dPrimeTable = theData.getFilteredTable(); final int clickX = e.getX(); final int clickY = e.getY(); double dboxX = (double)(clickX - clickXShift - (clickY-clickYShift))/boxSize; double dboxY = (double)(clickX - clickXShift + (clickY-clickYShift))/boxSize; final int boxX, boxY; if (dboxX < 0){ boxX = (int)(dboxX - 0.5); } else{ boxX = (int)(dboxX + 0.5); } if (dboxY < 0){ boxY = (int)(dboxY - 0.5); }else{ boxY = (int)(dboxY + 0.5); } if ((boxX >= lowX && boxX <= highX) && (boxY > boxX && boxY < highY) && !(worldmapRect.contains(clickX,clickY))){ if (dPrimeTable[boxX][boxY] != null){ if (theData.infoKnown){ displayStrings[0] = new String ("(" +Chromosome.getFilteredMarker(boxX).getName() + ", " + Chromosome.getFilteredMarker(boxY).getName() + ")"); }else{ displayStrings[0] = new String("(" + (Chromosome.realIndex[boxX]+1) + ", " + (Chromosome.realIndex[boxY]+1) + ")"); } displayStrings[1] = new String ("D': " + dPrimeTable[boxX][boxY].getDPrime()); displayStrings[2] = new String ("LOD: " + dPrimeTable[boxX][boxY].getLOD()); displayStrings[3] = new String ("r^2: " + dPrimeTable[boxX][boxY].getRSquared()); displayStrings[4] = new String ("D' conf. bounds: " + dPrimeTable[boxX][boxY].getConfidenceLow() + "-" + dPrimeTable[boxX][boxY].getConfidenceHigh()); Graphics g = getGraphics(); g.setFont(boxFont); FontMetrics metrics = g.getFontMetrics(); int strlen = 0; for (int x = 0; x < 5; x++){ if (strlen < metrics.stringWidth(displayStrings[x])){ strlen = metrics.stringWidth(displayStrings[x]); } } //edge shifts prevent window from popping up partially offscreen int visRightBound = (int)(getVisibleRect().getWidth() + getVisibleRect().getX()); int visBotBound = (int)(getVisibleRect().getHeight() + getVisibleRect().getY()); int rightEdgeShift = 0; if (clickX + strlen + popupLeftMargin +5 > visRightBound){ rightEdgeShift = clickX + strlen + popupLeftMargin + 10 - visRightBound; } int botEdgeShift = 0; if (clickY + 5*metrics.getHeight()+10 > visBotBound){ botEdgeShift = clickY + 5*metrics.getHeight()+15 - visBotBound; } popupDrawRect = new Rectangle(clickX-rightEdgeShift, clickY-botEdgeShift, strlen+popupLeftMargin+5, 5*metrics.getHeight()+10); popupExists = true; repaint(); } } } } |
Tag tag = getTag(); if ( tag == null ) { return; } | public void run(JellyContext context, XMLOutput output) throws Exception { tag.setContext(context); // initialize all the properties of the tag before its used // if there is a problem abort this tag for (int i = 0, size = expressions.length; i < size; i++) { Expression expression = expressions[i]; Method method = methods[i]; Class type = types[i]; // some types are Expression objects so let the tag // evaluate them Object value = null; if (type.isAssignableFrom(Expression.class) && !type.isAssignableFrom(Object.class)) { value = expression; } else { value = expression.evaluate(context); } // convert value to correct type if (value != null) { value = convertType(value, type); } Object[] arguments = { value }; try { method.invoke(tag, arguments); } catch (Exception e) { String valueTypeName = (value != null ) ? value.getClass().getName() : "null"; log.warn( "Cannot call method: " + method.getName() + " as I cannot convert: " + value + " of type: " + valueTypeName + " into type: " + type.getName() ); throw createJellyException( "Cannot call method: " + method.getName() + " on tag of type: " + tag.getClass().getName() + " with value: " + value + " of type: " + valueTypeName + ". Exception: " + e, e ); } } try { tag.doTag(output); } catch (JellyException e) { handleException(e); } catch (Exception e) { handleException(e); } } |
|
else { String varName = var; if ( varName == null ) { varName = indexVar; } for (index = begin; index < end; index += step ) { if (varName != null) { Object value = new Integer(index); context.setVariable(varName, value); } invokeBody(output); } } | public void doTag(XMLOutput output) throws Exception { if (log.isDebugEnabled()) { log.debug("running with items: " + items); } if (items != null) { Iterator iter = items.evaluateAsIterator(context); if (log.isDebugEnabled()) { log.debug("Iterating through: " + iter); } // ignore the first items of the iterator for (index = 0; index < begin && iter.hasNext(); index++ ) { iter.next(); } while (iter.hasNext() && index < end) { Object value = iter.next(); if (var != null) { context.setVariable(var, value); } if (indexVar != null) { context.setVariable(indexVar, new Integer(index)); } invokeBody(output); // now we need to move to next index index++; for ( int i = 1; i < step; i++, index++ ) { if ( ! iter.hasNext() ) { return; } iter.next(); } } } else { if ( end == Integer.MAX_VALUE && begin == 0 ) { throw new MissingAttributeException( "items" ); } } } |
|
getBody().run(context, output); | invokeBody(output); | public void doTag(XMLOutput output) throws Exception { value = false; if ( test != null ) { if ( test.evaluateAsBoolean( context ) ) { value = true; getBody().run(context, output); } } } |
} else if (StorableTestBasic.class.isAssignableFrom(mType)) { indexes = new StorableIndex[] { makeIndex(mType, "id").unique(true).clustered(true), makeIndex(mType, "stringProp", "doubleProp").unique(true), makeIndex(mType, "-stringProp", "-intProp", "~id").unique(true), makeIndex(mType, "+intProp", "stringProp", "~id").unique(true), makeIndex(mType, "-doubleProp", "+longProp", "~id").unique(true), }; | public Collection<StorableIndex<S>> getAllIndexes() { StorableIndex<S>[] indexes; if (Address.class.isAssignableFrom(mType)) { indexes = new StorableIndex[] { makeIndex(mType, "addressID"), makeIndex(mType, "addressState") }; } else if (Order.class.isAssignableFrom(mType)) { indexes = new StorableIndex[] { makeIndex(mType, "orderID"), makeIndex(mType, "orderTotal"), makeIndex(mType, "addressID") }; } else if (Shipment.class.isAssignableFrom(mType)) { indexes = new StorableIndex[] { makeIndex(mType, "shipmentID"), makeIndex(mType, "orderID"), }; } else if (Shipper.class.isAssignableFrom(mType)) { indexes = new StorableIndex[] { makeIndex(mType, "shipperID") }; } else { indexes = new StorableIndex[0]; } return Arrays.asList(indexes); } |
|
this.addSeparator(); JMenuItem clearItem = new JMenuItem("Clear Recent Files"); clearItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { clear(); } }); recentFileNames.add("Clear Recent Items"); this.add(clearItem); | private void loadRecentMenu() { setEnabled(false); // Clear out both all menu items and List in memory for (int i = getMenuComponentCount() - 1; i >= 0; i--) { remove(0); } recentFileNames.clear(); // Copy from Prefs into Menu JMenuItem mi; for (int i = 0; i < maxRecentFiles; i++) { String f = prefs.get(PREFS_KEY + i, null); if (f == null) { // Stop on first missing break; } // Drop from list if file has been deleted. if (new File(f).exists()) { // Add to List in memory recentFileNames.add(f); // If at least one item, enable menu setEnabled(true); // And add to Menu this.add(mi = new JMenuItem(f)); mi.addActionListener(recentOpener); } } } |
|
pageContext.getOut().println("<div id=\""+getId()+"\">"+componentDisplay+""); | pageContext.getOut().println(componentDisplay); | public int doStartTag() throws JspException{ HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); WebContext context = null; try{ context = WebContext.get(request); ApplicationConfig appConfig = context.getApplicationConfig(); // Graphs at cluster level are not supported yet assert !appConfig.isCluster(); String dashboardId = request.getParameter("dashBID"); DashboardConfig currentDashboardConfig = DashboardRepository.getInstance().get(dashboardId); assert currentDashboardConfig != null : "Error retrieving dashboard details"; DashboardComponent component = currentDashboardConfig.getComponents().get(getId()); String componentDisplay = component.draw(new DashboardContextImpl(context, currentDashboardConfig, (HttpServletRequest)pageContext.getRequest())); componentDisplay = MessageFormat.format(componentDisplay, getWidth(), getHeight(), Utils.getCookieValue(request, "JSESSIONID")); pageContext.getOut().println("<div id=\""+getId()+"\">"+componentDisplay+""); }catch(Throwable e){ logger.log(Level.SEVERE, "Error displaying component", e); }finally{ if(context != null) context.releaseResources(); } return SKIP_BODY; } |
this.request = request; | this.request = request; setServerPath(); | public DashboardContextImpl(WebContext webContext, DashboardConfig dashboardConfig, HttpServletRequest request){ this.webContext = webContext; this.dashboardConfig = dashboardConfig; this.request = request; } |
log.info( "Setting url to: "+ jdbcURL ); | public void setUrl(String jdbcURL) { log.info( "Setting url to: "+ jdbcURL ); this.jdbcURL = jdbcURL; } |
|
this.computePreferredSize(theHV.getGraphics()); | DPrimeDisplay(HaploView h){ theData=h.theData; theHV = h; this.colorDPrime(STD_SCHEME); this.setDoubleBuffered(true); addMouseListener(this); addMouseMotionListener(this); this.setAutoscrolls(true); } |
|
public JeezTagLibrary(org.apache.tools.ant.Project antProject) { this.coreTagLib = new CoreTagLibrary(); this.antTagLib = new AntTagLibrary( antProject ); this.werkzTagLib = new WerkzTagLibrary(); | public JeezTagLibrary(Project antProject) { this.project = antProject; this.runtimeTasks = new HashSet(); this.antTagLib = new AntTagLibrary( antProject ); this.werkzTagLib = new WerkzTagLibrary(); | public JeezTagLibrary(org.apache.tools.ant.Project antProject) { this.coreTagLib = new CoreTagLibrary(); this.antTagLib = new AntTagLibrary( antProject ); this.werkzTagLib = new WerkzTagLibrary(); registerTag( "target", TargetTag.class ); } |
script = this.coreTagLib.createTagScript( name, attrs ); | public TagScript createTagScript(String name, Attributes attrs) throws Exception { TagScript script = super.createTagScript( name, attrs ); if ( script == null ) { script = this.coreTagLib.createTagScript( name, attrs ); if ( script == null ) { script = this.werkzTagLib.createTagScript( name, attrs ); if ( script == null ) { script = this.antTagLib.createTagScript( name, attrs ); } } } return script; } |
|
script = this.antTagLib.createTagScript( name, attrs ); | if ( isRuntimeTask( name ) ) { if ( ! project.getTaskDefinitions().containsKey( name ) ) { script = this.antTagLib.createRuntimeTaskTagScript( name, attrs ); } else { this.runtimeTasks.remove( name ); } } if ( script == null ) { script = this.antTagLib.createTagScript( name, attrs ); } if ( name.equals( "taskdef" ) ) { addRuntimeTask( attrs.getValue( "name" ) ); } | public TagScript createTagScript(String name, Attributes attrs) throws Exception { TagScript script = super.createTagScript( name, attrs ); if ( script == null ) { script = this.coreTagLib.createTagScript( name, attrs ); if ( script == null ) { script = this.werkzTagLib.createTagScript( name, attrs ); if ( script == null ) { script = this.antTagLib.createTagScript( name, attrs ); } } } return script; } |
server in the list */ | server in the list (could be further down in the list, if the first server(s) is down */ | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { makeResponseNotCacheable(response); final ObjectName objectName = context.getObjectName(); final ApplicationConfig config = context.getApplicationConfig(); final MBeanConfig configuredMBean = config.findMBeanByObjectName(objectName.getCanonicalName()); AccessController.checkAccess(context.getServiceContext(), ACL_VIEW_APPLICATIONS); if(configuredMBean != null) AccessController.checkAccess(context.getServiceContext(), ACL_VIEW_MBEANS); List applications = null; if(config.isCluster()){ applications = config.getApplications(); }else{ applications = new ArrayList(1); applications.add(config); } /* the ObjectInfo for the mbean that is being viewed */ ObjectInfo objInfo = null; /* array that will be initialized with all attribute names for this mbean */ String[] attributeNames = null; /* a Map which constains list of attribute values for each application in the cluster. ApplicationConfig is the key and attribute List is the value*/ final Map appConfigToAttrListMap = new HashMap(applications.size()); for(Iterator it=applications.iterator(); it.hasNext(); ){ ApplicationConfig childAppConfig = (ApplicationConfig)it.next(); try { ServerConnection serverConnection = ServerConnector.getServerConnection(childAppConfig); /* assuming that all servers in this cluster have exact same object info, we will get the ObjectInfo from the first server in the list */ if(objInfo == null){ objInfo = serverConnection.getObjectInfo(objectName); assert objInfo != null; ObjectAttributeInfo[] attributes = objInfo.getAttributes(); attributeNames = new String[attributes.length]; for (int i = 0; i < attributes.length; i++) { // TODO: we should only add the readable attributes here attributeNames[i] = attributes[i].getName(); } } /* add attribute values of this application to the map*/ appConfigToAttrListMap.put(childAppConfig, serverConnection.getAttributes(objectName, attributeNames)); } catch (ConnectionFailedException e){ logger.log(Level.FINE, "Error retrieving attributes for:" + childAppConfig.getName(), e); /* add null, indicating that the server is down */ appConfigToAttrListMap.put(childAppConfig, null); } } request.setAttribute("objInfo", objInfo); request.setAttribute("appConfigToAttrListMap", appConfigToAttrListMap); /* setup the form to be used in the html form */ MBeanConfigForm mbeanConfigForm = (MBeanConfigForm)actionForm; mbeanConfigForm.setObjectName(objectName.getCanonicalName()); ApplicationConfig appConfig = context.getApplicationConfig(); MBeanConfig mbeanConfig = appConfig.findMBeanByObjectName(objectName.getCanonicalName()); if(mbeanConfig != null){ if(appConfig.isCluster()){ request.setAttribute("mbeanIncludedIn", "cluster"); }else{ request.setAttribute("mbeanIncludedIn", "application"); } request.setAttribute("mbeanConfig", mbeanConfig); }else{ ApplicationConfig clusterConfig = appConfig.getClusterConfig(); if(clusterConfig != null){ mbeanConfig = clusterConfig.findMBeanByObjectName(objectName.getCanonicalName()); } if(mbeanConfig != null){ request.setAttribute("mbeanIncludedIn", "cluster"); request.setAttribute("mbeanConfig", mbeanConfig); } } return mapping.findForward(Forwards.SUCCESS); } |
} if(objInfo == null){ throw new ConnectionFailedException(null); | public ActionForward execute(WebContext context, ActionMapping mapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response) throws Exception { makeResponseNotCacheable(response); final ObjectName objectName = context.getObjectName(); final ApplicationConfig config = context.getApplicationConfig(); final MBeanConfig configuredMBean = config.findMBeanByObjectName(objectName.getCanonicalName()); AccessController.checkAccess(context.getServiceContext(), ACL_VIEW_APPLICATIONS); if(configuredMBean != null) AccessController.checkAccess(context.getServiceContext(), ACL_VIEW_MBEANS); List applications = null; if(config.isCluster()){ applications = config.getApplications(); }else{ applications = new ArrayList(1); applications.add(config); } /* the ObjectInfo for the mbean that is being viewed */ ObjectInfo objInfo = null; /* array that will be initialized with all attribute names for this mbean */ String[] attributeNames = null; /* a Map which constains list of attribute values for each application in the cluster. ApplicationConfig is the key and attribute List is the value*/ final Map appConfigToAttrListMap = new HashMap(applications.size()); for(Iterator it=applications.iterator(); it.hasNext(); ){ ApplicationConfig childAppConfig = (ApplicationConfig)it.next(); try { ServerConnection serverConnection = ServerConnector.getServerConnection(childAppConfig); /* assuming that all servers in this cluster have exact same object info, we will get the ObjectInfo from the first server in the list */ if(objInfo == null){ objInfo = serverConnection.getObjectInfo(objectName); assert objInfo != null; ObjectAttributeInfo[] attributes = objInfo.getAttributes(); attributeNames = new String[attributes.length]; for (int i = 0; i < attributes.length; i++) { // TODO: we should only add the readable attributes here attributeNames[i] = attributes[i].getName(); } } /* add attribute values of this application to the map*/ appConfigToAttrListMap.put(childAppConfig, serverConnection.getAttributes(objectName, attributeNames)); } catch (ConnectionFailedException e){ logger.log(Level.FINE, "Error retrieving attributes for:" + childAppConfig.getName(), e); /* add null, indicating that the server is down */ appConfigToAttrListMap.put(childAppConfig, null); } } request.setAttribute("objInfo", objInfo); request.setAttribute("appConfigToAttrListMap", appConfigToAttrListMap); /* setup the form to be used in the html form */ MBeanConfigForm mbeanConfigForm = (MBeanConfigForm)actionForm; mbeanConfigForm.setObjectName(objectName.getCanonicalName()); ApplicationConfig appConfig = context.getApplicationConfig(); MBeanConfig mbeanConfig = appConfig.findMBeanByObjectName(objectName.getCanonicalName()); if(mbeanConfig != null){ if(appConfig.isCluster()){ request.setAttribute("mbeanIncludedIn", "cluster"); }else{ request.setAttribute("mbeanIncludedIn", "application"); } request.setAttribute("mbeanConfig", mbeanConfig); }else{ ApplicationConfig clusterConfig = appConfig.getClusterConfig(); if(clusterConfig != null){ mbeanConfig = clusterConfig.findMBeanByObjectName(objectName.getCanonicalName()); } if(mbeanConfig != null){ request.setAttribute("mbeanIncludedIn", "cluster"); request.setAttribute("mbeanConfig", mbeanConfig); } } return mapping.findForward(Forwards.SUCCESS); } |
|
caller = h; setTitle(title); | super(h, title); | public ReadDataDialog(String title, HaploView h){ caller = h; setTitle(title); JPanel contents = new JPanel(); JButton hapmapButton = new JButton(HAPMAP_DATA); hapmapButton.addActionListener(this); //hapmap isn't ready yet hapmapButton.setEnabled(false); JButton rawdataButton = new JButton(RAW_DATA); rawdataButton.addActionListener(this); JButton phaseddataButton = new JButton(PHASED_DATA); phaseddataButton.addActionListener(this); contents.add(Box.createRigidArea(new Dimension(10,10))); contents.add(rawdataButton); contents.add(Box.createRigidArea(new Dimension(10,10))); contents.add(phaseddataButton); contents.add(Box.createRigidArea(new Dimension(10,10))); contents.add(hapmapButton); contents.add(Box.createRigidArea(new Dimension(10,10))); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); this.setContentPane(contents); this.setLocation(caller.getX() + 100, caller.getY() + 100); //this.setLocation((getParent().getWidth() - this.getWidth()) / 2, // (getParent().getHeight() - this.getHeight()) / 2); this.setModal(true); } |
this.setLocation(caller.getX() + 100, caller.getY() + 100); | this.setLocation(this.getParent().getX() + 100, this.getParent().getY() + 100); | public ReadDataDialog(String title, HaploView h){ caller = h; setTitle(title); JPanel contents = new JPanel(); JButton hapmapButton = new JButton(HAPMAP_DATA); hapmapButton.addActionListener(this); //hapmap isn't ready yet hapmapButton.setEnabled(false); JButton rawdataButton = new JButton(RAW_DATA); rawdataButton.addActionListener(this); JButton phaseddataButton = new JButton(PHASED_DATA); phaseddataButton.addActionListener(this); contents.add(Box.createRigidArea(new Dimension(10,10))); contents.add(rawdataButton); contents.add(Box.createRigidArea(new Dimension(10,10))); contents.add(phaseddataButton); contents.add(Box.createRigidArea(new Dimension(10,10))); contents.add(hapmapButton); contents.add(Box.createRigidArea(new Dimension(10,10))); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); this.setContentPane(contents); this.setLocation(caller.getX() + 100, caller.getY() + 100); //this.setLocation((getParent().getWidth() - this.getWidth()) / 2, // (getParent().getHeight() - this.getHeight()) / 2); this.setModal(true); } |
HaploView caller = (HaploView)this.getParent(); | public void actionPerformed(ActionEvent e) { String command = e.getActionCommand(); if (command==RAW_DATA){ load(PED); }else if (command == PHASED_DATA){ load(HAPS); }else if (command == BROWSE_GENO){ browse(GENO); }else if (command == BROWSE_INFO){ browse(INFO); }else if (command == HAPMAP_DATA){ //hapmap }else if (command == "OK"){ String[] returnStrings = {genoFileField.getText(), infoFileField.getText(), maxComparisonDistField.getText()}; if (fileType == HAPS){ caller.readPhasedGenotypes(returnStrings); }else if (fileType == PED){ caller.readPedGenotypes(returnStrings); } caller.doTDT = this.doTDT.isSelected(); if (caller.dPrimeDisplay != null){ caller.dPrimeDisplay.setVisible(false); } this.dispose(); }else if (command == "Cancel"){ this.dispose(); } } |
|
genoFileField.requestFocus(); genoFileField.dispatchEvent( | try{ SwingUtilities.invokeLater( new Runnable(){ public void run() { genoFileField.requestFocus(); }}); }catch (RuntimeException re){ } /*genoFileField.dispatchEvent( | void load(int ft){ fileType = ft; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel filePanel = new JPanel(); filePanel.setLayout(new BoxLayout(filePanel, BoxLayout.Y_AXIS)); JPanel topFilePanel = new JPanel(); JPanel botFilePanel = new JPanel(); genoFileField = new JTextField("",20); //workaround for dumb Swing can't requestfocus until shown bug genoFileField.requestFocus(); genoFileField.dispatchEvent( new FocusEvent( genoFileField, FocusEvent.FOCUS_GAINED, false ) ); infoFileField = new JTextField("",20); JButton browseGenoButton = new JButton("Browse"); browseGenoButton.setActionCommand(BROWSE_GENO); browseGenoButton.addActionListener(this); JButton browseInfoButton = new JButton("Browse"); browseInfoButton.setActionCommand(BROWSE_INFO); browseInfoButton.addActionListener(this); topFilePanel.add(new JLabel("Genotype file: ")); topFilePanel.add(genoFileField); topFilePanel.add(browseGenoButton); botFilePanel.add(new JLabel("Locus information file: ")); botFilePanel.add(infoFileField); botFilePanel.add(browseInfoButton); filePanel.add(topFilePanel); filePanel.add(botFilePanel); filePanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); contents.add(filePanel); JPanel prefsPanel = new JPanel(); maxComparisonDistField = new NumberTextField("500",4); prefsPanel.add(new JLabel("Ignore pairwise comparisons of markers >")); prefsPanel.add(maxComparisonDistField); prefsPanel.add(new JLabel("kb apart.")); contents.add(prefsPanel); doTDT = new JCheckBox(); doTDT.setSelected(false); if (ft == PED){ JPanel tdtPanel = new JPanel(); tdtPanel.add(new JLabel("Run family trio TDT? ")); tdtPanel.add(doTDT); contents.add(tdtPanel); } JPanel choicePanel = new JPanel(); JButton okButton = new JButton("OK"); this.getRootPane().setDefaultButton(okButton); okButton.addActionListener(this); JButton cancelButton = new JButton("Cancel"); cancelButton.addActionListener(this); choicePanel.add(okButton); choicePanel.add(cancelButton); contents.add(choicePanel); this.setContentPane(contents); this.pack(); } |
); | );*/ | void load(int ft){ fileType = ft; JPanel contents = new JPanel(); contents.setLayout(new BoxLayout(contents, BoxLayout.Y_AXIS)); JPanel filePanel = new JPanel(); filePanel.setLayout(new BoxLayout(filePanel, BoxLayout.Y_AXIS)); JPanel topFilePanel = new JPanel(); JPanel botFilePanel = new JPanel(); genoFileField = new JTextField("",20); //workaround for dumb Swing can't requestfocus until shown bug genoFileField.requestFocus(); genoFileField.dispatchEvent( new FocusEvent( genoFileField, FocusEvent.FOCUS_GAINED, false ) ); infoFileField = new JTextField("",20); JButton browseGenoButton = new JButton("Browse"); browseGenoButton.setActionCommand(BROWSE_GENO); browseGenoButton.addActionListener(this); JButton browseInfoButton = new JButton("Browse"); browseInfoButton.setActionCommand(BROWSE_INFO); browseInfoButton.addActionListener(this); topFilePanel.add(new JLabel("Genotype file: ")); topFilePanel.add(genoFileField); topFilePanel.add(browseGenoButton); botFilePanel.add(new JLabel("Locus information file: ")); botFilePanel.add(infoFileField); botFilePanel.add(browseInfoButton); filePanel.add(topFilePanel); filePanel.add(botFilePanel); filePanel.setBorder(BorderFactory.createEmptyBorder(10,10,10,10)); contents.add(filePanel); JPanel prefsPanel = new JPanel(); maxComparisonDistField = new NumberTextField("500",4); prefsPanel.add(new JLabel("Ignore pairwise comparisons of markers >")); prefsPanel.add(maxComparisonDistField); prefsPanel.add(new JLabel("kb apart.")); contents.add(prefsPanel); doTDT = new JCheckBox(); doTDT.setSelected(false); if (ft == PED){ JPanel tdtPanel = new JPanel(); tdtPanel.add(new JLabel("Run family trio TDT? ")); tdtPanel.add(doTDT); contents.add(tdtPanel); } JPanel choicePanel = new JPanel(); JButton okButton = new JButton("OK"); this.getRootPane().setDefaultButton(okButton); okButton.addActionListener(this); JButton cancelButton = new JButton("Cancel"); cancelButton.addActionListener(this); choicePanel.add(okButton); choicePanel.add(cancelButton); contents.add(choicePanel); this.setContentPane(contents); this.pack(); } |
hapMapTranslate.put("NA06993.dup", "dup NA06993.dup 0 0 1 0"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 0" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 0"); hapMapTranslate.put("NA12145", "1334 NA12145 0 0 2 0"); hapMapTranslate.put("NA10847", "1334 NA10847 NA12146 NA12239 2 0" ); hapMapTranslate.put("NA12146", "1334 NA12146 0 0 1 0"); hapMapTranslate.put("NA12239", "1334 NA12239 0 0 2 0"); hapMapTranslate.put("NA07029", "1340 NA07029 NA06994 NA07000 1 0" ); hapMapTranslate.put("NA06994", "1340 NA06994 0 0 1 0"); hapMapTranslate.put("NA07000", "1340 NA07000 0 0 2 0"); hapMapTranslate.put("NA07019", "1340 NA07019 NA07022 NA07056 2 0" ); hapMapTranslate.put("NA07022", "1340 NA07022 0 0 1 0"); hapMapTranslate.put("NA07056", "1340 NA07056 0 0 2 0"); hapMapTranslate.put("NA07048", "1341 NA07048 NA07034 NA07055 1 0" ); hapMapTranslate.put("NA07034", "1341 NA07034 0 0 1 0"); hapMapTranslate.put("NA07055", "1341 NA07055 0 0 2 0"); hapMapTranslate.put("NA06991", "1341 NA06991 NA06993 NA06985 2 0" ); hapMapTranslate.put("NA06993", "1341 NA06993 0 0 1 0"); hapMapTranslate.put("NA06993.dup", "dup NA06993.dup 0 0 1 0"); hapMapTranslate.put("NA06985", "1341 NA06985 0 0 2 0"); hapMapTranslate.put("NA10851", "1344 NA10851 NA12056 NA12057 1 0" ); hapMapTranslate.put("NA12056", "1344 NA12056 0 0 1 0"); hapMapTranslate.put("NA12057", "1344 NA12057 0 0 2 0"); hapMapTranslate.put("NA07348", "1345 NA07348 NA07357 NA07345 2 0" ); hapMapTranslate.put("NA07357", "1345 NA07357 0 0 1 0"); hapMapTranslate.put("NA07345", "1345 NA07345 0 0 2 0"); hapMapTranslate.put("NA10857", "1346 NA10857 NA12043 NA12044 1 0" ); hapMapTranslate.put("NA12043", "1346 NA12043 0 0 1 0"); hapMapTranslate.put("NA12044", "1346 NA12044 0 0 2 0"); hapMapTranslate.put("NA10859", "1347 NA10859 NA11881 NA11882 2 0" ); hapMapTranslate.put("NA11881", "1347 NA11881 0 0 1 0"); hapMapTranslate.put("NA11882", "1347 NA11882 0 0 2 0"); hapMapTranslate.put("NA10854", "1349 NA10854 NA11839 NA11840 2 0" ); hapMapTranslate.put("NA11839", "1349 NA11839 0 0 1 0"); hapMapTranslate.put("NA11840", "1349 NA11840 0 0 2 0"); hapMapTranslate.put("NA10856", "1350 NA10856 NA11829 NA11830 1 0" ); hapMapTranslate.put("NA11829", "1350 NA11829 0 0 1 0"); hapMapTranslate.put("NA11830", "1350 NA11830 0 0 2 0"); hapMapTranslate.put("NA10855", "1350 NA10855 NA11831 NA11832 2 0" ); hapMapTranslate.put("NA11831", "1350 NA11831 0 0 1 0"); hapMapTranslate.put("NA11832", "1350 NA11832 0 0 2 0"); hapMapTranslate.put("NA12707", "1358 NA12707 NA12716 NA12717 1 0" ); hapMapTranslate.put("NA12716", "1358 NA12716 0 0 1 0"); hapMapTranslate.put("NA12717", "1358 NA12717 0 0 2 0"); hapMapTranslate.put("NA10860", "1362 NA10860 NA11992 NA11993 1 0" ); hapMapTranslate.put("NA11992", "1362 NA11992 0 0 1 0"); hapMapTranslate.put("NA11993", "1362 NA11993 0 0 2 0"); hapMapTranslate.put("NA11993.dup", "dup NA11993.dup 0 0 2 0"); hapMapTranslate.put("NA10861", "1362 NA10861 NA11994 NA11995 2 0" ); hapMapTranslate.put("NA11994", "1362 NA11994 0 0 1 0"); hapMapTranslate.put("NA11995", "1362 NA11995 0 0 2 0"); hapMapTranslate.put("NA10863", "1375 NA10863 NA12264 NA12234 2 0" ); hapMapTranslate.put("NA12264", "1375 NA12264 0 0 1 0"); hapMapTranslate.put("NA12234", "1375 NA12234 0 0 2 0"); hapMapTranslate.put("NA10830", "1408 NA10830 NA12154 NA12236 1 0" ); hapMapTranslate.put("NA12154", "1408 NA12154 0 0 1 0"); hapMapTranslate.put("NA12236", "1408 NA12236 0 0 2 0"); hapMapTranslate.put("NA10831", "1408 NA10831 NA12155 NA12156 2 0" ); hapMapTranslate.put("NA12155", "1408 NA12155 0 0 1 0"); hapMapTranslate.put("NA12156", "1408 NA12156 0 0 2 0"); hapMapTranslate.put("NA12156.dup", "dup NA12156.dup 0 0 2 0"); hapMapTranslate.put("NA10835", "1416 NA10835 NA12248 NA12249 1 0" ); hapMapTranslate.put("NA12248", "1416 NA12248 0 0 1 0"); hapMapTranslate.put("NA12248.dup", "dup NA1248.dup 0 0 1 0"); hapMapTranslate.put("NA12249", "1416 NA12249 0 0 2 0"); hapMapTranslate.put("NA10838", "1420 NA10838 NA12003 NA12004 1 0" ); hapMapTranslate.put("NA12003", "1420 NA12003 0 0 1 0"); hapMapTranslate.put("NA12003.dup", "dup NA12003.dup 0 0 1 0"); hapMapTranslate.put("NA12004", "1420 NA12004 0 0 2 0"); hapMapTranslate.put("NA10839", "1420 NA10839 NA12005 NA12006 2 0" ); hapMapTranslate.put("NA12005", "1420 NA12005 0 0 1 0"); hapMapTranslate.put("NA12006", "1420 NA12006 0 0 2 0"); hapMapTranslate.put("NA12740", "1444 NA12740 NA12750 NA12751 2 0" ); hapMapTranslate.put("NA12750", "1444 NA12750 0 0 1 0"); hapMapTranslate.put("NA12751", "1444 NA12751 0 0 2 0"); hapMapTranslate.put("NA12752", "1447 NA12752 NA12760 NA12761 1 0" ); hapMapTranslate.put("NA12760", "1447 NA12760 0 0 1 0"); hapMapTranslate.put("NA12761", "1447 NA12761 0 0 2 0"); hapMapTranslate.put("NA12753", "1447 NA12753 NA12762 NA12763 2 0" ); hapMapTranslate.put("NA12762", "1447 NA12762 0 0 1 0"); hapMapTranslate.put("NA12763", "1447 NA12763 0 0 2 0"); hapMapTranslate.put("NA12801", "1454 NA12801 NA12812 NA12813 1 0" ); hapMapTranslate.put("NA12812", "1454 NA12812 0 0 1 0"); hapMapTranslate.put("NA12813", "1454 NA12813 0 0 2 0"); hapMapTranslate.put("NA12802", "1454 NA12802 NA12814 NA12815 2 0" ); hapMapTranslate.put("NA12814", "1454 NA12814 0 0 1 0"); hapMapTranslate.put("NA12815", "1454 NA12815 0 0 2 0"); hapMapTranslate.put("NA12864", "1459 NA12864 NA12872 NA12873 1 0" ); hapMapTranslate.put("NA12872", "1459 NA12872 0 0 1 0"); hapMapTranslate.put("NA12873", "1459 NA12873 0 0 2 0"); hapMapTranslate.put("NA12865", "1459 NA12865 NA12874 NA12875 2 0" ); hapMapTranslate.put("NA12874", "1459 NA12874 0 0 1 0"); hapMapTranslate.put("NA12875", "1459 NA12875 0 0 2 0"); hapMapTranslate.put("NA12878", "1463 NA12878 NA12891 NA12892 2 0" ); hapMapTranslate.put("NA12891", "1463 NA12891 0 0 1 0"); hapMapTranslate.put("NA12892", "1463 NA12892 0 0 2 0"); hapMapTranslate.put("NA18526", "chi1 NA18526 0 0 2 0"); hapMapTranslate.put("NA18524", "chi2 NA18524 0 0 1 0"); hapMapTranslate.put("NA18529", "chi3 NA18529 0 0 2 0"); hapMapTranslate.put("NA18558", "chi4 NA18558 0 0 1 0"); hapMapTranslate.put("NA18532", "chi5 NA18532 0 0 2 0"); hapMapTranslate.put("NA18561", "chi6 NA18561 0 0 1 0"); hapMapTranslate.put("NA18942", "jap1 NA18942 0 0 2 0"); hapMapTranslate.put("NA18940", "jap2 NA18940 0 0 1 0"); hapMapTranslate.put("NA18951", "jap3 NA18951 0 0 2 0"); hapMapTranslate.put("NA18943", "jap4 NA18943 0 0 1 0"); hapMapTranslate.put("NA18947", "jap5 NA18947 0 0 2 0"); hapMapTranslate.put("NA18944", "jap6 NA18944 0 0 1 0"); hapMapTranslate.put("NA18562", "chi7 NA18562 0 0 1 0"); hapMapTranslate.put("NA18537", "chi8 NA18537 0 0 2 0"); hapMapTranslate.put("NA18603", "chi9 NA18603 0 0 1 0"); hapMapTranslate.put("NA18540", "chi10 NA18540 0 0 2 0"); hapMapTranslate.put("NA18605", "chi11 NA18605 0 0 1 0"); hapMapTranslate.put("NA18542", "chi12 NA18542 0 0 2 0"); hapMapTranslate.put("NA18945", "jap7 NA18945 0 0 1 0"); hapMapTranslate.put("NA18949", "jap8 NA18949 0 0 2 0"); hapMapTranslate.put("NA18948", "jap9 NA18948 0 0 1 0"); hapMapTranslate.put("NA18952", "jap10 NA18952 0 0 1 0"); hapMapTranslate.put("NA18956", "jap11 NA18956 0 0 2 0"); hapMapTranslate.put("NA18545", "chi13 NA18545 0 0 2 0"); hapMapTranslate.put("NA18572", "chi46 NA18572 0 0 1 0"); hapMapTranslate.put("NA18547", "chi15 NA18547 0 0 2 0"); hapMapTranslate.put("NA18609", "chi16 NA18609 0 0 1 0"); hapMapTranslate.put("NA18550", "chi17 NA18550 0 0 2 0"); hapMapTranslate.put("NA18608", "chi18 NA18608 0 0 1 0"); hapMapTranslate.put("NA18964", "jap12 NA18964 0 0 2 0"); hapMapTranslate.put("NA18953", "jap13 NA18953 0 0 1 0"); hapMapTranslate.put("NA18968", "jap14 NA18968 0 0 2 0"); hapMapTranslate.put("NA18959", "jap15 NA18959 0 0 1 0"); hapMapTranslate.put("NA18969", "jap16 NA18969 0 0 2 0"); hapMapTranslate.put("NA18960", "jap17 NA18960 0 0 1 0"); hapMapTranslate.put("NA18552", "chi19 NA18552 0 0 2 0"); hapMapTranslate.put("NA18611", "chi20 NA18611 0 0 1 0"); hapMapTranslate.put("NA18555", "chi21 NA18555 0 0 2 0"); hapMapTranslate.put("NA18564", "chi22 NA18564 0 0 2 0"); hapMapTranslate.put("NA18961", "jap18 NA18961 0 0 1 0"); hapMapTranslate.put("NA18972", "jap19 NA18972 0 0 2 0"); hapMapTranslate.put("NA18965", "jap20 NA18965 0 0 1 0"); hapMapTranslate.put("NA18973", "jap21 NA18973 0 0 2 0"); hapMapTranslate.put("NA18966", "jap22 NA18966 0 0 1 0"); hapMapTranslate.put("NA18975", "jap23 NA18975 0 0 2 0"); hapMapTranslate.put("NA18566", "chi23 NA18566 0 0 2 0"); hapMapTranslate.put("NA18563", "chi24 NA18563 0 0 1 0"); hapMapTranslate.put("NA18570", "chi25 NA18570 0 0 2 0"); hapMapTranslate.put("NA18612", "chi26 NA18612 0 0 1 0"); hapMapTranslate.put("NA18571", "chi27 NA18571 0 0 2 0"); hapMapTranslate.put("NA18620", "chi28 NA18620 0 0 1 0"); hapMapTranslate.put("NA18976", "jap24 NA18976 0 0 2 0"); hapMapTranslate.put("NA18967", "jap25 NA18967 0 0 1 0"); hapMapTranslate.put("NA18978", "jap26 NA18978 0 0 2 0"); hapMapTranslate.put("NA18970", "jap27 NA18970 0 0 1 0"); hapMapTranslate.put("NA18980", "jap28 NA18980 0 0 2 0"); hapMapTranslate.put("NA18995", "jap29 NA18995 0 0 1 0"); hapMapTranslate.put("NA18621", "chi29 NA18621 0 0 1 0"); hapMapTranslate.put("NA18594", "chi30 NA18594 0 0 2 0"); hapMapTranslate.put("NA18622", "chi31 NA18622 0 0 1 0"); hapMapTranslate.put("NA18573", "chi32 NA18573 0 0 2 0"); hapMapTranslate.put("NA18623", "chi33 NA18623 0 0 1 0"); hapMapTranslate.put("NA18576", "chi34 NA18576 0 0 2 0"); hapMapTranslate.put("NA18971", "jap30 NA18971 0 0 1 0"); hapMapTranslate.put("NA18981", "jap31 NA18981 0 0 2 0"); hapMapTranslate.put("NA18974", "jap32 NA18974 0 0 1 0"); hapMapTranslate.put("NA18987", "jap33 NA18987 0 0 2 0"); hapMapTranslate.put("NA18990", "jap34 NA18990 0 0 1 0"); hapMapTranslate.put("NA18991", "jap35 NA18991 0 0 2 0"); hapMapTranslate.put("NA18577", "chi35 NA18577 0 0 2 0"); hapMapTranslate.put("NA18624", "chi36 NA18624 0 0 1 0"); hapMapTranslate.put("NA18579", "chi37 NA18579 0 0 2 0"); hapMapTranslate.put("NA18632", "chi38 NA18632 0 0 1 0"); hapMapTranslate.put("NA18582", "chi39 NA18582 0 0 2 0"); hapMapTranslate.put("NA18633", "chi40 NA18633 0 0 1 0"); hapMapTranslate.put("NA18994", "jap36 NA18994 0 0 1 0"); hapMapTranslate.put("NA18992", "jap37 NA18992 0 0 2 0"); hapMapTranslate.put("NA18997", "jap38 NA18997 0 0 2 0"); hapMapTranslate.put("NA18996", "jap39 NA18996 0 0 1 0"); hapMapTranslate.put("NA18635", "chi41 NA18635 0 0 1 0"); hapMapTranslate.put("NA18592", "chi42 NA18592 0 0 2 0"); hapMapTranslate.put("NA18636", "chi43 NA18636 0 0 1 0"); hapMapTranslate.put("NA18593", "chi44 NA18593 0 0 2 0"); hapMapTranslate.put("NA18637", "chi45 NA18637 0 0 1 0"); hapMapTranslate.put("NA19000", "jap40 NA19000 0 0 1 0"); hapMapTranslate.put("NA18998", "jap41 NA18998 0 0 2 0"); hapMapTranslate.put("NA19005", "jap42 NA19005 0 0 1 0"); hapMapTranslate.put("NA18999", "jap43 NA18999 0 0 2 0"); hapMapTranslate.put("NA19007", "jap44 NA19007 0 0 1 0"); hapMapTranslate.put("NA19003", "jap45 NA19003 0 0 2 0"); hapMapTranslate.put("NA18500", "Yoruba004 NA18500 NA18501 NA18502 1 0"); hapMapTranslate.put("NA18501", "Yoruba004 NA18501 0 0 1 0"); hapMapTranslate.put("NA18502", "Yoruba004 NA18502 0 0 2 0"); hapMapTranslate.put("NA18503", "Yoruba005 NA18503 NA18504 NA18505 1 0"); hapMapTranslate.put("NA18504", "Yoruba005 NA18504 0 0 1 0"); hapMapTranslate.put("NA18505", "Yoruba005 NA18505 0 0 2 0"); hapMapTranslate.put("NA18506", "Yoruba009 NA18506 NA18507 NA18508 1 0"); hapMapTranslate.put("NA18507", "Yoruba009 NA18507 0 0 1 0"); hapMapTranslate.put("NA18508", "Yoruba009 NA18508 0 0 2 0"); hapMapTranslate.put("NA18860", "Yoruba012 NA18860 NA18859 NA18858 1 0"); hapMapTranslate.put("NA18859", "Yoruba012 NA18859 0 0 1 0"); hapMapTranslate.put("NA18858", "Yoruba012 NA18858 0 0 2 0"); hapMapTranslate.put("NA18515", "Yoruba013 NA18515 NA18516 NA18517 1 0"); hapMapTranslate.put("NA18516", "Yoruba013 NA18516 0 0 1 0"); hapMapTranslate.put("NA18517", "Yoruba013 NA18517 0 0 2 0"); hapMapTranslate.put("NA18521", "Yoruba016 NA18521 NA18522 NA18523 1 0"); hapMapTranslate.put("NA18522", "Yoruba016 NA18522 0 0 1 0"); hapMapTranslate.put("NA18523", "Yoruba016 NA18523 0 0 2 0"); hapMapTranslate.put("NA18872", "Yoruba017 NA18872 NA18871 NA18870 1 0"); hapMapTranslate.put("NA18871", "Yoruba017 NA18871 0 0 1 0"); hapMapTranslate.put("NA18870", "Yoruba017 NA18870 0 0 2 0"); hapMapTranslate.put("NA18854", "Yoruba018 NA18854 NA18853 NA18852 1 0"); hapMapTranslate.put("NA18853", "Yoruba018 NA18853 0 0 1 0"); hapMapTranslate.put("NA18852", "Yoruba018 NA18852 0 0 2 0"); hapMapTranslate.put("NA18857", "Yoruba023 NA18857 NA18856 NA18855 1 0"); hapMapTranslate.put("NA18856", "Yoruba023 NA18856 0 0 1 0"); hapMapTranslate.put("NA18855", "Yoruba023 NA18855 0 0 2 0"); hapMapTranslate.put("NA18863", "Yoruba024 NA18863 NA18862 NA18861 1 0"); hapMapTranslate.put("NA18862", "Yoruba024 NA18862 0 0 1 0"); hapMapTranslate.put("NA18861", "Yoruba024 NA18861 0 0 2 0"); hapMapTranslate.put("NA18914", "Yoruba028 NA18914 NA18913 NA18912 1 0"); hapMapTranslate.put("NA18913", "Yoruba028 NA18913 0 0 1 0"); hapMapTranslate.put("NA18912", "Yoruba028 NA18912 0 0 2 0"); hapMapTranslate.put("NA19094", "Yoruba040 NA19094 NA19092 NA19093 2 0"); hapMapTranslate.put("NA19092", "Yoruba040 NA19092 0 0 1 0"); hapMapTranslate.put("NA19093", "Yoruba040 NA19093 0 0 2 0"); hapMapTranslate.put("NA19103", "Yoruba042 NA19103 NA19101 NA19102 1 0"); hapMapTranslate.put("NA19101", "Yoruba042 NA19101 0 0 1 0"); hapMapTranslate.put("NA19102", "Yoruba042 NA19102 0 0 2 0"); hapMapTranslate.put("NA19139", "Yoruba043 NA19139 NA19138 NA19137 1 0"); hapMapTranslate.put("NA19138", "Yoruba043 NA19138 0 0 1 0"); hapMapTranslate.put("NA19137", "Yoruba043 NA19137 0 0 2 0"); hapMapTranslate.put("NA19202", "Yoruba045 NA19202 NA19200 NA19201 2 0"); hapMapTranslate.put("NA19200", "Yoruba045 NA19200 0 0 1 0"); hapMapTranslate.put("NA19201", "Yoruba045 NA19201 0 0 2 0"); hapMapTranslate.put("NA19173", "Yoruba047 NA19173 NA19171 NA19172 1 0"); hapMapTranslate.put("NA19171", "Yoruba047 NA19171 0 0 1 0"); hapMapTranslate.put("NA19172", "Yoruba047 NA19172 0 0 2 0"); hapMapTranslate.put("NA19205", "Yoruba048 NA19205 NA19203 NA19204 1 0"); hapMapTranslate.put("NA19203", "Yoruba048 NA19203 0 0 1 0"); hapMapTranslate.put("NA19204", "Yoruba048 NA19204 0 0 2 0"); hapMapTranslate.put("NA19211", "Yoruba050 NA19211 NA19210 NA19209 1 0"); hapMapTranslate.put("NA19210", "Yoruba050 NA19210 0 0 1 0"); hapMapTranslate.put("NA19209", "Yoruba050 NA19209 0 0 2 0"); hapMapTranslate.put("NA19208", "Yoruba051 NA19208 NA19207 NA19206 1 0"); hapMapTranslate.put("NA19207", "Yoruba051 NA19207 0 0 1 0"); hapMapTranslate.put("NA19206", "Yoruba051 NA19206 0 0 2 0"); hapMapTranslate.put("NA19161", "Yoruba056 NA19161 NA19160 NA19159 1 0"); hapMapTranslate.put("NA19160", "Yoruba056 NA19160 0 0 1 0"); hapMapTranslate.put("NA19159", "Yoruba056 NA19159 0 0 2 0"); hapMapTranslate.put("NA19221", "Yoruba058 NA19221 NA19223 NA19222 2 0"); hapMapTranslate.put("NA19223", "Yoruba058 NA19223 0 0 1 0"); hapMapTranslate.put("NA19222", "Yoruba058 NA19222 0 0 2 0"); hapMapTranslate.put("NA19120", "Yoruba060 NA19120 NA19119 NA19116 1 0"); hapMapTranslate.put("NA19119", "Yoruba060 NA19119 0 0 1 0"); hapMapTranslate.put("NA19116", "Yoruba060 NA19116 0 0 2 0"); hapMapTranslate.put("NA19142", "Yoruba071 NA19142 NA19141 NA19140 1 0"); hapMapTranslate.put("NA19141", "Yoruba071 NA19141 0 0 1 0"); hapMapTranslate.put("NA19140", "Yoruba071 NA19140 0 0 2 0"); hapMapTranslate.put("NA19154", "Yoruba072 NA19154 NA19153 NA19152 1 0"); hapMapTranslate.put("NA19153", "Yoruba072 NA19153 0 0 1 0"); hapMapTranslate.put("NA19152", "Yoruba072 NA19152 0 0 2 0"); hapMapTranslate.put("NA19145", "Yoruba074 NA19145 NA19144 NA19143 1 0"); hapMapTranslate.put("NA19144", "Yoruba074 NA19144 0 0 1 0"); hapMapTranslate.put("NA19143", "Yoruba074 NA19143 0 0 2 0"); hapMapTranslate.put("NA19129", "Yoruba077 NA19129 NA19128 NA19127 2 0"); hapMapTranslate.put("NA19128", "Yoruba077 NA19128 0 0 1 0"); hapMapTranslate.put("NA19127", "Yoruba077 NA19127 0 0 2 0"); hapMapTranslate.put("NA19132", "Yoruba101 NA19132 NA19130 NA19131 2 0"); hapMapTranslate.put("NA19130", "Yoruba101 NA19130 0 0 1 0"); hapMapTranslate.put("NA19131", "Yoruba101 NA19131 0 0 2 0"); hapMapTranslate.put("NA19100", "Yoruba105 NA19100 NA19098 NA19099 2 0"); hapMapTranslate.put("NA19098", "Yoruba105 NA19098 0 0 1 0"); hapMapTranslate.put("NA19099", "Yoruba105 NA19099 0 0 2 0"); hapMapTranslate.put("NA19194", "Yoruba112 NA19194 NA19192 NA19193 1 0"); hapMapTranslate.put("NA19192", "Yoruba112 NA19192 0 0 1 0"); hapMapTranslate.put("NA19193", "Yoruba112 NA19193 0 0 2 0"); hapMapTranslate.put("NA19240", "Yoruba117 NA19240 NA19239 NA19238 2 0"); hapMapTranslate.put("NA19239", "Yoruba117 NA19239 0 0 1 0"); hapMapTranslate.put("NA19238", "Yoruba117 NA19238 0 0 2 0"); } |
|
hapMapTranslate.put("NA11993.dup", "dup NA11993.dup 0 0 2 0"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 0" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 0"); hapMapTranslate.put("NA12145", "1334 NA12145 0 0 2 0"); hapMapTranslate.put("NA10847", "1334 NA10847 NA12146 NA12239 2 0" ); hapMapTranslate.put("NA12146", "1334 NA12146 0 0 1 0"); hapMapTranslate.put("NA12239", "1334 NA12239 0 0 2 0"); hapMapTranslate.put("NA07029", "1340 NA07029 NA06994 NA07000 1 0" ); hapMapTranslate.put("NA06994", "1340 NA06994 0 0 1 0"); hapMapTranslate.put("NA07000", "1340 NA07000 0 0 2 0"); hapMapTranslate.put("NA07019", "1340 NA07019 NA07022 NA07056 2 0" ); hapMapTranslate.put("NA07022", "1340 NA07022 0 0 1 0"); hapMapTranslate.put("NA07056", "1340 NA07056 0 0 2 0"); hapMapTranslate.put("NA07048", "1341 NA07048 NA07034 NA07055 1 0" ); hapMapTranslate.put("NA07034", "1341 NA07034 0 0 1 0"); hapMapTranslate.put("NA07055", "1341 NA07055 0 0 2 0"); hapMapTranslate.put("NA06991", "1341 NA06991 NA06993 NA06985 2 0" ); hapMapTranslate.put("NA06993", "1341 NA06993 0 0 1 0"); hapMapTranslate.put("NA06993.dup", "dup NA06993.dup 0 0 1 0"); hapMapTranslate.put("NA06985", "1341 NA06985 0 0 2 0"); hapMapTranslate.put("NA10851", "1344 NA10851 NA12056 NA12057 1 0" ); hapMapTranslate.put("NA12056", "1344 NA12056 0 0 1 0"); hapMapTranslate.put("NA12057", "1344 NA12057 0 0 2 0"); hapMapTranslate.put("NA07348", "1345 NA07348 NA07357 NA07345 2 0" ); hapMapTranslate.put("NA07357", "1345 NA07357 0 0 1 0"); hapMapTranslate.put("NA07345", "1345 NA07345 0 0 2 0"); hapMapTranslate.put("NA10857", "1346 NA10857 NA12043 NA12044 1 0" ); hapMapTranslate.put("NA12043", "1346 NA12043 0 0 1 0"); hapMapTranslate.put("NA12044", "1346 NA12044 0 0 2 0"); hapMapTranslate.put("NA10859", "1347 NA10859 NA11881 NA11882 2 0" ); hapMapTranslate.put("NA11881", "1347 NA11881 0 0 1 0"); hapMapTranslate.put("NA11882", "1347 NA11882 0 0 2 0"); hapMapTranslate.put("NA10854", "1349 NA10854 NA11839 NA11840 2 0" ); hapMapTranslate.put("NA11839", "1349 NA11839 0 0 1 0"); hapMapTranslate.put("NA11840", "1349 NA11840 0 0 2 0"); hapMapTranslate.put("NA10856", "1350 NA10856 NA11829 NA11830 1 0" ); hapMapTranslate.put("NA11829", "1350 NA11829 0 0 1 0"); hapMapTranslate.put("NA11830", "1350 NA11830 0 0 2 0"); hapMapTranslate.put("NA10855", "1350 NA10855 NA11831 NA11832 2 0" ); hapMapTranslate.put("NA11831", "1350 NA11831 0 0 1 0"); hapMapTranslate.put("NA11832", "1350 NA11832 0 0 2 0"); hapMapTranslate.put("NA12707", "1358 NA12707 NA12716 NA12717 1 0" ); hapMapTranslate.put("NA12716", "1358 NA12716 0 0 1 0"); hapMapTranslate.put("NA12717", "1358 NA12717 0 0 2 0"); hapMapTranslate.put("NA10860", "1362 NA10860 NA11992 NA11993 1 0" ); hapMapTranslate.put("NA11992", "1362 NA11992 0 0 1 0"); hapMapTranslate.put("NA11993", "1362 NA11993 0 0 2 0"); hapMapTranslate.put("NA11993.dup", "dup NA11993.dup 0 0 2 0"); hapMapTranslate.put("NA10861", "1362 NA10861 NA11994 NA11995 2 0" ); hapMapTranslate.put("NA11994", "1362 NA11994 0 0 1 0"); hapMapTranslate.put("NA11995", "1362 NA11995 0 0 2 0"); hapMapTranslate.put("NA10863", "1375 NA10863 NA12264 NA12234 2 0" ); hapMapTranslate.put("NA12264", "1375 NA12264 0 0 1 0"); hapMapTranslate.put("NA12234", "1375 NA12234 0 0 2 0"); hapMapTranslate.put("NA10830", "1408 NA10830 NA12154 NA12236 1 0" ); hapMapTranslate.put("NA12154", "1408 NA12154 0 0 1 0"); hapMapTranslate.put("NA12236", "1408 NA12236 0 0 2 0"); hapMapTranslate.put("NA10831", "1408 NA10831 NA12155 NA12156 2 0" ); hapMapTranslate.put("NA12155", "1408 NA12155 0 0 1 0"); hapMapTranslate.put("NA12156", "1408 NA12156 0 0 2 0"); hapMapTranslate.put("NA12156.dup", "dup NA12156.dup 0 0 2 0"); hapMapTranslate.put("NA10835", "1416 NA10835 NA12248 NA12249 1 0" ); hapMapTranslate.put("NA12248", "1416 NA12248 0 0 1 0"); hapMapTranslate.put("NA12248.dup", "dup NA1248.dup 0 0 1 0"); hapMapTranslate.put("NA12249", "1416 NA12249 0 0 2 0"); hapMapTranslate.put("NA10838", "1420 NA10838 NA12003 NA12004 1 0" ); hapMapTranslate.put("NA12003", "1420 NA12003 0 0 1 0"); hapMapTranslate.put("NA12003.dup", "dup NA12003.dup 0 0 1 0"); hapMapTranslate.put("NA12004", "1420 NA12004 0 0 2 0"); hapMapTranslate.put("NA10839", "1420 NA10839 NA12005 NA12006 2 0" ); hapMapTranslate.put("NA12005", "1420 NA12005 0 0 1 0"); hapMapTranslate.put("NA12006", "1420 NA12006 0 0 2 0"); hapMapTranslate.put("NA12740", "1444 NA12740 NA12750 NA12751 2 0" ); hapMapTranslate.put("NA12750", "1444 NA12750 0 0 1 0"); hapMapTranslate.put("NA12751", "1444 NA12751 0 0 2 0"); hapMapTranslate.put("NA12752", "1447 NA12752 NA12760 NA12761 1 0" ); hapMapTranslate.put("NA12760", "1447 NA12760 0 0 1 0"); hapMapTranslate.put("NA12761", "1447 NA12761 0 0 2 0"); hapMapTranslate.put("NA12753", "1447 NA12753 NA12762 NA12763 2 0" ); hapMapTranslate.put("NA12762", "1447 NA12762 0 0 1 0"); hapMapTranslate.put("NA12763", "1447 NA12763 0 0 2 0"); hapMapTranslate.put("NA12801", "1454 NA12801 NA12812 NA12813 1 0" ); hapMapTranslate.put("NA12812", "1454 NA12812 0 0 1 0"); hapMapTranslate.put("NA12813", "1454 NA12813 0 0 2 0"); hapMapTranslate.put("NA12802", "1454 NA12802 NA12814 NA12815 2 0" ); hapMapTranslate.put("NA12814", "1454 NA12814 0 0 1 0"); hapMapTranslate.put("NA12815", "1454 NA12815 0 0 2 0"); hapMapTranslate.put("NA12864", "1459 NA12864 NA12872 NA12873 1 0" ); hapMapTranslate.put("NA12872", "1459 NA12872 0 0 1 0"); hapMapTranslate.put("NA12873", "1459 NA12873 0 0 2 0"); hapMapTranslate.put("NA12865", "1459 NA12865 NA12874 NA12875 2 0" ); hapMapTranslate.put("NA12874", "1459 NA12874 0 0 1 0"); hapMapTranslate.put("NA12875", "1459 NA12875 0 0 2 0"); hapMapTranslate.put("NA12878", "1463 NA12878 NA12891 NA12892 2 0" ); hapMapTranslate.put("NA12891", "1463 NA12891 0 0 1 0"); hapMapTranslate.put("NA12892", "1463 NA12892 0 0 2 0"); hapMapTranslate.put("NA18526", "chi1 NA18526 0 0 2 0"); hapMapTranslate.put("NA18524", "chi2 NA18524 0 0 1 0"); hapMapTranslate.put("NA18529", "chi3 NA18529 0 0 2 0"); hapMapTranslate.put("NA18558", "chi4 NA18558 0 0 1 0"); hapMapTranslate.put("NA18532", "chi5 NA18532 0 0 2 0"); hapMapTranslate.put("NA18561", "chi6 NA18561 0 0 1 0"); hapMapTranslate.put("NA18942", "jap1 NA18942 0 0 2 0"); hapMapTranslate.put("NA18940", "jap2 NA18940 0 0 1 0"); hapMapTranslate.put("NA18951", "jap3 NA18951 0 0 2 0"); hapMapTranslate.put("NA18943", "jap4 NA18943 0 0 1 0"); hapMapTranslate.put("NA18947", "jap5 NA18947 0 0 2 0"); hapMapTranslate.put("NA18944", "jap6 NA18944 0 0 1 0"); hapMapTranslate.put("NA18562", "chi7 NA18562 0 0 1 0"); hapMapTranslate.put("NA18537", "chi8 NA18537 0 0 2 0"); hapMapTranslate.put("NA18603", "chi9 NA18603 0 0 1 0"); hapMapTranslate.put("NA18540", "chi10 NA18540 0 0 2 0"); hapMapTranslate.put("NA18605", "chi11 NA18605 0 0 1 0"); hapMapTranslate.put("NA18542", "chi12 NA18542 0 0 2 0"); hapMapTranslate.put("NA18945", "jap7 NA18945 0 0 1 0"); hapMapTranslate.put("NA18949", "jap8 NA18949 0 0 2 0"); hapMapTranslate.put("NA18948", "jap9 NA18948 0 0 1 0"); hapMapTranslate.put("NA18952", "jap10 NA18952 0 0 1 0"); hapMapTranslate.put("NA18956", "jap11 NA18956 0 0 2 0"); hapMapTranslate.put("NA18545", "chi13 NA18545 0 0 2 0"); hapMapTranslate.put("NA18572", "chi46 NA18572 0 0 1 0"); hapMapTranslate.put("NA18547", "chi15 NA18547 0 0 2 0"); hapMapTranslate.put("NA18609", "chi16 NA18609 0 0 1 0"); hapMapTranslate.put("NA18550", "chi17 NA18550 0 0 2 0"); hapMapTranslate.put("NA18608", "chi18 NA18608 0 0 1 0"); hapMapTranslate.put("NA18964", "jap12 NA18964 0 0 2 0"); hapMapTranslate.put("NA18953", "jap13 NA18953 0 0 1 0"); hapMapTranslate.put("NA18968", "jap14 NA18968 0 0 2 0"); hapMapTranslate.put("NA18959", "jap15 NA18959 0 0 1 0"); hapMapTranslate.put("NA18969", "jap16 NA18969 0 0 2 0"); hapMapTranslate.put("NA18960", "jap17 NA18960 0 0 1 0"); hapMapTranslate.put("NA18552", "chi19 NA18552 0 0 2 0"); hapMapTranslate.put("NA18611", "chi20 NA18611 0 0 1 0"); hapMapTranslate.put("NA18555", "chi21 NA18555 0 0 2 0"); hapMapTranslate.put("NA18564", "chi22 NA18564 0 0 2 0"); hapMapTranslate.put("NA18961", "jap18 NA18961 0 0 1 0"); hapMapTranslate.put("NA18972", "jap19 NA18972 0 0 2 0"); hapMapTranslate.put("NA18965", "jap20 NA18965 0 0 1 0"); hapMapTranslate.put("NA18973", "jap21 NA18973 0 0 2 0"); hapMapTranslate.put("NA18966", "jap22 NA18966 0 0 1 0"); hapMapTranslate.put("NA18975", "jap23 NA18975 0 0 2 0"); hapMapTranslate.put("NA18566", "chi23 NA18566 0 0 2 0"); hapMapTranslate.put("NA18563", "chi24 NA18563 0 0 1 0"); hapMapTranslate.put("NA18570", "chi25 NA18570 0 0 2 0"); hapMapTranslate.put("NA18612", "chi26 NA18612 0 0 1 0"); hapMapTranslate.put("NA18571", "chi27 NA18571 0 0 2 0"); hapMapTranslate.put("NA18620", "chi28 NA18620 0 0 1 0"); hapMapTranslate.put("NA18976", "jap24 NA18976 0 0 2 0"); hapMapTranslate.put("NA18967", "jap25 NA18967 0 0 1 0"); hapMapTranslate.put("NA18978", "jap26 NA18978 0 0 2 0"); hapMapTranslate.put("NA18970", "jap27 NA18970 0 0 1 0"); hapMapTranslate.put("NA18980", "jap28 NA18980 0 0 2 0"); hapMapTranslate.put("NA18995", "jap29 NA18995 0 0 1 0"); hapMapTranslate.put("NA18621", "chi29 NA18621 0 0 1 0"); hapMapTranslate.put("NA18594", "chi30 NA18594 0 0 2 0"); hapMapTranslate.put("NA18622", "chi31 NA18622 0 0 1 0"); hapMapTranslate.put("NA18573", "chi32 NA18573 0 0 2 0"); hapMapTranslate.put("NA18623", "chi33 NA18623 0 0 1 0"); hapMapTranslate.put("NA18576", "chi34 NA18576 0 0 2 0"); hapMapTranslate.put("NA18971", "jap30 NA18971 0 0 1 0"); hapMapTranslate.put("NA18981", "jap31 NA18981 0 0 2 0"); hapMapTranslate.put("NA18974", "jap32 NA18974 0 0 1 0"); hapMapTranslate.put("NA18987", "jap33 NA18987 0 0 2 0"); hapMapTranslate.put("NA18990", "jap34 NA18990 0 0 1 0"); hapMapTranslate.put("NA18991", "jap35 NA18991 0 0 2 0"); hapMapTranslate.put("NA18577", "chi35 NA18577 0 0 2 0"); hapMapTranslate.put("NA18624", "chi36 NA18624 0 0 1 0"); hapMapTranslate.put("NA18579", "chi37 NA18579 0 0 2 0"); hapMapTranslate.put("NA18632", "chi38 NA18632 0 0 1 0"); hapMapTranslate.put("NA18582", "chi39 NA18582 0 0 2 0"); hapMapTranslate.put("NA18633", "chi40 NA18633 0 0 1 0"); hapMapTranslate.put("NA18994", "jap36 NA18994 0 0 1 0"); hapMapTranslate.put("NA18992", "jap37 NA18992 0 0 2 0"); hapMapTranslate.put("NA18997", "jap38 NA18997 0 0 2 0"); hapMapTranslate.put("NA18996", "jap39 NA18996 0 0 1 0"); hapMapTranslate.put("NA18635", "chi41 NA18635 0 0 1 0"); hapMapTranslate.put("NA18592", "chi42 NA18592 0 0 2 0"); hapMapTranslate.put("NA18636", "chi43 NA18636 0 0 1 0"); hapMapTranslate.put("NA18593", "chi44 NA18593 0 0 2 0"); hapMapTranslate.put("NA18637", "chi45 NA18637 0 0 1 0"); hapMapTranslate.put("NA19000", "jap40 NA19000 0 0 1 0"); hapMapTranslate.put("NA18998", "jap41 NA18998 0 0 2 0"); hapMapTranslate.put("NA19005", "jap42 NA19005 0 0 1 0"); hapMapTranslate.put("NA18999", "jap43 NA18999 0 0 2 0"); hapMapTranslate.put("NA19007", "jap44 NA19007 0 0 1 0"); hapMapTranslate.put("NA19003", "jap45 NA19003 0 0 2 0"); hapMapTranslate.put("NA18500", "Yoruba004 NA18500 NA18501 NA18502 1 0"); hapMapTranslate.put("NA18501", "Yoruba004 NA18501 0 0 1 0"); hapMapTranslate.put("NA18502", "Yoruba004 NA18502 0 0 2 0"); hapMapTranslate.put("NA18503", "Yoruba005 NA18503 NA18504 NA18505 1 0"); hapMapTranslate.put("NA18504", "Yoruba005 NA18504 0 0 1 0"); hapMapTranslate.put("NA18505", "Yoruba005 NA18505 0 0 2 0"); hapMapTranslate.put("NA18506", "Yoruba009 NA18506 NA18507 NA18508 1 0"); hapMapTranslate.put("NA18507", "Yoruba009 NA18507 0 0 1 0"); hapMapTranslate.put("NA18508", "Yoruba009 NA18508 0 0 2 0"); hapMapTranslate.put("NA18860", "Yoruba012 NA18860 NA18859 NA18858 1 0"); hapMapTranslate.put("NA18859", "Yoruba012 NA18859 0 0 1 0"); hapMapTranslate.put("NA18858", "Yoruba012 NA18858 0 0 2 0"); hapMapTranslate.put("NA18515", "Yoruba013 NA18515 NA18516 NA18517 1 0"); hapMapTranslate.put("NA18516", "Yoruba013 NA18516 0 0 1 0"); hapMapTranslate.put("NA18517", "Yoruba013 NA18517 0 0 2 0"); hapMapTranslate.put("NA18521", "Yoruba016 NA18521 NA18522 NA18523 1 0"); hapMapTranslate.put("NA18522", "Yoruba016 NA18522 0 0 1 0"); hapMapTranslate.put("NA18523", "Yoruba016 NA18523 0 0 2 0"); hapMapTranslate.put("NA18872", "Yoruba017 NA18872 NA18871 NA18870 1 0"); hapMapTranslate.put("NA18871", "Yoruba017 NA18871 0 0 1 0"); hapMapTranslate.put("NA18870", "Yoruba017 NA18870 0 0 2 0"); hapMapTranslate.put("NA18854", "Yoruba018 NA18854 NA18853 NA18852 1 0"); hapMapTranslate.put("NA18853", "Yoruba018 NA18853 0 0 1 0"); hapMapTranslate.put("NA18852", "Yoruba018 NA18852 0 0 2 0"); hapMapTranslate.put("NA18857", "Yoruba023 NA18857 NA18856 NA18855 1 0"); hapMapTranslate.put("NA18856", "Yoruba023 NA18856 0 0 1 0"); hapMapTranslate.put("NA18855", "Yoruba023 NA18855 0 0 2 0"); hapMapTranslate.put("NA18863", "Yoruba024 NA18863 NA18862 NA18861 1 0"); hapMapTranslate.put("NA18862", "Yoruba024 NA18862 0 0 1 0"); hapMapTranslate.put("NA18861", "Yoruba024 NA18861 0 0 2 0"); hapMapTranslate.put("NA18914", "Yoruba028 NA18914 NA18913 NA18912 1 0"); hapMapTranslate.put("NA18913", "Yoruba028 NA18913 0 0 1 0"); hapMapTranslate.put("NA18912", "Yoruba028 NA18912 0 0 2 0"); hapMapTranslate.put("NA19094", "Yoruba040 NA19094 NA19092 NA19093 2 0"); hapMapTranslate.put("NA19092", "Yoruba040 NA19092 0 0 1 0"); hapMapTranslate.put("NA19093", "Yoruba040 NA19093 0 0 2 0"); hapMapTranslate.put("NA19103", "Yoruba042 NA19103 NA19101 NA19102 1 0"); hapMapTranslate.put("NA19101", "Yoruba042 NA19101 0 0 1 0"); hapMapTranslate.put("NA19102", "Yoruba042 NA19102 0 0 2 0"); hapMapTranslate.put("NA19139", "Yoruba043 NA19139 NA19138 NA19137 1 0"); hapMapTranslate.put("NA19138", "Yoruba043 NA19138 0 0 1 0"); hapMapTranslate.put("NA19137", "Yoruba043 NA19137 0 0 2 0"); hapMapTranslate.put("NA19202", "Yoruba045 NA19202 NA19200 NA19201 2 0"); hapMapTranslate.put("NA19200", "Yoruba045 NA19200 0 0 1 0"); hapMapTranslate.put("NA19201", "Yoruba045 NA19201 0 0 2 0"); hapMapTranslate.put("NA19173", "Yoruba047 NA19173 NA19171 NA19172 1 0"); hapMapTranslate.put("NA19171", "Yoruba047 NA19171 0 0 1 0"); hapMapTranslate.put("NA19172", "Yoruba047 NA19172 0 0 2 0"); hapMapTranslate.put("NA19205", "Yoruba048 NA19205 NA19203 NA19204 1 0"); hapMapTranslate.put("NA19203", "Yoruba048 NA19203 0 0 1 0"); hapMapTranslate.put("NA19204", "Yoruba048 NA19204 0 0 2 0"); hapMapTranslate.put("NA19211", "Yoruba050 NA19211 NA19210 NA19209 1 0"); hapMapTranslate.put("NA19210", "Yoruba050 NA19210 0 0 1 0"); hapMapTranslate.put("NA19209", "Yoruba050 NA19209 0 0 2 0"); hapMapTranslate.put("NA19208", "Yoruba051 NA19208 NA19207 NA19206 1 0"); hapMapTranslate.put("NA19207", "Yoruba051 NA19207 0 0 1 0"); hapMapTranslate.put("NA19206", "Yoruba051 NA19206 0 0 2 0"); hapMapTranslate.put("NA19161", "Yoruba056 NA19161 NA19160 NA19159 1 0"); hapMapTranslate.put("NA19160", "Yoruba056 NA19160 0 0 1 0"); hapMapTranslate.put("NA19159", "Yoruba056 NA19159 0 0 2 0"); hapMapTranslate.put("NA19221", "Yoruba058 NA19221 NA19223 NA19222 2 0"); hapMapTranslate.put("NA19223", "Yoruba058 NA19223 0 0 1 0"); hapMapTranslate.put("NA19222", "Yoruba058 NA19222 0 0 2 0"); hapMapTranslate.put("NA19120", "Yoruba060 NA19120 NA19119 NA19116 1 0"); hapMapTranslate.put("NA19119", "Yoruba060 NA19119 0 0 1 0"); hapMapTranslate.put("NA19116", "Yoruba060 NA19116 0 0 2 0"); hapMapTranslate.put("NA19142", "Yoruba071 NA19142 NA19141 NA19140 1 0"); hapMapTranslate.put("NA19141", "Yoruba071 NA19141 0 0 1 0"); hapMapTranslate.put("NA19140", "Yoruba071 NA19140 0 0 2 0"); hapMapTranslate.put("NA19154", "Yoruba072 NA19154 NA19153 NA19152 1 0"); hapMapTranslate.put("NA19153", "Yoruba072 NA19153 0 0 1 0"); hapMapTranslate.put("NA19152", "Yoruba072 NA19152 0 0 2 0"); hapMapTranslate.put("NA19145", "Yoruba074 NA19145 NA19144 NA19143 1 0"); hapMapTranslate.put("NA19144", "Yoruba074 NA19144 0 0 1 0"); hapMapTranslate.put("NA19143", "Yoruba074 NA19143 0 0 2 0"); hapMapTranslate.put("NA19129", "Yoruba077 NA19129 NA19128 NA19127 2 0"); hapMapTranslate.put("NA19128", "Yoruba077 NA19128 0 0 1 0"); hapMapTranslate.put("NA19127", "Yoruba077 NA19127 0 0 2 0"); hapMapTranslate.put("NA19132", "Yoruba101 NA19132 NA19130 NA19131 2 0"); hapMapTranslate.put("NA19130", "Yoruba101 NA19130 0 0 1 0"); hapMapTranslate.put("NA19131", "Yoruba101 NA19131 0 0 2 0"); hapMapTranslate.put("NA19100", "Yoruba105 NA19100 NA19098 NA19099 2 0"); hapMapTranslate.put("NA19098", "Yoruba105 NA19098 0 0 1 0"); hapMapTranslate.put("NA19099", "Yoruba105 NA19099 0 0 2 0"); hapMapTranslate.put("NA19194", "Yoruba112 NA19194 NA19192 NA19193 1 0"); hapMapTranslate.put("NA19192", "Yoruba112 NA19192 0 0 1 0"); hapMapTranslate.put("NA19193", "Yoruba112 NA19193 0 0 2 0"); hapMapTranslate.put("NA19240", "Yoruba117 NA19240 NA19239 NA19238 2 0"); hapMapTranslate.put("NA19239", "Yoruba117 NA19239 0 0 1 0"); hapMapTranslate.put("NA19238", "Yoruba117 NA19238 0 0 2 0"); } |
|
hapMapTranslate.put("NA12156.dup", "dup NA12156.dup 0 0 2 0"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 0" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 0"); hapMapTranslate.put("NA12145", "1334 NA12145 0 0 2 0"); hapMapTranslate.put("NA10847", "1334 NA10847 NA12146 NA12239 2 0" ); hapMapTranslate.put("NA12146", "1334 NA12146 0 0 1 0"); hapMapTranslate.put("NA12239", "1334 NA12239 0 0 2 0"); hapMapTranslate.put("NA07029", "1340 NA07029 NA06994 NA07000 1 0" ); hapMapTranslate.put("NA06994", "1340 NA06994 0 0 1 0"); hapMapTranslate.put("NA07000", "1340 NA07000 0 0 2 0"); hapMapTranslate.put("NA07019", "1340 NA07019 NA07022 NA07056 2 0" ); hapMapTranslate.put("NA07022", "1340 NA07022 0 0 1 0"); hapMapTranslate.put("NA07056", "1340 NA07056 0 0 2 0"); hapMapTranslate.put("NA07048", "1341 NA07048 NA07034 NA07055 1 0" ); hapMapTranslate.put("NA07034", "1341 NA07034 0 0 1 0"); hapMapTranslate.put("NA07055", "1341 NA07055 0 0 2 0"); hapMapTranslate.put("NA06991", "1341 NA06991 NA06993 NA06985 2 0" ); hapMapTranslate.put("NA06993", "1341 NA06993 0 0 1 0"); hapMapTranslate.put("NA06993.dup", "dup NA06993.dup 0 0 1 0"); hapMapTranslate.put("NA06985", "1341 NA06985 0 0 2 0"); hapMapTranslate.put("NA10851", "1344 NA10851 NA12056 NA12057 1 0" ); hapMapTranslate.put("NA12056", "1344 NA12056 0 0 1 0"); hapMapTranslate.put("NA12057", "1344 NA12057 0 0 2 0"); hapMapTranslate.put("NA07348", "1345 NA07348 NA07357 NA07345 2 0" ); hapMapTranslate.put("NA07357", "1345 NA07357 0 0 1 0"); hapMapTranslate.put("NA07345", "1345 NA07345 0 0 2 0"); hapMapTranslate.put("NA10857", "1346 NA10857 NA12043 NA12044 1 0" ); hapMapTranslate.put("NA12043", "1346 NA12043 0 0 1 0"); hapMapTranslate.put("NA12044", "1346 NA12044 0 0 2 0"); hapMapTranslate.put("NA10859", "1347 NA10859 NA11881 NA11882 2 0" ); hapMapTranslate.put("NA11881", "1347 NA11881 0 0 1 0"); hapMapTranslate.put("NA11882", "1347 NA11882 0 0 2 0"); hapMapTranslate.put("NA10854", "1349 NA10854 NA11839 NA11840 2 0" ); hapMapTranslate.put("NA11839", "1349 NA11839 0 0 1 0"); hapMapTranslate.put("NA11840", "1349 NA11840 0 0 2 0"); hapMapTranslate.put("NA10856", "1350 NA10856 NA11829 NA11830 1 0" ); hapMapTranslate.put("NA11829", "1350 NA11829 0 0 1 0"); hapMapTranslate.put("NA11830", "1350 NA11830 0 0 2 0"); hapMapTranslate.put("NA10855", "1350 NA10855 NA11831 NA11832 2 0" ); hapMapTranslate.put("NA11831", "1350 NA11831 0 0 1 0"); hapMapTranslate.put("NA11832", "1350 NA11832 0 0 2 0"); hapMapTranslate.put("NA12707", "1358 NA12707 NA12716 NA12717 1 0" ); hapMapTranslate.put("NA12716", "1358 NA12716 0 0 1 0"); hapMapTranslate.put("NA12717", "1358 NA12717 0 0 2 0"); hapMapTranslate.put("NA10860", "1362 NA10860 NA11992 NA11993 1 0" ); hapMapTranslate.put("NA11992", "1362 NA11992 0 0 1 0"); hapMapTranslate.put("NA11993", "1362 NA11993 0 0 2 0"); hapMapTranslate.put("NA11993.dup", "dup NA11993.dup 0 0 2 0"); hapMapTranslate.put("NA10861", "1362 NA10861 NA11994 NA11995 2 0" ); hapMapTranslate.put("NA11994", "1362 NA11994 0 0 1 0"); hapMapTranslate.put("NA11995", "1362 NA11995 0 0 2 0"); hapMapTranslate.put("NA10863", "1375 NA10863 NA12264 NA12234 2 0" ); hapMapTranslate.put("NA12264", "1375 NA12264 0 0 1 0"); hapMapTranslate.put("NA12234", "1375 NA12234 0 0 2 0"); hapMapTranslate.put("NA10830", "1408 NA10830 NA12154 NA12236 1 0" ); hapMapTranslate.put("NA12154", "1408 NA12154 0 0 1 0"); hapMapTranslate.put("NA12236", "1408 NA12236 0 0 2 0"); hapMapTranslate.put("NA10831", "1408 NA10831 NA12155 NA12156 2 0" ); hapMapTranslate.put("NA12155", "1408 NA12155 0 0 1 0"); hapMapTranslate.put("NA12156", "1408 NA12156 0 0 2 0"); hapMapTranslate.put("NA12156.dup", "dup NA12156.dup 0 0 2 0"); hapMapTranslate.put("NA10835", "1416 NA10835 NA12248 NA12249 1 0" ); hapMapTranslate.put("NA12248", "1416 NA12248 0 0 1 0"); hapMapTranslate.put("NA12248.dup", "dup NA1248.dup 0 0 1 0"); hapMapTranslate.put("NA12249", "1416 NA12249 0 0 2 0"); hapMapTranslate.put("NA10838", "1420 NA10838 NA12003 NA12004 1 0" ); hapMapTranslate.put("NA12003", "1420 NA12003 0 0 1 0"); hapMapTranslate.put("NA12003.dup", "dup NA12003.dup 0 0 1 0"); hapMapTranslate.put("NA12004", "1420 NA12004 0 0 2 0"); hapMapTranslate.put("NA10839", "1420 NA10839 NA12005 NA12006 2 0" ); hapMapTranslate.put("NA12005", "1420 NA12005 0 0 1 0"); hapMapTranslate.put("NA12006", "1420 NA12006 0 0 2 0"); hapMapTranslate.put("NA12740", "1444 NA12740 NA12750 NA12751 2 0" ); hapMapTranslate.put("NA12750", "1444 NA12750 0 0 1 0"); hapMapTranslate.put("NA12751", "1444 NA12751 0 0 2 0"); hapMapTranslate.put("NA12752", "1447 NA12752 NA12760 NA12761 1 0" ); hapMapTranslate.put("NA12760", "1447 NA12760 0 0 1 0"); hapMapTranslate.put("NA12761", "1447 NA12761 0 0 2 0"); hapMapTranslate.put("NA12753", "1447 NA12753 NA12762 NA12763 2 0" ); hapMapTranslate.put("NA12762", "1447 NA12762 0 0 1 0"); hapMapTranslate.put("NA12763", "1447 NA12763 0 0 2 0"); hapMapTranslate.put("NA12801", "1454 NA12801 NA12812 NA12813 1 0" ); hapMapTranslate.put("NA12812", "1454 NA12812 0 0 1 0"); hapMapTranslate.put("NA12813", "1454 NA12813 0 0 2 0"); hapMapTranslate.put("NA12802", "1454 NA12802 NA12814 NA12815 2 0" ); hapMapTranslate.put("NA12814", "1454 NA12814 0 0 1 0"); hapMapTranslate.put("NA12815", "1454 NA12815 0 0 2 0"); hapMapTranslate.put("NA12864", "1459 NA12864 NA12872 NA12873 1 0" ); hapMapTranslate.put("NA12872", "1459 NA12872 0 0 1 0"); hapMapTranslate.put("NA12873", "1459 NA12873 0 0 2 0"); hapMapTranslate.put("NA12865", "1459 NA12865 NA12874 NA12875 2 0" ); hapMapTranslate.put("NA12874", "1459 NA12874 0 0 1 0"); hapMapTranslate.put("NA12875", "1459 NA12875 0 0 2 0"); hapMapTranslate.put("NA12878", "1463 NA12878 NA12891 NA12892 2 0" ); hapMapTranslate.put("NA12891", "1463 NA12891 0 0 1 0"); hapMapTranslate.put("NA12892", "1463 NA12892 0 0 2 0"); hapMapTranslate.put("NA18526", "chi1 NA18526 0 0 2 0"); hapMapTranslate.put("NA18524", "chi2 NA18524 0 0 1 0"); hapMapTranslate.put("NA18529", "chi3 NA18529 0 0 2 0"); hapMapTranslate.put("NA18558", "chi4 NA18558 0 0 1 0"); hapMapTranslate.put("NA18532", "chi5 NA18532 0 0 2 0"); hapMapTranslate.put("NA18561", "chi6 NA18561 0 0 1 0"); hapMapTranslate.put("NA18942", "jap1 NA18942 0 0 2 0"); hapMapTranslate.put("NA18940", "jap2 NA18940 0 0 1 0"); hapMapTranslate.put("NA18951", "jap3 NA18951 0 0 2 0"); hapMapTranslate.put("NA18943", "jap4 NA18943 0 0 1 0"); hapMapTranslate.put("NA18947", "jap5 NA18947 0 0 2 0"); hapMapTranslate.put("NA18944", "jap6 NA18944 0 0 1 0"); hapMapTranslate.put("NA18562", "chi7 NA18562 0 0 1 0"); hapMapTranslate.put("NA18537", "chi8 NA18537 0 0 2 0"); hapMapTranslate.put("NA18603", "chi9 NA18603 0 0 1 0"); hapMapTranslate.put("NA18540", "chi10 NA18540 0 0 2 0"); hapMapTranslate.put("NA18605", "chi11 NA18605 0 0 1 0"); hapMapTranslate.put("NA18542", "chi12 NA18542 0 0 2 0"); hapMapTranslate.put("NA18945", "jap7 NA18945 0 0 1 0"); hapMapTranslate.put("NA18949", "jap8 NA18949 0 0 2 0"); hapMapTranslate.put("NA18948", "jap9 NA18948 0 0 1 0"); hapMapTranslate.put("NA18952", "jap10 NA18952 0 0 1 0"); hapMapTranslate.put("NA18956", "jap11 NA18956 0 0 2 0"); hapMapTranslate.put("NA18545", "chi13 NA18545 0 0 2 0"); hapMapTranslate.put("NA18572", "chi46 NA18572 0 0 1 0"); hapMapTranslate.put("NA18547", "chi15 NA18547 0 0 2 0"); hapMapTranslate.put("NA18609", "chi16 NA18609 0 0 1 0"); hapMapTranslate.put("NA18550", "chi17 NA18550 0 0 2 0"); hapMapTranslate.put("NA18608", "chi18 NA18608 0 0 1 0"); hapMapTranslate.put("NA18964", "jap12 NA18964 0 0 2 0"); hapMapTranslate.put("NA18953", "jap13 NA18953 0 0 1 0"); hapMapTranslate.put("NA18968", "jap14 NA18968 0 0 2 0"); hapMapTranslate.put("NA18959", "jap15 NA18959 0 0 1 0"); hapMapTranslate.put("NA18969", "jap16 NA18969 0 0 2 0"); hapMapTranslate.put("NA18960", "jap17 NA18960 0 0 1 0"); hapMapTranslate.put("NA18552", "chi19 NA18552 0 0 2 0"); hapMapTranslate.put("NA18611", "chi20 NA18611 0 0 1 0"); hapMapTranslate.put("NA18555", "chi21 NA18555 0 0 2 0"); hapMapTranslate.put("NA18564", "chi22 NA18564 0 0 2 0"); hapMapTranslate.put("NA18961", "jap18 NA18961 0 0 1 0"); hapMapTranslate.put("NA18972", "jap19 NA18972 0 0 2 0"); hapMapTranslate.put("NA18965", "jap20 NA18965 0 0 1 0"); hapMapTranslate.put("NA18973", "jap21 NA18973 0 0 2 0"); hapMapTranslate.put("NA18966", "jap22 NA18966 0 0 1 0"); hapMapTranslate.put("NA18975", "jap23 NA18975 0 0 2 0"); hapMapTranslate.put("NA18566", "chi23 NA18566 0 0 2 0"); hapMapTranslate.put("NA18563", "chi24 NA18563 0 0 1 0"); hapMapTranslate.put("NA18570", "chi25 NA18570 0 0 2 0"); hapMapTranslate.put("NA18612", "chi26 NA18612 0 0 1 0"); hapMapTranslate.put("NA18571", "chi27 NA18571 0 0 2 0"); hapMapTranslate.put("NA18620", "chi28 NA18620 0 0 1 0"); hapMapTranslate.put("NA18976", "jap24 NA18976 0 0 2 0"); hapMapTranslate.put("NA18967", "jap25 NA18967 0 0 1 0"); hapMapTranslate.put("NA18978", "jap26 NA18978 0 0 2 0"); hapMapTranslate.put("NA18970", "jap27 NA18970 0 0 1 0"); hapMapTranslate.put("NA18980", "jap28 NA18980 0 0 2 0"); hapMapTranslate.put("NA18995", "jap29 NA18995 0 0 1 0"); hapMapTranslate.put("NA18621", "chi29 NA18621 0 0 1 0"); hapMapTranslate.put("NA18594", "chi30 NA18594 0 0 2 0"); hapMapTranslate.put("NA18622", "chi31 NA18622 0 0 1 0"); hapMapTranslate.put("NA18573", "chi32 NA18573 0 0 2 0"); hapMapTranslate.put("NA18623", "chi33 NA18623 0 0 1 0"); hapMapTranslate.put("NA18576", "chi34 NA18576 0 0 2 0"); hapMapTranslate.put("NA18971", "jap30 NA18971 0 0 1 0"); hapMapTranslate.put("NA18981", "jap31 NA18981 0 0 2 0"); hapMapTranslate.put("NA18974", "jap32 NA18974 0 0 1 0"); hapMapTranslate.put("NA18987", "jap33 NA18987 0 0 2 0"); hapMapTranslate.put("NA18990", "jap34 NA18990 0 0 1 0"); hapMapTranslate.put("NA18991", "jap35 NA18991 0 0 2 0"); hapMapTranslate.put("NA18577", "chi35 NA18577 0 0 2 0"); hapMapTranslate.put("NA18624", "chi36 NA18624 0 0 1 0"); hapMapTranslate.put("NA18579", "chi37 NA18579 0 0 2 0"); hapMapTranslate.put("NA18632", "chi38 NA18632 0 0 1 0"); hapMapTranslate.put("NA18582", "chi39 NA18582 0 0 2 0"); hapMapTranslate.put("NA18633", "chi40 NA18633 0 0 1 0"); hapMapTranslate.put("NA18994", "jap36 NA18994 0 0 1 0"); hapMapTranslate.put("NA18992", "jap37 NA18992 0 0 2 0"); hapMapTranslate.put("NA18997", "jap38 NA18997 0 0 2 0"); hapMapTranslate.put("NA18996", "jap39 NA18996 0 0 1 0"); hapMapTranslate.put("NA18635", "chi41 NA18635 0 0 1 0"); hapMapTranslate.put("NA18592", "chi42 NA18592 0 0 2 0"); hapMapTranslate.put("NA18636", "chi43 NA18636 0 0 1 0"); hapMapTranslate.put("NA18593", "chi44 NA18593 0 0 2 0"); hapMapTranslate.put("NA18637", "chi45 NA18637 0 0 1 0"); hapMapTranslate.put("NA19000", "jap40 NA19000 0 0 1 0"); hapMapTranslate.put("NA18998", "jap41 NA18998 0 0 2 0"); hapMapTranslate.put("NA19005", "jap42 NA19005 0 0 1 0"); hapMapTranslate.put("NA18999", "jap43 NA18999 0 0 2 0"); hapMapTranslate.put("NA19007", "jap44 NA19007 0 0 1 0"); hapMapTranslate.put("NA19003", "jap45 NA19003 0 0 2 0"); hapMapTranslate.put("NA18500", "Yoruba004 NA18500 NA18501 NA18502 1 0"); hapMapTranslate.put("NA18501", "Yoruba004 NA18501 0 0 1 0"); hapMapTranslate.put("NA18502", "Yoruba004 NA18502 0 0 2 0"); hapMapTranslate.put("NA18503", "Yoruba005 NA18503 NA18504 NA18505 1 0"); hapMapTranslate.put("NA18504", "Yoruba005 NA18504 0 0 1 0"); hapMapTranslate.put("NA18505", "Yoruba005 NA18505 0 0 2 0"); hapMapTranslate.put("NA18506", "Yoruba009 NA18506 NA18507 NA18508 1 0"); hapMapTranslate.put("NA18507", "Yoruba009 NA18507 0 0 1 0"); hapMapTranslate.put("NA18508", "Yoruba009 NA18508 0 0 2 0"); hapMapTranslate.put("NA18860", "Yoruba012 NA18860 NA18859 NA18858 1 0"); hapMapTranslate.put("NA18859", "Yoruba012 NA18859 0 0 1 0"); hapMapTranslate.put("NA18858", "Yoruba012 NA18858 0 0 2 0"); hapMapTranslate.put("NA18515", "Yoruba013 NA18515 NA18516 NA18517 1 0"); hapMapTranslate.put("NA18516", "Yoruba013 NA18516 0 0 1 0"); hapMapTranslate.put("NA18517", "Yoruba013 NA18517 0 0 2 0"); hapMapTranslate.put("NA18521", "Yoruba016 NA18521 NA18522 NA18523 1 0"); hapMapTranslate.put("NA18522", "Yoruba016 NA18522 0 0 1 0"); hapMapTranslate.put("NA18523", "Yoruba016 NA18523 0 0 2 0"); hapMapTranslate.put("NA18872", "Yoruba017 NA18872 NA18871 NA18870 1 0"); hapMapTranslate.put("NA18871", "Yoruba017 NA18871 0 0 1 0"); hapMapTranslate.put("NA18870", "Yoruba017 NA18870 0 0 2 0"); hapMapTranslate.put("NA18854", "Yoruba018 NA18854 NA18853 NA18852 1 0"); hapMapTranslate.put("NA18853", "Yoruba018 NA18853 0 0 1 0"); hapMapTranslate.put("NA18852", "Yoruba018 NA18852 0 0 2 0"); hapMapTranslate.put("NA18857", "Yoruba023 NA18857 NA18856 NA18855 1 0"); hapMapTranslate.put("NA18856", "Yoruba023 NA18856 0 0 1 0"); hapMapTranslate.put("NA18855", "Yoruba023 NA18855 0 0 2 0"); hapMapTranslate.put("NA18863", "Yoruba024 NA18863 NA18862 NA18861 1 0"); hapMapTranslate.put("NA18862", "Yoruba024 NA18862 0 0 1 0"); hapMapTranslate.put("NA18861", "Yoruba024 NA18861 0 0 2 0"); hapMapTranslate.put("NA18914", "Yoruba028 NA18914 NA18913 NA18912 1 0"); hapMapTranslate.put("NA18913", "Yoruba028 NA18913 0 0 1 0"); hapMapTranslate.put("NA18912", "Yoruba028 NA18912 0 0 2 0"); hapMapTranslate.put("NA19094", "Yoruba040 NA19094 NA19092 NA19093 2 0"); hapMapTranslate.put("NA19092", "Yoruba040 NA19092 0 0 1 0"); hapMapTranslate.put("NA19093", "Yoruba040 NA19093 0 0 2 0"); hapMapTranslate.put("NA19103", "Yoruba042 NA19103 NA19101 NA19102 1 0"); hapMapTranslate.put("NA19101", "Yoruba042 NA19101 0 0 1 0"); hapMapTranslate.put("NA19102", "Yoruba042 NA19102 0 0 2 0"); hapMapTranslate.put("NA19139", "Yoruba043 NA19139 NA19138 NA19137 1 0"); hapMapTranslate.put("NA19138", "Yoruba043 NA19138 0 0 1 0"); hapMapTranslate.put("NA19137", "Yoruba043 NA19137 0 0 2 0"); hapMapTranslate.put("NA19202", "Yoruba045 NA19202 NA19200 NA19201 2 0"); hapMapTranslate.put("NA19200", "Yoruba045 NA19200 0 0 1 0"); hapMapTranslate.put("NA19201", "Yoruba045 NA19201 0 0 2 0"); hapMapTranslate.put("NA19173", "Yoruba047 NA19173 NA19171 NA19172 1 0"); hapMapTranslate.put("NA19171", "Yoruba047 NA19171 0 0 1 0"); hapMapTranslate.put("NA19172", "Yoruba047 NA19172 0 0 2 0"); hapMapTranslate.put("NA19205", "Yoruba048 NA19205 NA19203 NA19204 1 0"); hapMapTranslate.put("NA19203", "Yoruba048 NA19203 0 0 1 0"); hapMapTranslate.put("NA19204", "Yoruba048 NA19204 0 0 2 0"); hapMapTranslate.put("NA19211", "Yoruba050 NA19211 NA19210 NA19209 1 0"); hapMapTranslate.put("NA19210", "Yoruba050 NA19210 0 0 1 0"); hapMapTranslate.put("NA19209", "Yoruba050 NA19209 0 0 2 0"); hapMapTranslate.put("NA19208", "Yoruba051 NA19208 NA19207 NA19206 1 0"); hapMapTranslate.put("NA19207", "Yoruba051 NA19207 0 0 1 0"); hapMapTranslate.put("NA19206", "Yoruba051 NA19206 0 0 2 0"); hapMapTranslate.put("NA19161", "Yoruba056 NA19161 NA19160 NA19159 1 0"); hapMapTranslate.put("NA19160", "Yoruba056 NA19160 0 0 1 0"); hapMapTranslate.put("NA19159", "Yoruba056 NA19159 0 0 2 0"); hapMapTranslate.put("NA19221", "Yoruba058 NA19221 NA19223 NA19222 2 0"); hapMapTranslate.put("NA19223", "Yoruba058 NA19223 0 0 1 0"); hapMapTranslate.put("NA19222", "Yoruba058 NA19222 0 0 2 0"); hapMapTranslate.put("NA19120", "Yoruba060 NA19120 NA19119 NA19116 1 0"); hapMapTranslate.put("NA19119", "Yoruba060 NA19119 0 0 1 0"); hapMapTranslate.put("NA19116", "Yoruba060 NA19116 0 0 2 0"); hapMapTranslate.put("NA19142", "Yoruba071 NA19142 NA19141 NA19140 1 0"); hapMapTranslate.put("NA19141", "Yoruba071 NA19141 0 0 1 0"); hapMapTranslate.put("NA19140", "Yoruba071 NA19140 0 0 2 0"); hapMapTranslate.put("NA19154", "Yoruba072 NA19154 NA19153 NA19152 1 0"); hapMapTranslate.put("NA19153", "Yoruba072 NA19153 0 0 1 0"); hapMapTranslate.put("NA19152", "Yoruba072 NA19152 0 0 2 0"); hapMapTranslate.put("NA19145", "Yoruba074 NA19145 NA19144 NA19143 1 0"); hapMapTranslate.put("NA19144", "Yoruba074 NA19144 0 0 1 0"); hapMapTranslate.put("NA19143", "Yoruba074 NA19143 0 0 2 0"); hapMapTranslate.put("NA19129", "Yoruba077 NA19129 NA19128 NA19127 2 0"); hapMapTranslate.put("NA19128", "Yoruba077 NA19128 0 0 1 0"); hapMapTranslate.put("NA19127", "Yoruba077 NA19127 0 0 2 0"); hapMapTranslate.put("NA19132", "Yoruba101 NA19132 NA19130 NA19131 2 0"); hapMapTranslate.put("NA19130", "Yoruba101 NA19130 0 0 1 0"); hapMapTranslate.put("NA19131", "Yoruba101 NA19131 0 0 2 0"); hapMapTranslate.put("NA19100", "Yoruba105 NA19100 NA19098 NA19099 2 0"); hapMapTranslate.put("NA19098", "Yoruba105 NA19098 0 0 1 0"); hapMapTranslate.put("NA19099", "Yoruba105 NA19099 0 0 2 0"); hapMapTranslate.put("NA19194", "Yoruba112 NA19194 NA19192 NA19193 1 0"); hapMapTranslate.put("NA19192", "Yoruba112 NA19192 0 0 1 0"); hapMapTranslate.put("NA19193", "Yoruba112 NA19193 0 0 2 0"); hapMapTranslate.put("NA19240", "Yoruba117 NA19240 NA19239 NA19238 2 0"); hapMapTranslate.put("NA19239", "Yoruba117 NA19239 0 0 1 0"); hapMapTranslate.put("NA19238", "Yoruba117 NA19238 0 0 2 0"); } |
|
hapMapTranslate.put("NA12248.dup", "dup NA1248.dup 0 0 1 0"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 0" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 0"); hapMapTranslate.put("NA12145", "1334 NA12145 0 0 2 0"); hapMapTranslate.put("NA10847", "1334 NA10847 NA12146 NA12239 2 0" ); hapMapTranslate.put("NA12146", "1334 NA12146 0 0 1 0"); hapMapTranslate.put("NA12239", "1334 NA12239 0 0 2 0"); hapMapTranslate.put("NA07029", "1340 NA07029 NA06994 NA07000 1 0" ); hapMapTranslate.put("NA06994", "1340 NA06994 0 0 1 0"); hapMapTranslate.put("NA07000", "1340 NA07000 0 0 2 0"); hapMapTranslate.put("NA07019", "1340 NA07019 NA07022 NA07056 2 0" ); hapMapTranslate.put("NA07022", "1340 NA07022 0 0 1 0"); hapMapTranslate.put("NA07056", "1340 NA07056 0 0 2 0"); hapMapTranslate.put("NA07048", "1341 NA07048 NA07034 NA07055 1 0" ); hapMapTranslate.put("NA07034", "1341 NA07034 0 0 1 0"); hapMapTranslate.put("NA07055", "1341 NA07055 0 0 2 0"); hapMapTranslate.put("NA06991", "1341 NA06991 NA06993 NA06985 2 0" ); hapMapTranslate.put("NA06993", "1341 NA06993 0 0 1 0"); hapMapTranslate.put("NA06993.dup", "dup NA06993.dup 0 0 1 0"); hapMapTranslate.put("NA06985", "1341 NA06985 0 0 2 0"); hapMapTranslate.put("NA10851", "1344 NA10851 NA12056 NA12057 1 0" ); hapMapTranslate.put("NA12056", "1344 NA12056 0 0 1 0"); hapMapTranslate.put("NA12057", "1344 NA12057 0 0 2 0"); hapMapTranslate.put("NA07348", "1345 NA07348 NA07357 NA07345 2 0" ); hapMapTranslate.put("NA07357", "1345 NA07357 0 0 1 0"); hapMapTranslate.put("NA07345", "1345 NA07345 0 0 2 0"); hapMapTranslate.put("NA10857", "1346 NA10857 NA12043 NA12044 1 0" ); hapMapTranslate.put("NA12043", "1346 NA12043 0 0 1 0"); hapMapTranslate.put("NA12044", "1346 NA12044 0 0 2 0"); hapMapTranslate.put("NA10859", "1347 NA10859 NA11881 NA11882 2 0" ); hapMapTranslate.put("NA11881", "1347 NA11881 0 0 1 0"); hapMapTranslate.put("NA11882", "1347 NA11882 0 0 2 0"); hapMapTranslate.put("NA10854", "1349 NA10854 NA11839 NA11840 2 0" ); hapMapTranslate.put("NA11839", "1349 NA11839 0 0 1 0"); hapMapTranslate.put("NA11840", "1349 NA11840 0 0 2 0"); hapMapTranslate.put("NA10856", "1350 NA10856 NA11829 NA11830 1 0" ); hapMapTranslate.put("NA11829", "1350 NA11829 0 0 1 0"); hapMapTranslate.put("NA11830", "1350 NA11830 0 0 2 0"); hapMapTranslate.put("NA10855", "1350 NA10855 NA11831 NA11832 2 0" ); hapMapTranslate.put("NA11831", "1350 NA11831 0 0 1 0"); hapMapTranslate.put("NA11832", "1350 NA11832 0 0 2 0"); hapMapTranslate.put("NA12707", "1358 NA12707 NA12716 NA12717 1 0" ); hapMapTranslate.put("NA12716", "1358 NA12716 0 0 1 0"); hapMapTranslate.put("NA12717", "1358 NA12717 0 0 2 0"); hapMapTranslate.put("NA10860", "1362 NA10860 NA11992 NA11993 1 0" ); hapMapTranslate.put("NA11992", "1362 NA11992 0 0 1 0"); hapMapTranslate.put("NA11993", "1362 NA11993 0 0 2 0"); hapMapTranslate.put("NA11993.dup", "dup NA11993.dup 0 0 2 0"); hapMapTranslate.put("NA10861", "1362 NA10861 NA11994 NA11995 2 0" ); hapMapTranslate.put("NA11994", "1362 NA11994 0 0 1 0"); hapMapTranslate.put("NA11995", "1362 NA11995 0 0 2 0"); hapMapTranslate.put("NA10863", "1375 NA10863 NA12264 NA12234 2 0" ); hapMapTranslate.put("NA12264", "1375 NA12264 0 0 1 0"); hapMapTranslate.put("NA12234", "1375 NA12234 0 0 2 0"); hapMapTranslate.put("NA10830", "1408 NA10830 NA12154 NA12236 1 0" ); hapMapTranslate.put("NA12154", "1408 NA12154 0 0 1 0"); hapMapTranslate.put("NA12236", "1408 NA12236 0 0 2 0"); hapMapTranslate.put("NA10831", "1408 NA10831 NA12155 NA12156 2 0" ); hapMapTranslate.put("NA12155", "1408 NA12155 0 0 1 0"); hapMapTranslate.put("NA12156", "1408 NA12156 0 0 2 0"); hapMapTranslate.put("NA12156.dup", "dup NA12156.dup 0 0 2 0"); hapMapTranslate.put("NA10835", "1416 NA10835 NA12248 NA12249 1 0" ); hapMapTranslate.put("NA12248", "1416 NA12248 0 0 1 0"); hapMapTranslate.put("NA12248.dup", "dup NA1248.dup 0 0 1 0"); hapMapTranslate.put("NA12249", "1416 NA12249 0 0 2 0"); hapMapTranslate.put("NA10838", "1420 NA10838 NA12003 NA12004 1 0" ); hapMapTranslate.put("NA12003", "1420 NA12003 0 0 1 0"); hapMapTranslate.put("NA12003.dup", "dup NA12003.dup 0 0 1 0"); hapMapTranslate.put("NA12004", "1420 NA12004 0 0 2 0"); hapMapTranslate.put("NA10839", "1420 NA10839 NA12005 NA12006 2 0" ); hapMapTranslate.put("NA12005", "1420 NA12005 0 0 1 0"); hapMapTranslate.put("NA12006", "1420 NA12006 0 0 2 0"); hapMapTranslate.put("NA12740", "1444 NA12740 NA12750 NA12751 2 0" ); hapMapTranslate.put("NA12750", "1444 NA12750 0 0 1 0"); hapMapTranslate.put("NA12751", "1444 NA12751 0 0 2 0"); hapMapTranslate.put("NA12752", "1447 NA12752 NA12760 NA12761 1 0" ); hapMapTranslate.put("NA12760", "1447 NA12760 0 0 1 0"); hapMapTranslate.put("NA12761", "1447 NA12761 0 0 2 0"); hapMapTranslate.put("NA12753", "1447 NA12753 NA12762 NA12763 2 0" ); hapMapTranslate.put("NA12762", "1447 NA12762 0 0 1 0"); hapMapTranslate.put("NA12763", "1447 NA12763 0 0 2 0"); hapMapTranslate.put("NA12801", "1454 NA12801 NA12812 NA12813 1 0" ); hapMapTranslate.put("NA12812", "1454 NA12812 0 0 1 0"); hapMapTranslate.put("NA12813", "1454 NA12813 0 0 2 0"); hapMapTranslate.put("NA12802", "1454 NA12802 NA12814 NA12815 2 0" ); hapMapTranslate.put("NA12814", "1454 NA12814 0 0 1 0"); hapMapTranslate.put("NA12815", "1454 NA12815 0 0 2 0"); hapMapTranslate.put("NA12864", "1459 NA12864 NA12872 NA12873 1 0" ); hapMapTranslate.put("NA12872", "1459 NA12872 0 0 1 0"); hapMapTranslate.put("NA12873", "1459 NA12873 0 0 2 0"); hapMapTranslate.put("NA12865", "1459 NA12865 NA12874 NA12875 2 0" ); hapMapTranslate.put("NA12874", "1459 NA12874 0 0 1 0"); hapMapTranslate.put("NA12875", "1459 NA12875 0 0 2 0"); hapMapTranslate.put("NA12878", "1463 NA12878 NA12891 NA12892 2 0" ); hapMapTranslate.put("NA12891", "1463 NA12891 0 0 1 0"); hapMapTranslate.put("NA12892", "1463 NA12892 0 0 2 0"); hapMapTranslate.put("NA18526", "chi1 NA18526 0 0 2 0"); hapMapTranslate.put("NA18524", "chi2 NA18524 0 0 1 0"); hapMapTranslate.put("NA18529", "chi3 NA18529 0 0 2 0"); hapMapTranslate.put("NA18558", "chi4 NA18558 0 0 1 0"); hapMapTranslate.put("NA18532", "chi5 NA18532 0 0 2 0"); hapMapTranslate.put("NA18561", "chi6 NA18561 0 0 1 0"); hapMapTranslate.put("NA18942", "jap1 NA18942 0 0 2 0"); hapMapTranslate.put("NA18940", "jap2 NA18940 0 0 1 0"); hapMapTranslate.put("NA18951", "jap3 NA18951 0 0 2 0"); hapMapTranslate.put("NA18943", "jap4 NA18943 0 0 1 0"); hapMapTranslate.put("NA18947", "jap5 NA18947 0 0 2 0"); hapMapTranslate.put("NA18944", "jap6 NA18944 0 0 1 0"); hapMapTranslate.put("NA18562", "chi7 NA18562 0 0 1 0"); hapMapTranslate.put("NA18537", "chi8 NA18537 0 0 2 0"); hapMapTranslate.put("NA18603", "chi9 NA18603 0 0 1 0"); hapMapTranslate.put("NA18540", "chi10 NA18540 0 0 2 0"); hapMapTranslate.put("NA18605", "chi11 NA18605 0 0 1 0"); hapMapTranslate.put("NA18542", "chi12 NA18542 0 0 2 0"); hapMapTranslate.put("NA18945", "jap7 NA18945 0 0 1 0"); hapMapTranslate.put("NA18949", "jap8 NA18949 0 0 2 0"); hapMapTranslate.put("NA18948", "jap9 NA18948 0 0 1 0"); hapMapTranslate.put("NA18952", "jap10 NA18952 0 0 1 0"); hapMapTranslate.put("NA18956", "jap11 NA18956 0 0 2 0"); hapMapTranslate.put("NA18545", "chi13 NA18545 0 0 2 0"); hapMapTranslate.put("NA18572", "chi46 NA18572 0 0 1 0"); hapMapTranslate.put("NA18547", "chi15 NA18547 0 0 2 0"); hapMapTranslate.put("NA18609", "chi16 NA18609 0 0 1 0"); hapMapTranslate.put("NA18550", "chi17 NA18550 0 0 2 0"); hapMapTranslate.put("NA18608", "chi18 NA18608 0 0 1 0"); hapMapTranslate.put("NA18964", "jap12 NA18964 0 0 2 0"); hapMapTranslate.put("NA18953", "jap13 NA18953 0 0 1 0"); hapMapTranslate.put("NA18968", "jap14 NA18968 0 0 2 0"); hapMapTranslate.put("NA18959", "jap15 NA18959 0 0 1 0"); hapMapTranslate.put("NA18969", "jap16 NA18969 0 0 2 0"); hapMapTranslate.put("NA18960", "jap17 NA18960 0 0 1 0"); hapMapTranslate.put("NA18552", "chi19 NA18552 0 0 2 0"); hapMapTranslate.put("NA18611", "chi20 NA18611 0 0 1 0"); hapMapTranslate.put("NA18555", "chi21 NA18555 0 0 2 0"); hapMapTranslate.put("NA18564", "chi22 NA18564 0 0 2 0"); hapMapTranslate.put("NA18961", "jap18 NA18961 0 0 1 0"); hapMapTranslate.put("NA18972", "jap19 NA18972 0 0 2 0"); hapMapTranslate.put("NA18965", "jap20 NA18965 0 0 1 0"); hapMapTranslate.put("NA18973", "jap21 NA18973 0 0 2 0"); hapMapTranslate.put("NA18966", "jap22 NA18966 0 0 1 0"); hapMapTranslate.put("NA18975", "jap23 NA18975 0 0 2 0"); hapMapTranslate.put("NA18566", "chi23 NA18566 0 0 2 0"); hapMapTranslate.put("NA18563", "chi24 NA18563 0 0 1 0"); hapMapTranslate.put("NA18570", "chi25 NA18570 0 0 2 0"); hapMapTranslate.put("NA18612", "chi26 NA18612 0 0 1 0"); hapMapTranslate.put("NA18571", "chi27 NA18571 0 0 2 0"); hapMapTranslate.put("NA18620", "chi28 NA18620 0 0 1 0"); hapMapTranslate.put("NA18976", "jap24 NA18976 0 0 2 0"); hapMapTranslate.put("NA18967", "jap25 NA18967 0 0 1 0"); hapMapTranslate.put("NA18978", "jap26 NA18978 0 0 2 0"); hapMapTranslate.put("NA18970", "jap27 NA18970 0 0 1 0"); hapMapTranslate.put("NA18980", "jap28 NA18980 0 0 2 0"); hapMapTranslate.put("NA18995", "jap29 NA18995 0 0 1 0"); hapMapTranslate.put("NA18621", "chi29 NA18621 0 0 1 0"); hapMapTranslate.put("NA18594", "chi30 NA18594 0 0 2 0"); hapMapTranslate.put("NA18622", "chi31 NA18622 0 0 1 0"); hapMapTranslate.put("NA18573", "chi32 NA18573 0 0 2 0"); hapMapTranslate.put("NA18623", "chi33 NA18623 0 0 1 0"); hapMapTranslate.put("NA18576", "chi34 NA18576 0 0 2 0"); hapMapTranslate.put("NA18971", "jap30 NA18971 0 0 1 0"); hapMapTranslate.put("NA18981", "jap31 NA18981 0 0 2 0"); hapMapTranslate.put("NA18974", "jap32 NA18974 0 0 1 0"); hapMapTranslate.put("NA18987", "jap33 NA18987 0 0 2 0"); hapMapTranslate.put("NA18990", "jap34 NA18990 0 0 1 0"); hapMapTranslate.put("NA18991", "jap35 NA18991 0 0 2 0"); hapMapTranslate.put("NA18577", "chi35 NA18577 0 0 2 0"); hapMapTranslate.put("NA18624", "chi36 NA18624 0 0 1 0"); hapMapTranslate.put("NA18579", "chi37 NA18579 0 0 2 0"); hapMapTranslate.put("NA18632", "chi38 NA18632 0 0 1 0"); hapMapTranslate.put("NA18582", "chi39 NA18582 0 0 2 0"); hapMapTranslate.put("NA18633", "chi40 NA18633 0 0 1 0"); hapMapTranslate.put("NA18994", "jap36 NA18994 0 0 1 0"); hapMapTranslate.put("NA18992", "jap37 NA18992 0 0 2 0"); hapMapTranslate.put("NA18997", "jap38 NA18997 0 0 2 0"); hapMapTranslate.put("NA18996", "jap39 NA18996 0 0 1 0"); hapMapTranslate.put("NA18635", "chi41 NA18635 0 0 1 0"); hapMapTranslate.put("NA18592", "chi42 NA18592 0 0 2 0"); hapMapTranslate.put("NA18636", "chi43 NA18636 0 0 1 0"); hapMapTranslate.put("NA18593", "chi44 NA18593 0 0 2 0"); hapMapTranslate.put("NA18637", "chi45 NA18637 0 0 1 0"); hapMapTranslate.put("NA19000", "jap40 NA19000 0 0 1 0"); hapMapTranslate.put("NA18998", "jap41 NA18998 0 0 2 0"); hapMapTranslate.put("NA19005", "jap42 NA19005 0 0 1 0"); hapMapTranslate.put("NA18999", "jap43 NA18999 0 0 2 0"); hapMapTranslate.put("NA19007", "jap44 NA19007 0 0 1 0"); hapMapTranslate.put("NA19003", "jap45 NA19003 0 0 2 0"); hapMapTranslate.put("NA18500", "Yoruba004 NA18500 NA18501 NA18502 1 0"); hapMapTranslate.put("NA18501", "Yoruba004 NA18501 0 0 1 0"); hapMapTranslate.put("NA18502", "Yoruba004 NA18502 0 0 2 0"); hapMapTranslate.put("NA18503", "Yoruba005 NA18503 NA18504 NA18505 1 0"); hapMapTranslate.put("NA18504", "Yoruba005 NA18504 0 0 1 0"); hapMapTranslate.put("NA18505", "Yoruba005 NA18505 0 0 2 0"); hapMapTranslate.put("NA18506", "Yoruba009 NA18506 NA18507 NA18508 1 0"); hapMapTranslate.put("NA18507", "Yoruba009 NA18507 0 0 1 0"); hapMapTranslate.put("NA18508", "Yoruba009 NA18508 0 0 2 0"); hapMapTranslate.put("NA18860", "Yoruba012 NA18860 NA18859 NA18858 1 0"); hapMapTranslate.put("NA18859", "Yoruba012 NA18859 0 0 1 0"); hapMapTranslate.put("NA18858", "Yoruba012 NA18858 0 0 2 0"); hapMapTranslate.put("NA18515", "Yoruba013 NA18515 NA18516 NA18517 1 0"); hapMapTranslate.put("NA18516", "Yoruba013 NA18516 0 0 1 0"); hapMapTranslate.put("NA18517", "Yoruba013 NA18517 0 0 2 0"); hapMapTranslate.put("NA18521", "Yoruba016 NA18521 NA18522 NA18523 1 0"); hapMapTranslate.put("NA18522", "Yoruba016 NA18522 0 0 1 0"); hapMapTranslate.put("NA18523", "Yoruba016 NA18523 0 0 2 0"); hapMapTranslate.put("NA18872", "Yoruba017 NA18872 NA18871 NA18870 1 0"); hapMapTranslate.put("NA18871", "Yoruba017 NA18871 0 0 1 0"); hapMapTranslate.put("NA18870", "Yoruba017 NA18870 0 0 2 0"); hapMapTranslate.put("NA18854", "Yoruba018 NA18854 NA18853 NA18852 1 0"); hapMapTranslate.put("NA18853", "Yoruba018 NA18853 0 0 1 0"); hapMapTranslate.put("NA18852", "Yoruba018 NA18852 0 0 2 0"); hapMapTranslate.put("NA18857", "Yoruba023 NA18857 NA18856 NA18855 1 0"); hapMapTranslate.put("NA18856", "Yoruba023 NA18856 0 0 1 0"); hapMapTranslate.put("NA18855", "Yoruba023 NA18855 0 0 2 0"); hapMapTranslate.put("NA18863", "Yoruba024 NA18863 NA18862 NA18861 1 0"); hapMapTranslate.put("NA18862", "Yoruba024 NA18862 0 0 1 0"); hapMapTranslate.put("NA18861", "Yoruba024 NA18861 0 0 2 0"); hapMapTranslate.put("NA18914", "Yoruba028 NA18914 NA18913 NA18912 1 0"); hapMapTranslate.put("NA18913", "Yoruba028 NA18913 0 0 1 0"); hapMapTranslate.put("NA18912", "Yoruba028 NA18912 0 0 2 0"); hapMapTranslate.put("NA19094", "Yoruba040 NA19094 NA19092 NA19093 2 0"); hapMapTranslate.put("NA19092", "Yoruba040 NA19092 0 0 1 0"); hapMapTranslate.put("NA19093", "Yoruba040 NA19093 0 0 2 0"); hapMapTranslate.put("NA19103", "Yoruba042 NA19103 NA19101 NA19102 1 0"); hapMapTranslate.put("NA19101", "Yoruba042 NA19101 0 0 1 0"); hapMapTranslate.put("NA19102", "Yoruba042 NA19102 0 0 2 0"); hapMapTranslate.put("NA19139", "Yoruba043 NA19139 NA19138 NA19137 1 0"); hapMapTranslate.put("NA19138", "Yoruba043 NA19138 0 0 1 0"); hapMapTranslate.put("NA19137", "Yoruba043 NA19137 0 0 2 0"); hapMapTranslate.put("NA19202", "Yoruba045 NA19202 NA19200 NA19201 2 0"); hapMapTranslate.put("NA19200", "Yoruba045 NA19200 0 0 1 0"); hapMapTranslate.put("NA19201", "Yoruba045 NA19201 0 0 2 0"); hapMapTranslate.put("NA19173", "Yoruba047 NA19173 NA19171 NA19172 1 0"); hapMapTranslate.put("NA19171", "Yoruba047 NA19171 0 0 1 0"); hapMapTranslate.put("NA19172", "Yoruba047 NA19172 0 0 2 0"); hapMapTranslate.put("NA19205", "Yoruba048 NA19205 NA19203 NA19204 1 0"); hapMapTranslate.put("NA19203", "Yoruba048 NA19203 0 0 1 0"); hapMapTranslate.put("NA19204", "Yoruba048 NA19204 0 0 2 0"); hapMapTranslate.put("NA19211", "Yoruba050 NA19211 NA19210 NA19209 1 0"); hapMapTranslate.put("NA19210", "Yoruba050 NA19210 0 0 1 0"); hapMapTranslate.put("NA19209", "Yoruba050 NA19209 0 0 2 0"); hapMapTranslate.put("NA19208", "Yoruba051 NA19208 NA19207 NA19206 1 0"); hapMapTranslate.put("NA19207", "Yoruba051 NA19207 0 0 1 0"); hapMapTranslate.put("NA19206", "Yoruba051 NA19206 0 0 2 0"); hapMapTranslate.put("NA19161", "Yoruba056 NA19161 NA19160 NA19159 1 0"); hapMapTranslate.put("NA19160", "Yoruba056 NA19160 0 0 1 0"); hapMapTranslate.put("NA19159", "Yoruba056 NA19159 0 0 2 0"); hapMapTranslate.put("NA19221", "Yoruba058 NA19221 NA19223 NA19222 2 0"); hapMapTranslate.put("NA19223", "Yoruba058 NA19223 0 0 1 0"); hapMapTranslate.put("NA19222", "Yoruba058 NA19222 0 0 2 0"); hapMapTranslate.put("NA19120", "Yoruba060 NA19120 NA19119 NA19116 1 0"); hapMapTranslate.put("NA19119", "Yoruba060 NA19119 0 0 1 0"); hapMapTranslate.put("NA19116", "Yoruba060 NA19116 0 0 2 0"); hapMapTranslate.put("NA19142", "Yoruba071 NA19142 NA19141 NA19140 1 0"); hapMapTranslate.put("NA19141", "Yoruba071 NA19141 0 0 1 0"); hapMapTranslate.put("NA19140", "Yoruba071 NA19140 0 0 2 0"); hapMapTranslate.put("NA19154", "Yoruba072 NA19154 NA19153 NA19152 1 0"); hapMapTranslate.put("NA19153", "Yoruba072 NA19153 0 0 1 0"); hapMapTranslate.put("NA19152", "Yoruba072 NA19152 0 0 2 0"); hapMapTranslate.put("NA19145", "Yoruba074 NA19145 NA19144 NA19143 1 0"); hapMapTranslate.put("NA19144", "Yoruba074 NA19144 0 0 1 0"); hapMapTranslate.put("NA19143", "Yoruba074 NA19143 0 0 2 0"); hapMapTranslate.put("NA19129", "Yoruba077 NA19129 NA19128 NA19127 2 0"); hapMapTranslate.put("NA19128", "Yoruba077 NA19128 0 0 1 0"); hapMapTranslate.put("NA19127", "Yoruba077 NA19127 0 0 2 0"); hapMapTranslate.put("NA19132", "Yoruba101 NA19132 NA19130 NA19131 2 0"); hapMapTranslate.put("NA19130", "Yoruba101 NA19130 0 0 1 0"); hapMapTranslate.put("NA19131", "Yoruba101 NA19131 0 0 2 0"); hapMapTranslate.put("NA19100", "Yoruba105 NA19100 NA19098 NA19099 2 0"); hapMapTranslate.put("NA19098", "Yoruba105 NA19098 0 0 1 0"); hapMapTranslate.put("NA19099", "Yoruba105 NA19099 0 0 2 0"); hapMapTranslate.put("NA19194", "Yoruba112 NA19194 NA19192 NA19193 1 0"); hapMapTranslate.put("NA19192", "Yoruba112 NA19192 0 0 1 0"); hapMapTranslate.put("NA19193", "Yoruba112 NA19193 0 0 2 0"); hapMapTranslate.put("NA19240", "Yoruba117 NA19240 NA19239 NA19238 2 0"); hapMapTranslate.put("NA19239", "Yoruba117 NA19239 0 0 1 0"); hapMapTranslate.put("NA19238", "Yoruba117 NA19238 0 0 2 0"); } |
|
hapMapTranslate.put("NA12003.dup", "dup NA12003.dup 0 0 1 0"); | public PedFile(){ //hardcoded hapmap info this.families = new Hashtable(); hapMapTranslate = new Hashtable(90,1); hapMapTranslate.put("NA10846", "1334 NA10846 NA12144 NA12145 1 0" ); hapMapTranslate.put("NA12144", "1334 NA12144 0 0 1 0"); hapMapTranslate.put("NA12145", "1334 NA12145 0 0 2 0"); hapMapTranslate.put("NA10847", "1334 NA10847 NA12146 NA12239 2 0" ); hapMapTranslate.put("NA12146", "1334 NA12146 0 0 1 0"); hapMapTranslate.put("NA12239", "1334 NA12239 0 0 2 0"); hapMapTranslate.put("NA07029", "1340 NA07029 NA06994 NA07000 1 0" ); hapMapTranslate.put("NA06994", "1340 NA06994 0 0 1 0"); hapMapTranslate.put("NA07000", "1340 NA07000 0 0 2 0"); hapMapTranslate.put("NA07019", "1340 NA07019 NA07022 NA07056 2 0" ); hapMapTranslate.put("NA07022", "1340 NA07022 0 0 1 0"); hapMapTranslate.put("NA07056", "1340 NA07056 0 0 2 0"); hapMapTranslate.put("NA07048", "1341 NA07048 NA07034 NA07055 1 0" ); hapMapTranslate.put("NA07034", "1341 NA07034 0 0 1 0"); hapMapTranslate.put("NA07055", "1341 NA07055 0 0 2 0"); hapMapTranslate.put("NA06991", "1341 NA06991 NA06993 NA06985 2 0" ); hapMapTranslate.put("NA06993", "1341 NA06993 0 0 1 0"); hapMapTranslate.put("NA06993.dup", "dup NA06993.dup 0 0 1 0"); hapMapTranslate.put("NA06985", "1341 NA06985 0 0 2 0"); hapMapTranslate.put("NA10851", "1344 NA10851 NA12056 NA12057 1 0" ); hapMapTranslate.put("NA12056", "1344 NA12056 0 0 1 0"); hapMapTranslate.put("NA12057", "1344 NA12057 0 0 2 0"); hapMapTranslate.put("NA07348", "1345 NA07348 NA07357 NA07345 2 0" ); hapMapTranslate.put("NA07357", "1345 NA07357 0 0 1 0"); hapMapTranslate.put("NA07345", "1345 NA07345 0 0 2 0"); hapMapTranslate.put("NA10857", "1346 NA10857 NA12043 NA12044 1 0" ); hapMapTranslate.put("NA12043", "1346 NA12043 0 0 1 0"); hapMapTranslate.put("NA12044", "1346 NA12044 0 0 2 0"); hapMapTranslate.put("NA10859", "1347 NA10859 NA11881 NA11882 2 0" ); hapMapTranslate.put("NA11881", "1347 NA11881 0 0 1 0"); hapMapTranslate.put("NA11882", "1347 NA11882 0 0 2 0"); hapMapTranslate.put("NA10854", "1349 NA10854 NA11839 NA11840 2 0" ); hapMapTranslate.put("NA11839", "1349 NA11839 0 0 1 0"); hapMapTranslate.put("NA11840", "1349 NA11840 0 0 2 0"); hapMapTranslate.put("NA10856", "1350 NA10856 NA11829 NA11830 1 0" ); hapMapTranslate.put("NA11829", "1350 NA11829 0 0 1 0"); hapMapTranslate.put("NA11830", "1350 NA11830 0 0 2 0"); hapMapTranslate.put("NA10855", "1350 NA10855 NA11831 NA11832 2 0" ); hapMapTranslate.put("NA11831", "1350 NA11831 0 0 1 0"); hapMapTranslate.put("NA11832", "1350 NA11832 0 0 2 0"); hapMapTranslate.put("NA12707", "1358 NA12707 NA12716 NA12717 1 0" ); hapMapTranslate.put("NA12716", "1358 NA12716 0 0 1 0"); hapMapTranslate.put("NA12717", "1358 NA12717 0 0 2 0"); hapMapTranslate.put("NA10860", "1362 NA10860 NA11992 NA11993 1 0" ); hapMapTranslate.put("NA11992", "1362 NA11992 0 0 1 0"); hapMapTranslate.put("NA11993", "1362 NA11993 0 0 2 0"); hapMapTranslate.put("NA11993.dup", "dup NA11993.dup 0 0 2 0"); hapMapTranslate.put("NA10861", "1362 NA10861 NA11994 NA11995 2 0" ); hapMapTranslate.put("NA11994", "1362 NA11994 0 0 1 0"); hapMapTranslate.put("NA11995", "1362 NA11995 0 0 2 0"); hapMapTranslate.put("NA10863", "1375 NA10863 NA12264 NA12234 2 0" ); hapMapTranslate.put("NA12264", "1375 NA12264 0 0 1 0"); hapMapTranslate.put("NA12234", "1375 NA12234 0 0 2 0"); hapMapTranslate.put("NA10830", "1408 NA10830 NA12154 NA12236 1 0" ); hapMapTranslate.put("NA12154", "1408 NA12154 0 0 1 0"); hapMapTranslate.put("NA12236", "1408 NA12236 0 0 2 0"); hapMapTranslate.put("NA10831", "1408 NA10831 NA12155 NA12156 2 0" ); hapMapTranslate.put("NA12155", "1408 NA12155 0 0 1 0"); hapMapTranslate.put("NA12156", "1408 NA12156 0 0 2 0"); hapMapTranslate.put("NA12156.dup", "dup NA12156.dup 0 0 2 0"); hapMapTranslate.put("NA10835", "1416 NA10835 NA12248 NA12249 1 0" ); hapMapTranslate.put("NA12248", "1416 NA12248 0 0 1 0"); hapMapTranslate.put("NA12248.dup", "dup NA1248.dup 0 0 1 0"); hapMapTranslate.put("NA12249", "1416 NA12249 0 0 2 0"); hapMapTranslate.put("NA10838", "1420 NA10838 NA12003 NA12004 1 0" ); hapMapTranslate.put("NA12003", "1420 NA12003 0 0 1 0"); hapMapTranslate.put("NA12003.dup", "dup NA12003.dup 0 0 1 0"); hapMapTranslate.put("NA12004", "1420 NA12004 0 0 2 0"); hapMapTranslate.put("NA10839", "1420 NA10839 NA12005 NA12006 2 0" ); hapMapTranslate.put("NA12005", "1420 NA12005 0 0 1 0"); hapMapTranslate.put("NA12006", "1420 NA12006 0 0 2 0"); hapMapTranslate.put("NA12740", "1444 NA12740 NA12750 NA12751 2 0" ); hapMapTranslate.put("NA12750", "1444 NA12750 0 0 1 0"); hapMapTranslate.put("NA12751", "1444 NA12751 0 0 2 0"); hapMapTranslate.put("NA12752", "1447 NA12752 NA12760 NA12761 1 0" ); hapMapTranslate.put("NA12760", "1447 NA12760 0 0 1 0"); hapMapTranslate.put("NA12761", "1447 NA12761 0 0 2 0"); hapMapTranslate.put("NA12753", "1447 NA12753 NA12762 NA12763 2 0" ); hapMapTranslate.put("NA12762", "1447 NA12762 0 0 1 0"); hapMapTranslate.put("NA12763", "1447 NA12763 0 0 2 0"); hapMapTranslate.put("NA12801", "1454 NA12801 NA12812 NA12813 1 0" ); hapMapTranslate.put("NA12812", "1454 NA12812 0 0 1 0"); hapMapTranslate.put("NA12813", "1454 NA12813 0 0 2 0"); hapMapTranslate.put("NA12802", "1454 NA12802 NA12814 NA12815 2 0" ); hapMapTranslate.put("NA12814", "1454 NA12814 0 0 1 0"); hapMapTranslate.put("NA12815", "1454 NA12815 0 0 2 0"); hapMapTranslate.put("NA12864", "1459 NA12864 NA12872 NA12873 1 0" ); hapMapTranslate.put("NA12872", "1459 NA12872 0 0 1 0"); hapMapTranslate.put("NA12873", "1459 NA12873 0 0 2 0"); hapMapTranslate.put("NA12865", "1459 NA12865 NA12874 NA12875 2 0" ); hapMapTranslate.put("NA12874", "1459 NA12874 0 0 1 0"); hapMapTranslate.put("NA12875", "1459 NA12875 0 0 2 0"); hapMapTranslate.put("NA12878", "1463 NA12878 NA12891 NA12892 2 0" ); hapMapTranslate.put("NA12891", "1463 NA12891 0 0 1 0"); hapMapTranslate.put("NA12892", "1463 NA12892 0 0 2 0"); hapMapTranslate.put("NA18526", "chi1 NA18526 0 0 2 0"); hapMapTranslate.put("NA18524", "chi2 NA18524 0 0 1 0"); hapMapTranslate.put("NA18529", "chi3 NA18529 0 0 2 0"); hapMapTranslate.put("NA18558", "chi4 NA18558 0 0 1 0"); hapMapTranslate.put("NA18532", "chi5 NA18532 0 0 2 0"); hapMapTranslate.put("NA18561", "chi6 NA18561 0 0 1 0"); hapMapTranslate.put("NA18942", "jap1 NA18942 0 0 2 0"); hapMapTranslate.put("NA18940", "jap2 NA18940 0 0 1 0"); hapMapTranslate.put("NA18951", "jap3 NA18951 0 0 2 0"); hapMapTranslate.put("NA18943", "jap4 NA18943 0 0 1 0"); hapMapTranslate.put("NA18947", "jap5 NA18947 0 0 2 0"); hapMapTranslate.put("NA18944", "jap6 NA18944 0 0 1 0"); hapMapTranslate.put("NA18562", "chi7 NA18562 0 0 1 0"); hapMapTranslate.put("NA18537", "chi8 NA18537 0 0 2 0"); hapMapTranslate.put("NA18603", "chi9 NA18603 0 0 1 0"); hapMapTranslate.put("NA18540", "chi10 NA18540 0 0 2 0"); hapMapTranslate.put("NA18605", "chi11 NA18605 0 0 1 0"); hapMapTranslate.put("NA18542", "chi12 NA18542 0 0 2 0"); hapMapTranslate.put("NA18945", "jap7 NA18945 0 0 1 0"); hapMapTranslate.put("NA18949", "jap8 NA18949 0 0 2 0"); hapMapTranslate.put("NA18948", "jap9 NA18948 0 0 1 0"); hapMapTranslate.put("NA18952", "jap10 NA18952 0 0 1 0"); hapMapTranslate.put("NA18956", "jap11 NA18956 0 0 2 0"); hapMapTranslate.put("NA18545", "chi13 NA18545 0 0 2 0"); hapMapTranslate.put("NA18572", "chi46 NA18572 0 0 1 0"); hapMapTranslate.put("NA18547", "chi15 NA18547 0 0 2 0"); hapMapTranslate.put("NA18609", "chi16 NA18609 0 0 1 0"); hapMapTranslate.put("NA18550", "chi17 NA18550 0 0 2 0"); hapMapTranslate.put("NA18608", "chi18 NA18608 0 0 1 0"); hapMapTranslate.put("NA18964", "jap12 NA18964 0 0 2 0"); hapMapTranslate.put("NA18953", "jap13 NA18953 0 0 1 0"); hapMapTranslate.put("NA18968", "jap14 NA18968 0 0 2 0"); hapMapTranslate.put("NA18959", "jap15 NA18959 0 0 1 0"); hapMapTranslate.put("NA18969", "jap16 NA18969 0 0 2 0"); hapMapTranslate.put("NA18960", "jap17 NA18960 0 0 1 0"); hapMapTranslate.put("NA18552", "chi19 NA18552 0 0 2 0"); hapMapTranslate.put("NA18611", "chi20 NA18611 0 0 1 0"); hapMapTranslate.put("NA18555", "chi21 NA18555 0 0 2 0"); hapMapTranslate.put("NA18564", "chi22 NA18564 0 0 2 0"); hapMapTranslate.put("NA18961", "jap18 NA18961 0 0 1 0"); hapMapTranslate.put("NA18972", "jap19 NA18972 0 0 2 0"); hapMapTranslate.put("NA18965", "jap20 NA18965 0 0 1 0"); hapMapTranslate.put("NA18973", "jap21 NA18973 0 0 2 0"); hapMapTranslate.put("NA18966", "jap22 NA18966 0 0 1 0"); hapMapTranslate.put("NA18975", "jap23 NA18975 0 0 2 0"); hapMapTranslate.put("NA18566", "chi23 NA18566 0 0 2 0"); hapMapTranslate.put("NA18563", "chi24 NA18563 0 0 1 0"); hapMapTranslate.put("NA18570", "chi25 NA18570 0 0 2 0"); hapMapTranslate.put("NA18612", "chi26 NA18612 0 0 1 0"); hapMapTranslate.put("NA18571", "chi27 NA18571 0 0 2 0"); hapMapTranslate.put("NA18620", "chi28 NA18620 0 0 1 0"); hapMapTranslate.put("NA18976", "jap24 NA18976 0 0 2 0"); hapMapTranslate.put("NA18967", "jap25 NA18967 0 0 1 0"); hapMapTranslate.put("NA18978", "jap26 NA18978 0 0 2 0"); hapMapTranslate.put("NA18970", "jap27 NA18970 0 0 1 0"); hapMapTranslate.put("NA18980", "jap28 NA18980 0 0 2 0"); hapMapTranslate.put("NA18995", "jap29 NA18995 0 0 1 0"); hapMapTranslate.put("NA18621", "chi29 NA18621 0 0 1 0"); hapMapTranslate.put("NA18594", "chi30 NA18594 0 0 2 0"); hapMapTranslate.put("NA18622", "chi31 NA18622 0 0 1 0"); hapMapTranslate.put("NA18573", "chi32 NA18573 0 0 2 0"); hapMapTranslate.put("NA18623", "chi33 NA18623 0 0 1 0"); hapMapTranslate.put("NA18576", "chi34 NA18576 0 0 2 0"); hapMapTranslate.put("NA18971", "jap30 NA18971 0 0 1 0"); hapMapTranslate.put("NA18981", "jap31 NA18981 0 0 2 0"); hapMapTranslate.put("NA18974", "jap32 NA18974 0 0 1 0"); hapMapTranslate.put("NA18987", "jap33 NA18987 0 0 2 0"); hapMapTranslate.put("NA18990", "jap34 NA18990 0 0 1 0"); hapMapTranslate.put("NA18991", "jap35 NA18991 0 0 2 0"); hapMapTranslate.put("NA18577", "chi35 NA18577 0 0 2 0"); hapMapTranslate.put("NA18624", "chi36 NA18624 0 0 1 0"); hapMapTranslate.put("NA18579", "chi37 NA18579 0 0 2 0"); hapMapTranslate.put("NA18632", "chi38 NA18632 0 0 1 0"); hapMapTranslate.put("NA18582", "chi39 NA18582 0 0 2 0"); hapMapTranslate.put("NA18633", "chi40 NA18633 0 0 1 0"); hapMapTranslate.put("NA18994", "jap36 NA18994 0 0 1 0"); hapMapTranslate.put("NA18992", "jap37 NA18992 0 0 2 0"); hapMapTranslate.put("NA18997", "jap38 NA18997 0 0 2 0"); hapMapTranslate.put("NA18996", "jap39 NA18996 0 0 1 0"); hapMapTranslate.put("NA18635", "chi41 NA18635 0 0 1 0"); hapMapTranslate.put("NA18592", "chi42 NA18592 0 0 2 0"); hapMapTranslate.put("NA18636", "chi43 NA18636 0 0 1 0"); hapMapTranslate.put("NA18593", "chi44 NA18593 0 0 2 0"); hapMapTranslate.put("NA18637", "chi45 NA18637 0 0 1 0"); hapMapTranslate.put("NA19000", "jap40 NA19000 0 0 1 0"); hapMapTranslate.put("NA18998", "jap41 NA18998 0 0 2 0"); hapMapTranslate.put("NA19005", "jap42 NA19005 0 0 1 0"); hapMapTranslate.put("NA18999", "jap43 NA18999 0 0 2 0"); hapMapTranslate.put("NA19007", "jap44 NA19007 0 0 1 0"); hapMapTranslate.put("NA19003", "jap45 NA19003 0 0 2 0"); hapMapTranslate.put("NA18500", "Yoruba004 NA18500 NA18501 NA18502 1 0"); hapMapTranslate.put("NA18501", "Yoruba004 NA18501 0 0 1 0"); hapMapTranslate.put("NA18502", "Yoruba004 NA18502 0 0 2 0"); hapMapTranslate.put("NA18503", "Yoruba005 NA18503 NA18504 NA18505 1 0"); hapMapTranslate.put("NA18504", "Yoruba005 NA18504 0 0 1 0"); hapMapTranslate.put("NA18505", "Yoruba005 NA18505 0 0 2 0"); hapMapTranslate.put("NA18506", "Yoruba009 NA18506 NA18507 NA18508 1 0"); hapMapTranslate.put("NA18507", "Yoruba009 NA18507 0 0 1 0"); hapMapTranslate.put("NA18508", "Yoruba009 NA18508 0 0 2 0"); hapMapTranslate.put("NA18860", "Yoruba012 NA18860 NA18859 NA18858 1 0"); hapMapTranslate.put("NA18859", "Yoruba012 NA18859 0 0 1 0"); hapMapTranslate.put("NA18858", "Yoruba012 NA18858 0 0 2 0"); hapMapTranslate.put("NA18515", "Yoruba013 NA18515 NA18516 NA18517 1 0"); hapMapTranslate.put("NA18516", "Yoruba013 NA18516 0 0 1 0"); hapMapTranslate.put("NA18517", "Yoruba013 NA18517 0 0 2 0"); hapMapTranslate.put("NA18521", "Yoruba016 NA18521 NA18522 NA18523 1 0"); hapMapTranslate.put("NA18522", "Yoruba016 NA18522 0 0 1 0"); hapMapTranslate.put("NA18523", "Yoruba016 NA18523 0 0 2 0"); hapMapTranslate.put("NA18872", "Yoruba017 NA18872 NA18871 NA18870 1 0"); hapMapTranslate.put("NA18871", "Yoruba017 NA18871 0 0 1 0"); hapMapTranslate.put("NA18870", "Yoruba017 NA18870 0 0 2 0"); hapMapTranslate.put("NA18854", "Yoruba018 NA18854 NA18853 NA18852 1 0"); hapMapTranslate.put("NA18853", "Yoruba018 NA18853 0 0 1 0"); hapMapTranslate.put("NA18852", "Yoruba018 NA18852 0 0 2 0"); hapMapTranslate.put("NA18857", "Yoruba023 NA18857 NA18856 NA18855 1 0"); hapMapTranslate.put("NA18856", "Yoruba023 NA18856 0 0 1 0"); hapMapTranslate.put("NA18855", "Yoruba023 NA18855 0 0 2 0"); hapMapTranslate.put("NA18863", "Yoruba024 NA18863 NA18862 NA18861 1 0"); hapMapTranslate.put("NA18862", "Yoruba024 NA18862 0 0 1 0"); hapMapTranslate.put("NA18861", "Yoruba024 NA18861 0 0 2 0"); hapMapTranslate.put("NA18914", "Yoruba028 NA18914 NA18913 NA18912 1 0"); hapMapTranslate.put("NA18913", "Yoruba028 NA18913 0 0 1 0"); hapMapTranslate.put("NA18912", "Yoruba028 NA18912 0 0 2 0"); hapMapTranslate.put("NA19094", "Yoruba040 NA19094 NA19092 NA19093 2 0"); hapMapTranslate.put("NA19092", "Yoruba040 NA19092 0 0 1 0"); hapMapTranslate.put("NA19093", "Yoruba040 NA19093 0 0 2 0"); hapMapTranslate.put("NA19103", "Yoruba042 NA19103 NA19101 NA19102 1 0"); hapMapTranslate.put("NA19101", "Yoruba042 NA19101 0 0 1 0"); hapMapTranslate.put("NA19102", "Yoruba042 NA19102 0 0 2 0"); hapMapTranslate.put("NA19139", "Yoruba043 NA19139 NA19138 NA19137 1 0"); hapMapTranslate.put("NA19138", "Yoruba043 NA19138 0 0 1 0"); hapMapTranslate.put("NA19137", "Yoruba043 NA19137 0 0 2 0"); hapMapTranslate.put("NA19202", "Yoruba045 NA19202 NA19200 NA19201 2 0"); hapMapTranslate.put("NA19200", "Yoruba045 NA19200 0 0 1 0"); hapMapTranslate.put("NA19201", "Yoruba045 NA19201 0 0 2 0"); hapMapTranslate.put("NA19173", "Yoruba047 NA19173 NA19171 NA19172 1 0"); hapMapTranslate.put("NA19171", "Yoruba047 NA19171 0 0 1 0"); hapMapTranslate.put("NA19172", "Yoruba047 NA19172 0 0 2 0"); hapMapTranslate.put("NA19205", "Yoruba048 NA19205 NA19203 NA19204 1 0"); hapMapTranslate.put("NA19203", "Yoruba048 NA19203 0 0 1 0"); hapMapTranslate.put("NA19204", "Yoruba048 NA19204 0 0 2 0"); hapMapTranslate.put("NA19211", "Yoruba050 NA19211 NA19210 NA19209 1 0"); hapMapTranslate.put("NA19210", "Yoruba050 NA19210 0 0 1 0"); hapMapTranslate.put("NA19209", "Yoruba050 NA19209 0 0 2 0"); hapMapTranslate.put("NA19208", "Yoruba051 NA19208 NA19207 NA19206 1 0"); hapMapTranslate.put("NA19207", "Yoruba051 NA19207 0 0 1 0"); hapMapTranslate.put("NA19206", "Yoruba051 NA19206 0 0 2 0"); hapMapTranslate.put("NA19161", "Yoruba056 NA19161 NA19160 NA19159 1 0"); hapMapTranslate.put("NA19160", "Yoruba056 NA19160 0 0 1 0"); hapMapTranslate.put("NA19159", "Yoruba056 NA19159 0 0 2 0"); hapMapTranslate.put("NA19221", "Yoruba058 NA19221 NA19223 NA19222 2 0"); hapMapTranslate.put("NA19223", "Yoruba058 NA19223 0 0 1 0"); hapMapTranslate.put("NA19222", "Yoruba058 NA19222 0 0 2 0"); hapMapTranslate.put("NA19120", "Yoruba060 NA19120 NA19119 NA19116 1 0"); hapMapTranslate.put("NA19119", "Yoruba060 NA19119 0 0 1 0"); hapMapTranslate.put("NA19116", "Yoruba060 NA19116 0 0 2 0"); hapMapTranslate.put("NA19142", "Yoruba071 NA19142 NA19141 NA19140 1 0"); hapMapTranslate.put("NA19141", "Yoruba071 NA19141 0 0 1 0"); hapMapTranslate.put("NA19140", "Yoruba071 NA19140 0 0 2 0"); hapMapTranslate.put("NA19154", "Yoruba072 NA19154 NA19153 NA19152 1 0"); hapMapTranslate.put("NA19153", "Yoruba072 NA19153 0 0 1 0"); hapMapTranslate.put("NA19152", "Yoruba072 NA19152 0 0 2 0"); hapMapTranslate.put("NA19145", "Yoruba074 NA19145 NA19144 NA19143 1 0"); hapMapTranslate.put("NA19144", "Yoruba074 NA19144 0 0 1 0"); hapMapTranslate.put("NA19143", "Yoruba074 NA19143 0 0 2 0"); hapMapTranslate.put("NA19129", "Yoruba077 NA19129 NA19128 NA19127 2 0"); hapMapTranslate.put("NA19128", "Yoruba077 NA19128 0 0 1 0"); hapMapTranslate.put("NA19127", "Yoruba077 NA19127 0 0 2 0"); hapMapTranslate.put("NA19132", "Yoruba101 NA19132 NA19130 NA19131 2 0"); hapMapTranslate.put("NA19130", "Yoruba101 NA19130 0 0 1 0"); hapMapTranslate.put("NA19131", "Yoruba101 NA19131 0 0 2 0"); hapMapTranslate.put("NA19100", "Yoruba105 NA19100 NA19098 NA19099 2 0"); hapMapTranslate.put("NA19098", "Yoruba105 NA19098 0 0 1 0"); hapMapTranslate.put("NA19099", "Yoruba105 NA19099 0 0 2 0"); hapMapTranslate.put("NA19194", "Yoruba112 NA19194 NA19192 NA19193 1 0"); hapMapTranslate.put("NA19192", "Yoruba112 NA19192 0 0 1 0"); hapMapTranslate.put("NA19193", "Yoruba112 NA19193 0 0 2 0"); hapMapTranslate.put("NA19240", "Yoruba117 NA19240 NA19239 NA19238 2 0"); hapMapTranslate.put("NA19239", "Yoruba117 NA19239 0 0 1 0"); hapMapTranslate.put("NA19238", "Yoruba117 NA19238 0 0 2 0"); } |
|
Vector namesIncludingDups = new Vector(); | public void parseHapMap(Vector rawLines) throws PedFileException { int colNum = -1; int numLines = rawLines.size(); Individual ind; this.order = new Vector(); //sort first Vector lines = new Vector(); Hashtable sortHelp = new Hashtable(numLines-1,1.0f); long[] pos = new long[numLines-1]; lines.add(rawLines.get(0)); for (int k = 1; k < numLines; k++){ StringTokenizer st = new StringTokenizer((String) rawLines.get(k)); //strip off 1st 3 cols st.nextToken();st.nextToken();st.nextToken(); pos[k-1] = new Long(st.nextToken()).longValue(); sortHelp.put(new Long(pos[k-1]),rawLines.get(k)); } Arrays.sort(pos); for (int i = 0; i < pos.length; i++){ lines.add(sortHelp.get(new Long(pos[i]))); } //enumerate indivs StringTokenizer st = new StringTokenizer((String)lines.get(0), "\n\t\" \""); int numMetaColumns = 0; boolean doneMeta = false; while(!doneMeta && st.hasMoreTokens()){ String thisfield = st.nextToken(); numMetaColumns++; //so currently the first person ID always starts with NA (Coriell ID) but //todo: will this be true with AA samples etc? if (thisfield.startsWith("NA")){ doneMeta = true; } } numMetaColumns--; st = new StringTokenizer((String)lines.get(0), "\n\t\" \""); for (int i = 0; i < numMetaColumns; i++){ st.nextToken(); } StringTokenizer dt; while (st.hasMoreTokens()){ ind = new Individual(numLines); String name = st.nextToken(); String details = (String)hapMapTranslate.get(name); if (details == null){ throw new PedFileException("Hapmap data format error: " + name); } dt = new StringTokenizer(details, "\n\t\" \""); ind.setFamilyID(dt.nextToken().trim()); ind.setIndividualID(dt.nextToken().trim()); ind.setDadID(dt.nextToken().trim()); ind.setMomID(dt.nextToken().trim()); try { ind.setGender(Integer.parseInt(dt.nextToken().trim())); ind.setAffectedStatus(Integer.parseInt(dt.nextToken().trim())); }catch(NumberFormatException nfe) { throw new PedFileException("File error: invalid gender or affected status for indiv " + name); } //check if the family exists already in the Hashtable Family fam = (Family)this.families.get(ind.getFamilyID()); if(fam == null){ //it doesnt exist, so create a new Family object fam = new Family(ind.getFamilyID()); } fam.addMember(ind); this.families.put(ind.getFamilyID(),fam); String[] indFamID = new String[2]; indFamID[0] = ind.getFamilyID(); indFamID[1] = ind.getIndividualID(); this.order.add(ind); } //start at k=1 to skip header which we just processed above. hminfo = new String[numLines-1][]; for(int k=1;k<numLines;k++){ StringTokenizer tokenizer = new StringTokenizer((String)lines.get(k)); //reading the first line if(colNum < 0){ //only check column number count for the first line colNum = tokenizer.countTokens(); } if(colNum != tokenizer.countTokens()) { //this line has a different number of columns //should send some sort of error message //TODO: add something which stores number of markers for all lines and checks that they're consistent throw new PedFileException("Line number mismatch in input file. line " + (k+1)); } if(tokenizer.hasMoreTokens()){ hminfo[k-1] = new String[2]; for (int skip = 0; skip < numMetaColumns; skip++){ //meta-data crap String s = tokenizer.nextToken().trim(); //get marker name, chrom and pos if (skip == 0){ hminfo[k-1][0] = s; } if (skip == 2){ if (Chromosome.dataChrom != null){ if (!Chromosome.dataChrom.equals(s)){ throw new PedFileException("Hapmap file format error on line " + (k+1)+ ":\n There appear to be multiple chromosomes in the file."); } }else{ Chromosome.dataChrom = s; } } if (skip == 3){ hminfo[k-1][1] = s; } } int index = 0; while(tokenizer.hasMoreTokens()){ ind = (Individual)order.elementAt(index); String alleles = tokenizer.nextToken(); int allele1=0, allele2=0; if (alleles.substring(0,1).equals("A")){ allele1 = 1; }else if (alleles.substring(0,1).equals("C")){ allele1 = 2; }else if (alleles.substring(0,1).equals("G")){ allele1 = 3; }else if (alleles.substring(0,1).equals("T")){ allele1 = 4; } if (alleles.substring(1,2).equals("A")){ allele2 = 1; }else if (alleles.substring(1,2).equals("C")){ allele2 = 2; }else if (alleles.substring(1,2).equals("G")){ allele2 = 3; }else if (alleles.substring(1,2).equals("T")){ allele2 = 4; } byte[] markers = new byte[2]; markers[0] = (byte)allele1; markers[1]= (byte)allele2; ind.addMarker(markers); index++; } } } } |
|
String alleles = tokenizer.nextToken(); | public void parseHapMap(Vector rawLines) throws PedFileException { int colNum = -1; int numLines = rawLines.size(); Individual ind; this.order = new Vector(); //sort first Vector lines = new Vector(); Hashtable sortHelp = new Hashtable(numLines-1,1.0f); long[] pos = new long[numLines-1]; lines.add(rawLines.get(0)); for (int k = 1; k < numLines; k++){ StringTokenizer st = new StringTokenizer((String) rawLines.get(k)); //strip off 1st 3 cols st.nextToken();st.nextToken();st.nextToken(); pos[k-1] = new Long(st.nextToken()).longValue(); sortHelp.put(new Long(pos[k-1]),rawLines.get(k)); } Arrays.sort(pos); for (int i = 0; i < pos.length; i++){ lines.add(sortHelp.get(new Long(pos[i]))); } //enumerate indivs StringTokenizer st = new StringTokenizer((String)lines.get(0), "\n\t\" \""); int numMetaColumns = 0; boolean doneMeta = false; while(!doneMeta && st.hasMoreTokens()){ String thisfield = st.nextToken(); numMetaColumns++; //so currently the first person ID always starts with NA (Coriell ID) but //todo: will this be true with AA samples etc? if (thisfield.startsWith("NA")){ doneMeta = true; } } numMetaColumns--; st = new StringTokenizer((String)lines.get(0), "\n\t\" \""); for (int i = 0; i < numMetaColumns; i++){ st.nextToken(); } StringTokenizer dt; while (st.hasMoreTokens()){ ind = new Individual(numLines); String name = st.nextToken(); String details = (String)hapMapTranslate.get(name); if (details == null){ throw new PedFileException("Hapmap data format error: " + name); } dt = new StringTokenizer(details, "\n\t\" \""); ind.setFamilyID(dt.nextToken().trim()); ind.setIndividualID(dt.nextToken().trim()); ind.setDadID(dt.nextToken().trim()); ind.setMomID(dt.nextToken().trim()); try { ind.setGender(Integer.parseInt(dt.nextToken().trim())); ind.setAffectedStatus(Integer.parseInt(dt.nextToken().trim())); }catch(NumberFormatException nfe) { throw new PedFileException("File error: invalid gender or affected status for indiv " + name); } //check if the family exists already in the Hashtable Family fam = (Family)this.families.get(ind.getFamilyID()); if(fam == null){ //it doesnt exist, so create a new Family object fam = new Family(ind.getFamilyID()); } fam.addMember(ind); this.families.put(ind.getFamilyID(),fam); String[] indFamID = new String[2]; indFamID[0] = ind.getFamilyID(); indFamID[1] = ind.getIndividualID(); this.order.add(ind); } //start at k=1 to skip header which we just processed above. hminfo = new String[numLines-1][]; for(int k=1;k<numLines;k++){ StringTokenizer tokenizer = new StringTokenizer((String)lines.get(k)); //reading the first line if(colNum < 0){ //only check column number count for the first line colNum = tokenizer.countTokens(); } if(colNum != tokenizer.countTokens()) { //this line has a different number of columns //should send some sort of error message //TODO: add something which stores number of markers for all lines and checks that they're consistent throw new PedFileException("Line number mismatch in input file. line " + (k+1)); } if(tokenizer.hasMoreTokens()){ hminfo[k-1] = new String[2]; for (int skip = 0; skip < numMetaColumns; skip++){ //meta-data crap String s = tokenizer.nextToken().trim(); //get marker name, chrom and pos if (skip == 0){ hminfo[k-1][0] = s; } if (skip == 2){ if (Chromosome.dataChrom != null){ if (!Chromosome.dataChrom.equals(s)){ throw new PedFileException("Hapmap file format error on line " + (k+1)+ ":\n There appear to be multiple chromosomes in the file."); } }else{ Chromosome.dataChrom = s; } } if (skip == 3){ hminfo[k-1][1] = s; } } int index = 0; while(tokenizer.hasMoreTokens()){ ind = (Individual)order.elementAt(index); String alleles = tokenizer.nextToken(); int allele1=0, allele2=0; if (alleles.substring(0,1).equals("A")){ allele1 = 1; }else if (alleles.substring(0,1).equals("C")){ allele1 = 2; }else if (alleles.substring(0,1).equals("G")){ allele1 = 3; }else if (alleles.substring(0,1).equals("T")){ allele1 = 4; } if (alleles.substring(1,2).equals("A")){ allele2 = 1; }else if (alleles.substring(1,2).equals("C")){ allele2 = 2; }else if (alleles.substring(1,2).equals("G")){ allele2 = 3; }else if (alleles.substring(1,2).equals("T")){ allele2 = 4; } byte[] markers = new byte[2]; markers[0] = (byte)allele1; markers[1]= (byte)allele2; ind.addMarker(markers); index++; } } } } |
|
public AddObjectsTask(List sqlObjects, | public AddObjectsTask(List<SQLObject> sqlObjects, | public AddObjectsTask(List sqlObjects, Point preferredLocation, ProgressMonitor pm, JDialog parentDialog) { this.sqlObjects = sqlObjects; this.preferredLocation = preferredLocation; this.parentDialog = parentDialog; finished = false; new ProgressWatcher(pm, this); } |
Component c = ArchitectFrame.getMainInstance(); if (parentDialog != null) { c = parentDialog; } JOptionPane.showMessageDialog(c, errorMessage, "Error Dropping Tables into Playpen", JOptionPane.ERROR_MESSAGE); | JOptionPane.showMessageDialog(parentDialog, errorMessage, "Error Dropping Tables into Playpen", JOptionPane.ERROR_MESSAGE); | public void cleanup() { if (errorMessage != null) { Component c = ArchitectFrame.getMainInstance(); if (parentDialog != null) { c = parentDialog; } JOptionPane.showMessageDialog(c, errorMessage, "Error Dropping Tables into Playpen", JOptionPane.ERROR_MESSAGE); if (getNextProcess() != null) { setCancelled(true); } } } |
ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); try { Iterator<SQLObject> soIt = sqlObjects.iterator(); while (soIt.hasNext() && !isCancelled()) { SQLObject someData = soIt.next(); someData.fireDbStructureChanged(); if (someData instanceof SQLTable) { TablePane tp = importTableCopy((SQLTable) someData, preferredLocation); message = ArchitectUtils.truncateString(((SQLTable)someData).getName()); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } else if (someData instanceof SQLSchema) { SQLSchema sourceSchema = (SQLSchema) someData; Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } else if (someData instanceof SQLCatalog) { SQLCatalog sourceCatalog = (SQLCatalog) someData; Iterator cit = sourceCatalog.getChildren().iterator(); if (sourceCatalog.isSchemaContainer()) { while (cit.hasNext() && !isCancelled()) { SQLSchema sourceSchema = (SQLSchema) cit.next(); Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else { while (cit.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) cit.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else if (someData instanceof SQLColumn) { SQLColumn column = (SQLColumn) someData; JLabel colName = new JLabel(column.getName()); colName.setSize(colName.getPreferredSize()); add(colName, preferredLocation); logger.debug("Added "+column.getName()+" to playpen (temporary, only for testing)"); colName.revalidate(); } else { logger.error("Unknown object dropped in PlayPen: "+someData); } } } catch (ArchitectException e) { ASUtils.showExceptionDialog(parentDialog, "Unexpected Exception During Import", e); } finally { finished = true; hasStarted = false; ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_END,"Ending multi-select")); } | public void cleanup() { if (errorMessage != null) { Component c = ArchitectFrame.getMainInstance(); if (parentDialog != null) { c = parentDialog; } JOptionPane.showMessageDialog(c, errorMessage, "Error Dropping Tables into Playpen", JOptionPane.ERROR_MESSAGE); if (getNextProcess() != null) { setCancelled(true); } } } |
|
ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); if ( !isCancelled()){ | logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getName()); try { | public void doStuff () { ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); if ( !isCancelled()){ hasStarted = true; logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getName()); try { int pmMax = 0; Iterator soIt = sqlObjects.iterator(); // first pass: figure out how much work we need to do... while (soIt.hasNext()) { pmMax += ArchitectUtils.countTablesSnapshot((SQLObject)soIt.next()); } jobSize = new Integer(pmMax); // reset iterator soIt = sqlObjects.iterator(); while (soIt.hasNext() && !isCancelled()) { Object someData = soIt.next(); if (someData instanceof SQLTable) { TablePane tp = importTableCopy((SQLTable) someData, preferredLocation); message = ArchitectUtils.truncateString(((SQLTable)someData).getName()); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } else if (someData instanceof SQLSchema) { SQLSchema sourceSchema = (SQLSchema) someData; Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } else if (someData instanceof SQLCatalog) { SQLCatalog sourceCatalog = (SQLCatalog) someData; Iterator cit = sourceCatalog.getChildren().iterator(); if (sourceCatalog.isSchemaContainer()) { while (cit.hasNext() && !isCancelled()) { SQLSchema sourceSchema = (SQLSchema) cit.next(); Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else { while (cit.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) cit.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else if (someData instanceof SQLColumn) { SQLColumn column = (SQLColumn) someData; JLabel colName = new JLabel(column.getName()); colName.setSize(colName.getPreferredSize()); add(colName, preferredLocation); logger.debug("Added "+column.getName()+" to playpen (temporary, only for testing)"); colName.revalidate(); } else { logger.error("Unknown object dropped in PlayPen: "+someData); } } } catch (ArchitectException e) { e.printStackTrace(); } finally { finished = true; hasStarted = false; ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_END,"Ending multi-select")); } logger.info("AddObjectsTask done"); } } |
logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getName()); | int pmMax = 0; | public void doStuff () { ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); if ( !isCancelled()){ hasStarted = true; logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getName()); try { int pmMax = 0; Iterator soIt = sqlObjects.iterator(); // first pass: figure out how much work we need to do... while (soIt.hasNext()) { pmMax += ArchitectUtils.countTablesSnapshot((SQLObject)soIt.next()); } jobSize = new Integer(pmMax); // reset iterator soIt = sqlObjects.iterator(); while (soIt.hasNext() && !isCancelled()) { Object someData = soIt.next(); if (someData instanceof SQLTable) { TablePane tp = importTableCopy((SQLTable) someData, preferredLocation); message = ArchitectUtils.truncateString(((SQLTable)someData).getName()); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } else if (someData instanceof SQLSchema) { SQLSchema sourceSchema = (SQLSchema) someData; Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } else if (someData instanceof SQLCatalog) { SQLCatalog sourceCatalog = (SQLCatalog) someData; Iterator cit = sourceCatalog.getChildren().iterator(); if (sourceCatalog.isSchemaContainer()) { while (cit.hasNext() && !isCancelled()) { SQLSchema sourceSchema = (SQLSchema) cit.next(); Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else { while (cit.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) cit.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else if (someData instanceof SQLColumn) { SQLColumn column = (SQLColumn) someData; JLabel colName = new JLabel(column.getName()); colName.setSize(colName.getPreferredSize()); add(colName, preferredLocation); logger.debug("Added "+column.getName()+" to playpen (temporary, only for testing)"); colName.revalidate(); } else { logger.error("Unknown object dropped in PlayPen: "+someData); } } } catch (ArchitectException e) { e.printStackTrace(); } finally { finished = true; hasStarted = false; ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_END,"Ending multi-select")); } logger.info("AddObjectsTask done"); } } |
try { int pmMax = 0; Iterator soIt = sqlObjects.iterator(); while (soIt.hasNext()) { pmMax += ArchitectUtils.countTablesSnapshot((SQLObject)soIt.next()); } jobSize = new Integer(pmMax); soIt = sqlObjects.iterator(); while (soIt.hasNext() && !isCancelled()) { Object someData = soIt.next(); if (someData instanceof SQLTable) { TablePane tp = importTableCopy((SQLTable) someData, preferredLocation); message = ArchitectUtils.truncateString(((SQLTable)someData).getName()); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } else if (someData instanceof SQLSchema) { SQLSchema sourceSchema = (SQLSchema) someData; Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } else if (someData instanceof SQLCatalog) { SQLCatalog sourceCatalog = (SQLCatalog) someData; Iterator cit = sourceCatalog.getChildren().iterator(); if (sourceCatalog.isSchemaContainer()) { while (cit.hasNext() && !isCancelled()) { SQLSchema sourceSchema = (SQLSchema) cit.next(); Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else { while (cit.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) cit.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else if (someData instanceof SQLColumn) { SQLColumn column = (SQLColumn) someData; JLabel colName = new JLabel(column.getName()); colName.setSize(colName.getPreferredSize()); add(colName, preferredLocation); logger.debug("Added "+column.getName()+" to playpen (temporary, only for testing)"); colName.revalidate(); } else { logger.error("Unknown object dropped in PlayPen: "+someData); } } } catch (ArchitectException e) { e.printStackTrace(); } finally { finished = true; hasStarted = false; ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_END,"Ending multi-select")); } logger.info("AddObjectsTask done"); | Iterator<SQLObject> soIt = sqlObjects.iterator(); while (soIt.hasNext() && !isCancelled()) { pmMax += ArchitectUtils.countTablesSnapshot(soIt.next()); } jobSize = new Integer(pmMax); ensurePopulated(sqlObjects); } catch (ArchitectException e) { logger.error("Unexpected exception during populate", e); errorMessage = "Unexpected exception during populate: " + e.getMessage(); | public void doStuff () { ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); if ( !isCancelled()){ hasStarted = true; logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getName()); try { int pmMax = 0; Iterator soIt = sqlObjects.iterator(); // first pass: figure out how much work we need to do... while (soIt.hasNext()) { pmMax += ArchitectUtils.countTablesSnapshot((SQLObject)soIt.next()); } jobSize = new Integer(pmMax); // reset iterator soIt = sqlObjects.iterator(); while (soIt.hasNext() && !isCancelled()) { Object someData = soIt.next(); if (someData instanceof SQLTable) { TablePane tp = importTableCopy((SQLTable) someData, preferredLocation); message = ArchitectUtils.truncateString(((SQLTable)someData).getName()); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } else if (someData instanceof SQLSchema) { SQLSchema sourceSchema = (SQLSchema) someData; Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } else if (someData instanceof SQLCatalog) { SQLCatalog sourceCatalog = (SQLCatalog) someData; Iterator cit = sourceCatalog.getChildren().iterator(); if (sourceCatalog.isSchemaContainer()) { while (cit.hasNext() && !isCancelled()) { SQLSchema sourceSchema = (SQLSchema) cit.next(); Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else { while (cit.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) cit.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else if (someData instanceof SQLColumn) { SQLColumn column = (SQLColumn) someData; JLabel colName = new JLabel(column.getName()); colName.setSize(colName.getPreferredSize()); add(colName, preferredLocation); logger.debug("Added "+column.getName()+" to playpen (temporary, only for testing)"); colName.revalidate(); } else { logger.error("Unknown object dropped in PlayPen: "+someData); } } } catch (ArchitectException e) { e.printStackTrace(); } finally { finished = true; hasStarted = false; ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_END,"Ending multi-select")); } logger.info("AddObjectsTask done"); } } |
logger.info("AddObjectsTask done"); | public void doStuff () { ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_START,"Starting multi-select")); if ( !isCancelled()){ hasStarted = true; logger.info("AddObjectsTask starting on thread "+Thread.currentThread().getName()); try { int pmMax = 0; Iterator soIt = sqlObjects.iterator(); // first pass: figure out how much work we need to do... while (soIt.hasNext()) { pmMax += ArchitectUtils.countTablesSnapshot((SQLObject)soIt.next()); } jobSize = new Integer(pmMax); // reset iterator soIt = sqlObjects.iterator(); while (soIt.hasNext() && !isCancelled()) { Object someData = soIt.next(); if (someData instanceof SQLTable) { TablePane tp = importTableCopy((SQLTable) someData, preferredLocation); message = ArchitectUtils.truncateString(((SQLTable)someData).getName()); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } else if (someData instanceof SQLSchema) { SQLSchema sourceSchema = (SQLSchema) someData; Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } else if (someData instanceof SQLCatalog) { SQLCatalog sourceCatalog = (SQLCatalog) someData; Iterator cit = sourceCatalog.getChildren().iterator(); if (sourceCatalog.isSchemaContainer()) { while (cit.hasNext() && !isCancelled()) { SQLSchema sourceSchema = (SQLSchema) cit.next(); Iterator it = sourceSchema.getChildren().iterator(); while (it.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) it.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else { while (cit.hasNext() && !isCancelled()) { SQLTable sourceTable = (SQLTable) cit.next(); message = ArchitectUtils.truncateString(sourceTable.getName()); TablePane tp = importTableCopy(sourceTable, preferredLocation); preferredLocation.x += tp.getPreferredSize().width + 5; progress++; } } } else if (someData instanceof SQLColumn) { SQLColumn column = (SQLColumn) someData; JLabel colName = new JLabel(column.getName()); colName.setSize(colName.getPreferredSize()); add(colName, preferredLocation); logger.debug("Added "+column.getName()+" to playpen (temporary, only for testing)"); colName.revalidate(); } else { logger.error("Unknown object dropped in PlayPen: "+someData); } } } catch (ArchitectException e) { e.printStackTrace(); } finally { finished = true; hasStarted = false; ArchitectFrame.getMainInstance().getProject().getPlayPen().fireUndoCompoundEvent(new UndoCompoundEvent(this,EventTypes.MULTI_SELECT_END,"Ending multi-select")); } logger.info("AddObjectsTask done"); } } |
|
logger.log(Level.FINE, "Failed to connect", exception); | public ActionForward execute(Exception exception, ExceptionConfig exConfig, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException { ActionErrors errors = new ActionErrors(); ActionForward forward; if(exception instanceof ServiceException){ errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(WebErrorCodes.WEB_UI_ERROR_KEY, exception.getMessage())); }else if(exception instanceof ConnectionFailedException){ //TODO: We need not handle this condition once all the code throwing this exception gets moved to service layer. return mapping.findForward(Forwards.CONNECTION_FAILED); }else if(exception instanceof ApplicationConfigManager.DuplicateApplicationNameException){ //TODO: We need not handle this exception once this exception // is handled in Service layer ApplicationConfigManager.DuplicateApplicationNameException ex = (ApplicationConfigManager.DuplicateApplicationNameException)exception; errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(WebErrorCodes.WEB_UI_ERROR_KEY, ErrorCatalog.getMessage(ErrorCodes.APPLICATION_NAME_ALREADY_EXISTS, ex.getAppName()))); }else{ logger.log(Level.SEVERE, "unknown exception", exception); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(ErrorCodes.UNKNOWN_ERROR)); } request.setAttribute(Globals.ERROR_KEY, errors); forward = mapping.getInputForward(); forward = forward != null && forward.getPath() != null ? forward : mapping.findForward(Forwards.FAILURE); forward = forward != null ? forward : new ActionForward(Forwards.FAILURE); return forward; } |
|
addMouseListener(new popMouseListener(this)); | addMouseListener(new PopMouseListener(this)); | DPrimeDisplay(PairwiseLinkage[][] t, boolean b, Vector v){ markersLoaded = b; dPrimeTable = t; markers = v; this.setDoubleBuffered(true); addMouseListener(new popMouseListener(this)); } |
try { pval= MathUtil.gammq(.5,.5*getChiSq()); } catch(CheckDataException e) {} | pval= MathUtil.gammq(.5,.5*getChiSq()); | public double getPValue() { double pval = 0; try { pval= MathUtil.gammq(.5,.5*getChiSq()); } catch(CheckDataException e) {} return Math.rint(pval*10000.0)/10000.0; } |
public void run(Context context, XMLOutput output) { | public void run(JellyContext context, XMLOutput output) { | public void run(Context context, XMLOutput output) { if ( var == null ) { throw new IllegalArgumentException( "The var attribute cannot be null" ); } if ( select != null ) { Object value = select.evaluate( null ); context.setVariable( var, value ); } } |
public DashboardContextImpl(WebContext webContext, HttpServletRequest request){ | public DashboardContextImpl(WebContext webContext, DashboardConfig dashboardConfig, HttpServletRequest request){ | public DashboardContextImpl(WebContext webContext, HttpServletRequest request){ this.webContext = webContext; this.request = request; } |
this.request = request; | this.dashboardConfig = dashboardConfig; this.request = request; | public DashboardContextImpl(WebContext webContext, HttpServletRequest request){ this.webContext = webContext; this.request = request; } |
tdtPanel = new TDTPanel(theData.getPedFile(), assocTest); | try{ tdtPanel = new TDTPanel(theData.getPedFile(), assocTest); } catch(PedFileException e) { JOptionPane.showMessageDialog(window, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } | 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 either 3 or 4 for ped and hapmap files respectively final File inFile = new File(inputOptions[0]); //deal with max comparison distance if (inputOptions[2].equals("")){ inputOptions[2] = "0"; } maxCompDist = Long.parseLong(inputOptions[2])*1000; try { if (inFile.length() < 1){ throw new HaploViewException("Genotype file is empty or nonexistent: " + inFile.getName()); } if (type == HAPS){ //these are not available for non ped files viewMenuItems[VIEW_CHECK_NUM].setEnabled(false); viewMenuItems[VIEW_TDT_NUM].setEnabled(false); assocTest = 0; } theData = new HaploData(); if (type == HAPS){ theData.prepareHapsInput(new File(inputOptions[0])); }else{ theData.linkageToChrom(inFile, type); } //deal with marker information theData.infoKnown = false; File markerFile; if (inputOptions[1].equals("")){ markerFile = null; }else{ markerFile = new File(inputOptions[1]); } checkPanel = null; if (type == HAPS){ readMarkers(markerFile, null); }else{ readMarkers(markerFile, theData.getPedFile().getHMInfo()); checkPanel = new CheckDataPanel(theData, true); checkPanel.setAlignmentX(Component.CENTER_ALIGNMENT); } //let's start the math this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); final SwingWorker worker = new SwingWorker(){ public Object construct(){ dPrimeDisplay=null; changeKey(1); theData.generateDPrimeTable(); theData.guessBlocks(BLOX_GABRIEL); //theData.guessBlocks(BLOX_NONE); //for debugging, doesn't call blocks at first colorMenuItems[0].setSelected(true); blockMenuItems[0].setSelected(true); zoomMenuItems[0].setSelected(true); theData.blocksChanged = false; Container contents = getContentPane(); contents.removeAll(); int currentTab = VIEW_D_NUM; /*if (!(tabs == null)){ currentTab = tabs.getSelectedIndex(); } */ tabs = new JTabbedPane(); tabs.addChangeListener(new TabChangeListener()); //first, draw the D' picture JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); dPrimeDisplay = new DPrimeDisplay(window); JScrollPane dPrimeScroller = new JScrollPane(dPrimeDisplay); dPrimeScroller.getViewport().setScrollMode(JViewport.BLIT_SCROLL_MODE); dPrimeScroller.getVerticalScrollBar().setUnitIncrement(60); dPrimeScroller.getHorizontalScrollBar().setUnitIncrement(60); panel.add(dPrimeScroller); tabs.addTab(viewItems[VIEW_D_NUM], panel); viewMenuItems[VIEW_D_NUM].setEnabled(true); //compute and show haps on next tab panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); try { hapDisplay = new HaplotypeDisplay(theData); } catch(HaploViewException e) { JOptionPane.showMessageDialog(window, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } HaplotypeDisplayController hdc = new HaplotypeDisplayController(hapDisplay); hapScroller = new JScrollPane(hapDisplay); hapScroller.getVerticalScrollBar().setUnitIncrement(60); hapScroller.getHorizontalScrollBar().setUnitIncrement(60); panel.add(hapScroller); panel.add(hdc); tabs.addTab(viewItems[VIEW_HAP_NUM], panel); viewMenuItems[VIEW_HAP_NUM].setEnabled(true); //LOD panel /*panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); LODDisplay ld = new LODDisplay(theData); JScrollPane lodScroller = new JScrollPane(ld); panel.add(lodScroller); tabs.addTab(viewItems[VIEW_LOD_NUM], panel); viewMenuItems[VIEW_LOD_NUM].setEnabled(true);*/ //int optionalTabCount = 1; //check data panel if (checkPanel != null){ //optionalTabCount++; //VIEW_CHECK_NUM = optionalTabCount; //viewItems[VIEW_CHECK_NUM] = VIEW_CHECK_PANEL; JPanel metaCheckPanel = new JPanel(); metaCheckPanel.setLayout(new BoxLayout(metaCheckPanel, BoxLayout.Y_AXIS)); JLabel countsLabel = new JLabel("Using " + theData.numSingletons + " singletons and " + theData.numTrios + " trios from " + theData.numPeds + " families."); if (theData.numTrios + theData.numSingletons == 0){ countsLabel.setForeground(Color.red); } countsLabel.setAlignmentX(Component.CENTER_ALIGNMENT); metaCheckPanel.add(countsLabel); metaCheckPanel.add(checkPanel); cdc = new CheckDataController(window); metaCheckPanel.add(cdc); tabs.addTab(viewItems[VIEW_CHECK_NUM], metaCheckPanel); viewMenuItems[VIEW_CHECK_NUM].setEnabled(true); currentTab=VIEW_CHECK_NUM; } //TDT panel if(assocTest > 0) { //optionalTabCount++; //VIEW_TDT_NUM = optionalTabCount; //viewItems[VIEW_TDT_NUM] = VIEW_TDT; tdtPanel = new TDTPanel(theData.getPedFile(), assocTest); tabs.addTab(viewItems[VIEW_TDT_NUM], tdtPanel); viewMenuItems[VIEW_TDT_NUM].setEnabled(true); } tabs.setSelectedIndex(currentTab); contents.add(tabs); repaint(); setVisible(true); theData.finished = true; setTitle(TITLE_STRING + " -- " + inFile.getName()); return null; } }; timer = new javax.swing.Timer(50, new ActionListener(){ public void actionPerformed(ActionEvent evt){ if (theData.finished){ timer.stop(); for (int i = 0; i < blockMenuItems.length; i++){ blockMenuItems[i].setEnabled(true); } clearBlocksItem.setEnabled(true); readMarkerItem.setEnabled(true); blocksItem.setEnabled(true); exportMenuItems[2].setEnabled(true); setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); } } }); worker.start(); timer.start(); }catch(IOException ioexec) { JOptionPane.showMessageDialog(this, ioexec.getMessage(), "File Error", JOptionPane.ERROR_MESSAGE); } catch(PedFileException pfe){ JOptionPane.showMessageDialog(this, pfe.getMessage(), "File Error", JOptionPane.ERROR_MESSAGE); }catch (HaploViewException hve){ JOptionPane.showMessageDialog(this, hve.getMessage(), "File Error", JOptionPane.ERROR_MESSAGE); } } |
tdtPanel = new TDTPanel(theData.getPedFile(), assocTest); | try{ tdtPanel = new TDTPanel(theData.getPedFile(), assocTest); } catch(PedFileException e) { JOptionPane.showMessageDialog(window, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } | public Object construct(){ dPrimeDisplay=null; changeKey(1); theData.generateDPrimeTable(); theData.guessBlocks(BLOX_GABRIEL); //theData.guessBlocks(BLOX_NONE); //for debugging, doesn't call blocks at first colorMenuItems[0].setSelected(true); blockMenuItems[0].setSelected(true); zoomMenuItems[0].setSelected(true); theData.blocksChanged = false; Container contents = getContentPane(); contents.removeAll(); int currentTab = VIEW_D_NUM; /*if (!(tabs == null)){ currentTab = tabs.getSelectedIndex(); } */ tabs = new JTabbedPane(); tabs.addChangeListener(new TabChangeListener()); //first, draw the D' picture JPanel panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); dPrimeDisplay = new DPrimeDisplay(window); JScrollPane dPrimeScroller = new JScrollPane(dPrimeDisplay); dPrimeScroller.getViewport().setScrollMode(JViewport.BLIT_SCROLL_MODE); dPrimeScroller.getVerticalScrollBar().setUnitIncrement(60); dPrimeScroller.getHorizontalScrollBar().setUnitIncrement(60); panel.add(dPrimeScroller); tabs.addTab(viewItems[VIEW_D_NUM], panel); viewMenuItems[VIEW_D_NUM].setEnabled(true); //compute and show haps on next tab panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); try { hapDisplay = new HaplotypeDisplay(theData); } catch(HaploViewException e) { JOptionPane.showMessageDialog(window, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } HaplotypeDisplayController hdc = new HaplotypeDisplayController(hapDisplay); hapScroller = new JScrollPane(hapDisplay); hapScroller.getVerticalScrollBar().setUnitIncrement(60); hapScroller.getHorizontalScrollBar().setUnitIncrement(60); panel.add(hapScroller); panel.add(hdc); tabs.addTab(viewItems[VIEW_HAP_NUM], panel); viewMenuItems[VIEW_HAP_NUM].setEnabled(true); //LOD panel /*panel = new JPanel(); panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS)); LODDisplay ld = new LODDisplay(theData); JScrollPane lodScroller = new JScrollPane(ld); panel.add(lodScroller); tabs.addTab(viewItems[VIEW_LOD_NUM], panel); viewMenuItems[VIEW_LOD_NUM].setEnabled(true);*/ //int optionalTabCount = 1; //check data panel if (checkPanel != null){ //optionalTabCount++; //VIEW_CHECK_NUM = optionalTabCount; //viewItems[VIEW_CHECK_NUM] = VIEW_CHECK_PANEL; JPanel metaCheckPanel = new JPanel(); metaCheckPanel.setLayout(new BoxLayout(metaCheckPanel, BoxLayout.Y_AXIS)); JLabel countsLabel = new JLabel("Using " + theData.numSingletons + " singletons and " + theData.numTrios + " trios from " + theData.numPeds + " families."); if (theData.numTrios + theData.numSingletons == 0){ countsLabel.setForeground(Color.red); } countsLabel.setAlignmentX(Component.CENTER_ALIGNMENT); metaCheckPanel.add(countsLabel); metaCheckPanel.add(checkPanel); cdc = new CheckDataController(window); metaCheckPanel.add(cdc); tabs.addTab(viewItems[VIEW_CHECK_NUM], metaCheckPanel); viewMenuItems[VIEW_CHECK_NUM].setEnabled(true); currentTab=VIEW_CHECK_NUM; } //TDT panel if(assocTest > 0) { //optionalTabCount++; //VIEW_TDT_NUM = optionalTabCount; //viewItems[VIEW_TDT_NUM] = VIEW_TDT; tdtPanel = new TDTPanel(theData.getPedFile(), assocTest); tabs.addTab(viewItems[VIEW_TDT_NUM], tdtPanel); viewMenuItems[VIEW_TDT_NUM].setEnabled(true); } tabs.setSelectedIndex(currentTab); contents.add(tabs); repaint(); setVisible(true); theData.finished = true; setTitle(TITLE_STRING + " -- " + inFile.getName()); return null; } |
photo.setOrigFname( imgFile.getName() ); | String fname = imgFile.getName(); if ( fname.length() > ORIG_FNAME_LENGTH ) { fname = fname.substring( 0, ORIG_FNAME_LENGTH ); } photo.setOrigFname( fname ); | public static PhotoInfo addToDB( File imgFile ) throws PhotoNotFoundException { VolumeBase vol = null; try { vol = VolumeBase.getVolumeOfFile( imgFile ); } catch (IOException ex) { throw new PhotoNotFoundException(); } // Determine the fle that will be added as an instance File instanceFile = null; if ( vol == null ) { /* The "normal" case: we are adding a photo that is not part of any volume. Copy the file to the archive. */ vol = VolumeBase.getDefaultVolume(); instanceFile = vol.getFilingFname( imgFile ); try { FileUtils.copyFile( imgFile, instanceFile ); } catch (IOException ex) { log.warn( "Error copying file: " + ex.getMessage() ); throw new PhotoNotFoundException(); } } else if ( vol instanceof ExternalVolume ) { // Thisfile is in an external volume so we do not need a copy instanceFile = imgFile; } else if ( vol instanceof Volume ) { // Adding file from normal volume is not permitted throw new PhotoNotFoundException(); } else { throw new java.lang.Error( "Unknown subclass of VolumeBase: " + vol.getClass().getName() ); } // Create the image ODMGXAWrapper txw = new ODMGXAWrapper(); PhotoInfo photo = PhotoInfo.create(); txw.lock( photo, Transaction.WRITE ); photo.addInstance( vol, instanceFile, ImageInstance.INSTANCE_TYPE_ORIGINAL ); photo.setOrigFname( imgFile.getName() ); java.util.Date shootTime = new java.util.Date( imgFile.lastModified() ); photo.setShootTime( shootTime ); photo.setCropBounds( new Rectangle2D.Float( 0.0F, 0.0F, 1.0F, 1.0F ) ); photo.updateFromFileMetadata( instanceFile ); txw.commit(); return photo; } |
checkStringProperty( "Camera", v, CAMERA_LENGTH ); | public void setCamera(String v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.camera = v; modified(); txw.commit(); } |
|
checkStringProperty( "Film", v, FILM_LENGTH ); | public void setFilm(String v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.film = v; modified(); txw.commit(); } |
|
checkStringProperty( "Lens", v, LENS_LENGTH ); | public void setLens(String v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.lens = v; modified(); txw.commit(); } |
|
checkStringProperty( "OrigFname", newFname, ORIG_FNAME_LENGTH ); | public final void setOrigFname(final String newFname) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.origFname = newFname; modified(); txw.commit(); } |
|
checkStringProperty( "Photographer", v, this.PHOTOGRAPHER_LENGTH ); | public void setPhotographer(String v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.photographer = v; modified(); txw.commit(); } |
|
checkStringProperty( "Shooting place", v, SHOOTING_PLACE_LENGTH ); | public void setShootingPlace(String v) { ODMGXAWrapper txw = new ODMGXAWrapper(); txw.lock( this, Transaction.WRITE ); this.shootingPlace = v; modified(); txw.commit(); } |
|
setCamera( maker + " " + model ); | StringBuffer cameraBuf = new StringBuffer( maker ); cameraBuf.append( " "). append( model ); String camera = cameraBuf.toString(); if ( cameraBuf.length() > CAMERA_LENGTH ) { camera = cameraBuf.substring( 0, CAMERA_LENGTH ); } setCamera( camera ); | void updateFromFileMetadata( File f ) { ExifDirectory exif = null; try { Metadata metadata = JpegMetadataReader.readMetadata(f); if ( metadata.containsDirectory( ExifDirectory.class ) ) { try { exif = (ExifDirectory) metadata.getDirectory( ExifDirectory.class ); } catch ( MetadataException e ) { } } else { // No known directory was found no reason to continue return; } } catch (FileNotFoundException e) { // If error, just return - this is just an additional 'nice-if-succesful' operation. // If there is no metadata this will happen... return; } // Shooting date try { java.util.Date origDate = exif.getDate( exif.TAG_DATETIME_ORIGINAL ); setShootTime( origDate ); log.debug( "TAG_DATETIME_ORIGINAL: " + origDate.toString() ); } catch ( MetadataException e ) { log.info( "Error reading origDate: " + e.getMessage() ); } // Exposure try { double fstop = exif.getDouble( exif.TAG_FNUMBER ); log.debug( "TAG_FNUMBER: " + fstop ); setFStop( fstop ); } catch ( MetadataException e ) { log.info( "Error reading origDate: " + e.getMessage() ); } try { double sspeed = exif.getDouble( exif.TAG_EXPOSURE_TIME ); setShutterSpeed( sspeed ); log.debug( "TAG_EXPOSURE_TIME: " + sspeed ); } catch ( MetadataException e ) { log.info( "Error reading origDate: " + e.getMessage() ); } try { double flen = exif.getDouble( exif.TAG_FOCAL_LENGTH ); setFocalLength( flen ); } catch ( MetadataException e ) { log.info( "Error reading origDate: " + e.getMessage() ); } try { int filmSpeed = exif.getInt( exif.TAG_ISO_EQUIVALENT ); setFilmSpeed( filmSpeed ); } catch ( MetadataException e ) { log.info( "Error reading origDate: " + e.getMessage() ); } // Camera name. Put here both camera manufacturer and model String maker = exif.getString( exif.TAG_MAKE ); String model = exif.getString( exif.TAG_MODEL ); setCamera( maker + " " + model ); } |
public ScriptTag(BSFEngine engine) { | public ScriptTag(BSFEngine engine, BSFManager manager) { | public ScriptTag(BSFEngine engine) { this.engine = engine; } |
this.manager = manager; | public ScriptTag(BSFEngine engine) { this.engine = engine; } |
|
log.debug(text); try { engine.eval(fileName, lineNumber, columnNumber, text); | log.debug(text); synchronized (getRegistry()) { getRegistry().setJellyContext(context); try { for ( Iterator iter = context.getVariableNames(); iter.hasNext(); ) { String name = (String) iter.next(); Object value = context.getVariable( name ); manager.declareBean( name, value, value.getClass() ); } engine.exec(fileName, lineNumber, columnNumber, text); } catch (BSFException e) { throw new JellyTagException("Error occurred with script: " + e, e); } | public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { String text = getBodyText(); log.debug(text); try { engine.eval(fileName, lineNumber, columnNumber, text); } catch (BSFException e) { throw new JellyTagException("Error occurred with script: " + e, e); } } |
catch (BSFException e) { throw new JellyTagException("Error occurred with script: " + e, e); } | public void doTag(XMLOutput output) throws MissingAttributeException, JellyTagException { String text = getBodyText(); log.debug(text); try { engine.eval(fileName, lineNumber, columnNumber, text); } catch (BSFException e) { throw new JellyTagException("Error occurred with script: " + e, e); } } |
|
System.out.println("addCreateDing: " + messages[i++]); | System.out.println("createDing: " + messages[i++]); | public Thingy createDing() { System.out.println("addCreateDing: " + messages[i++]); return new Thingy(); } |
logger.error("adding table: " + ((SQLTable)lastObj).getName()); | logger.debug("adding table: " + ((SQLTable)lastObj).getName()); | public boolean applyChanges() { // make a list of SQLTable objects and put them into // the wizard TreePath [] paths = dbTree.getSelectionPaths(); if (paths == null || paths.length == 0) { JOptionPane.showMessageDialog(getPanel(), "You must select at least one table or view.", "Error", JOptionPane.ERROR_MESSAGE); return false; } List list = new ArrayList(); Iterator it = Arrays.asList(paths).iterator(); while (it.hasNext()) { TreePath tp = (TreePath) it.next(); Object lastObj = tp.getLastPathComponent(); if (lastObj instanceof SQLTable) { logger.error("adding table: " + ((SQLTable)lastObj).getName()); list.add(lastObj); } } wizard.setSourceTables(list); return true; } |
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 { if ( var == null ) { throw new JellyException( "<define:script> must have a var attribute" ); } context.setVariable( var, getBody() ); } |
getBody().run(context, output) | invokeBody(output) | public void doTag(XMLOutput output) throws Exception { // ### should probably use HttpClient instead/* HttpClient client = getHttpClient(); client.startSession( getUrl() ); try { // must use inner tags to extract the output.... getBody().run(context, output) } finally { client.endSession(); } */ HttpConnection connection = getConnection(); if ( connection == null ) { throw new JellyException( "No HTTP connection available. " + "This tag should have a 'uri' attribute or be nested inside " + "a <http:connection> tag" ); } HttpMethod method = getMethod(); if ( method == null ) { throw new JellyException( "No HTTP Method available for this tag to execute" ); } int result = method.execute(getState(), connection); if ( var != null ) { context.setVariable(var, method); } } |
CommandHandler handler = null; | CommandHandler handler; | private boolean execute0(HandlerContext context) throws InvalidCommandException { String[] args = context.getCommand().getArgs(); if(args.length == 1){ /* print long help for given command */ CommandHandler handler = null; try { handler = CommandHandlerFactory.getHandler(args[0]); handler.help(); return true; } catch (InvalidCommandException e) { Out.println(e.getMessage()); Out.println(); } } /* print help about using jmanage command */ Out.println("jmanage [-username <username>] [-password <password>] " + "[-verbose[=<level>]] [command] [command args]"); /* print short help for all commands */ Out.println(); Out.println("Commands:"); Table table = new Table(2); Collection commandNames = CommandHandlerFactory.getCommandNames(); for(Iterator it=commandNames.iterator(); it.hasNext();){ String commandName = (String)it.next(); CommandHandler handler = CommandHandlerFactory.getHandler(commandName); table.add(commandName, handler.getShortHelp()); } table.print(); Out.println(); Out.println("Type \"help <command>\" for detailed command help."); return true; } |
for(Iterator it=commandNames.iterator(); it.hasNext();){ String commandName = (String)it.next(); | for (Object commandName1 : commandNames) { String commandName = (String) commandName1; | private boolean execute0(HandlerContext context) throws InvalidCommandException { String[] args = context.getCommand().getArgs(); if(args.length == 1){ /* print long help for given command */ CommandHandler handler = null; try { handler = CommandHandlerFactory.getHandler(args[0]); handler.help(); return true; } catch (InvalidCommandException e) { Out.println(e.getMessage()); Out.println(); } } /* print help about using jmanage command */ Out.println("jmanage [-username <username>] [-password <password>] " + "[-verbose[=<level>]] [command] [command args]"); /* print short help for all commands */ Out.println(); Out.println("Commands:"); Table table = new Table(2); Collection commandNames = CommandHandlerFactory.getCommandNames(); for(Iterator it=commandNames.iterator(); it.hasNext();){ String commandName = (String)it.next(); CommandHandler handler = CommandHandlerFactory.getHandler(commandName); table.add(commandName, handler.getShortHelp()); } table.print(); Out.println(); Out.println("Type \"help <command>\" for detailed command help."); return true; } |
Out.println("[Important! : Any space within a command argument should be replaced with \"~\" character.]"); | private boolean execute0(HandlerContext context) throws InvalidCommandException { String[] args = context.getCommand().getArgs(); if(args.length == 1){ /* print long help for given command */ CommandHandler handler = null; try { handler = CommandHandlerFactory.getHandler(args[0]); handler.help(); return true; } catch (InvalidCommandException e) { Out.println(e.getMessage()); Out.println(); } } /* print help about using jmanage command */ Out.println("jmanage [-username <username>] [-password <password>] " + "[-verbose[=<level>]] [command] [command args]"); /* print short help for all commands */ Out.println(); Out.println("Commands:"); Table table = new Table(2); Collection commandNames = CommandHandlerFactory.getCommandNames(); for(Iterator it=commandNames.iterator(); it.hasNext();){ String commandName = (String)it.next(); CommandHandler handler = CommandHandlerFactory.getHandler(commandName); table.add(commandName, handler.getShortHelp()); } table.print(); Out.println(); Out.println("Type \"help <command>\" for detailed command help."); return true; } |
|
if (e.getComponent() == pkTable || e.getComponent() == fkTable) { revalidate(); | if (e.getComponent() == pkTable) { setPkConnectionPoint(ui.closestEdgePoint(true, getPkConnectionPoint())); } if (e.getComponent() == fkTable) { setFkConnectionPoint(ui.closestEdgePoint(false, getFkConnectionPoint())); | public void componentResized(ComponentEvent e) { logger.debug("Component "+e.getComponent().getName()+" changed size"); if (e.getComponent() == pkTable || e.getComponent() == fkTable) { revalidate(); } } |
mi.setActionCommand(ArchitectSwingConstants.ACTION_COMMAND_SRC_PLAYPEN); | protected void createPopup() { ArchitectFrame af = ArchitectFrame.getMainInstance(); popup = new JPopupMenu(); JMenuItem mi; mi = new JMenuItem(af.editRelationshipAction); popup.add(mi); mi = new JMenuItem(af.deleteSelectedAction); popup.add(mi); } |
|
public void testChangeSFifthColumnIdxToSecond() throws ArchitectException{ | public void testChangeSFifthColumnIdxToSecond() throws Exception { EventLogger l = new EventLogger(); TableSnapshot original = l.makeTableSnapshot(table); ArchitectUtils.listenToHierarchy(l, table); | public void testChangeSFifthColumnIdxToSecond() throws ArchitectException{ table.changeColumnIndex(4, 1, true); assertEquals(4, table.getPkSize()); assertEquals(0, table.getColumnIndex(table.getColumnByName("one"))); assertEquals(1, table.getColumnIndex(table.getColumnByName("five"))); assertEquals(2, table.getColumnIndex(table.getColumnByName("two"))); assertEquals(3, table.getColumnIndex(table.getColumnByName("three"))); assertEquals(4, table.getColumnIndex(table.getColumnByName("four"))); assertEquals(5, table.getColumnIndex(table.getColumnByName("six"))); } |
System.out.println("Event log:\n"+l); TableSnapshot afterChange = l.makeTableSnapshot(table); System.out.println("Original: "+original); System.out.println("After: "+afterChange); l.rollBack(afterChange); assertEquals(original.toString(), afterChange.toString()); | public void testChangeSFifthColumnIdxToSecond() throws ArchitectException{ table.changeColumnIndex(4, 1, true); assertEquals(4, table.getPkSize()); assertEquals(0, table.getColumnIndex(table.getColumnByName("one"))); assertEquals(1, table.getColumnIndex(table.getColumnByName("five"))); assertEquals(2, table.getColumnIndex(table.getColumnByName("two"))); assertEquals(3, table.getColumnIndex(table.getColumnByName("three"))); assertEquals(4, table.getColumnIndex(table.getColumnByName("four"))); assertEquals(5, table.getColumnIndex(table.getColumnByName("six"))); } |
|
if(!config.isCluster()){ EventSystem.getInstance().fireEvent(new NewApplicationEvent(config)); } | public static void addApplication(ApplicationConfig config) throws DuplicateApplicationNameException { synchronized(writeLock){ // validate the application name validateAppName(config.getName(), null); applicationConfigs.add(config); saveConfig(); } } |
|
Factory factory = getFactory( name ); | final Factory factory = getFactory( name ); | public TagScript createTagScript(String name, Attributes attributes) throws Exception { TagScript answer = super.createTagScript(name, attributes); if ( answer == null ) { Factory factory = getFactory( name ); if ( factory != null ) { ComponentTag tag = new ComponentTag(factory); answer = TagScript.newInstance(tag); } } return answer; } |
ComponentTag tag = new ComponentTag(factory); answer = TagScript.newInstance(tag); | return new DynaTagScript( new TagFactory() { public Tag createTag() throws Exception { return new ComponentTag(factory); } } ); | public TagScript createTagScript(String name, Attributes attributes) throws Exception { TagScript answer = super.createTagScript(name, attributes); if ( answer == null ) { Factory factory = getFactory( name ); if ( factory != null ) { ComponentTag tag = new ComponentTag(factory); answer = TagScript.newInstance(tag); } } return answer; } |
setLayout(new GridBagLayout()); folderTree = new JTree( ); | GridBagLayout layout = new GridBagLayout(); setLayout( layout ); folderTree = new JTree(); | void createUI() { setLayout(new GridBagLayout()); folderTree = new JTree( ); folderTree.setRootVisible( true ); folderTree.setShowsRootHandles( false ); folderTree.setEditable( true ); folderTree.setCellEditor( new FolderNodeEditor( this ) ); folderTree.setCellRenderer( new FolderNodeEditor( this ) ); JScrollPane scrollPane = new JScrollPane( folderTree ); scrollPane.setPreferredSize( new Dimension( 300, 300 ) ); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; c.gridy = 0; c.gridheight = GridBagConstraints.REMAINDER; c.fill = GridBagConstraints.BOTH; add( scrollPane, c ); JButton addFolderBtn = new JButton( "Add to folder..." ); addFolderBtn.setActionCommand( ADD_ALL_TO_FOLDER_CMD ); addFolderBtn.addActionListener( this ); c = new GridBagConstraints(); c.gridx = 1; c.gridy = 0; add( addFolderBtn, c ); popup = new JPopupMenu(); JMenuItem addAllItem = new JMenuItem( "Add photos" ); addAllItem.addActionListener( this ); addAllItem.setActionCommand( ADD_ALL_TO_THIS_FOLDER_CMD ); JMenuItem removeAllItem = new JMenuItem( "Remove photos" ); removeAllItem.addActionListener( this ); removeAllItem.setActionCommand( REMOVE_ALL_FROM_THIS_FOLDER_CMD ); popup.add( addAllItem ); popup.add( removeAllItem ); MouseListener popupListener = new PopupListener(); folderTree.addMouseListener( popupListener ); } |
add( scrollPane, c ); JButton addFolderBtn = new JButton( "Add to folder..." ); addFolderBtn.setActionCommand( ADD_ALL_TO_FOLDER_CMD ); addFolderBtn.addActionListener( this ); c = new GridBagConstraints(); c.gridx = 1; c.gridy = 0; add( addFolderBtn, c ); | void createUI() { setLayout(new GridBagLayout()); folderTree = new JTree( ); folderTree.setRootVisible( true ); folderTree.setShowsRootHandles( false ); folderTree.setEditable( true ); folderTree.setCellEditor( new FolderNodeEditor( this ) ); folderTree.setCellRenderer( new FolderNodeEditor( this ) ); JScrollPane scrollPane = new JScrollPane( folderTree ); scrollPane.setPreferredSize( new Dimension( 300, 300 ) ); GridBagConstraints c = new GridBagConstraints(); c.gridx = 0; c.gridy = 0; c.gridheight = GridBagConstraints.REMAINDER; c.fill = GridBagConstraints.BOTH; add( scrollPane, c ); JButton addFolderBtn = new JButton( "Add to folder..." ); addFolderBtn.setActionCommand( ADD_ALL_TO_FOLDER_CMD ); addFolderBtn.addActionListener( this ); c = new GridBagConstraints(); c.gridx = 1; c.gridy = 0; add( addFolderBtn, c ); popup = new JPopupMenu(); JMenuItem addAllItem = new JMenuItem( "Add photos" ); addAllItem.addActionListener( this ); addAllItem.setActionCommand( ADD_ALL_TO_THIS_FOLDER_CMD ); JMenuItem removeAllItem = new JMenuItem( "Remove photos" ); removeAllItem.addActionListener( this ); removeAllItem.setActionCommand( REMOVE_ALL_FROM_THIS_FOLDER_CMD ); popup.add( addAllItem ); popup.add( removeAllItem ); MouseListener popupListener = new PopupListener(); folderTree.addMouseListener( popupListener ); } |
|
PhotoCollectionChangeEvent e = new PhotoCollectionChangeEvent( f ); treeModel.photoCollectionChanged( e ); | public void addAllToFolder( PhotoFolder f ) { addedToFolders.add( f ); removedFromFolders.remove( f ); FolderNode fn = (FolderNode)nodeMapper.mapFolderToNode( f ); fn.addAllPhotos(); // Notify the tree model that representation of this node may // be changed; PhotoCollectionChangeEvent e = new PhotoCollectionChangeEvent( f ); treeModel.photoCollectionChanged( e ); } |
|
fn.removeAllPhotos(); PhotoCollectionChangeEvent e = new PhotoCollectionChangeEvent( f ); treeModel.photoCollectionChanged( e ); | fn.removeAllPhotos(); | public void removeAllFromFolder( PhotoFolder f ) { addedToFolders.remove( f ); removedFromFolders.add( f ); FolderNode fn = (FolderNode) nodeMapper.mapFolderToNode( f ); fn.removeAllPhotos(); PhotoCollectionChangeEvent e = new PhotoCollectionChangeEvent( f ); treeModel.photoCollectionChanged( e ); } |
logger.debug("getting physical name for: " + logicalName); | if (logger.isDebugEnabled()) logger.debug("getting physical name for: " + logicalName); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); // make sure first character is alpha Pattern p = Pattern.compile("^[^a-zA-Z]+"); Matcher m = p.matcher(ident); if (m.find()) { // just add something alpha to the front for now ident = "X" + ident; logger.debug("identifiers must start with letter, appending X: " + ident); } // see if it's a reserved word, and add something alpha to front if it is... if (isReservedWord(ident)) { ident = "X" + ident; logger.debug("identifier was reserved word, appending X: " + ident); } // replace anything that is not a letter, character, or underscore with an underscore... String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; // first time through if (physicalName == null) { // length is ok if (ident.length() < 31) { return ident; } else { // length is too big logger.debug("truncating identifier: " + ident); String base = ident.substring(0,27); int tiebreaker = ((ident.hashCode() % 1000) + 1000) % 1000; logger.debug("new identifier: " + base + tiebreaker); return (base + tiebreaker); } } else { // back for more, which means that we had a // namespace conflict. Hack the ident down // to size if it's too big, and then generate // a hash tiebreaker using the ident and the // current value of physicalName logger.debug("physical idenfier is not unique, regenerating: " + physicalName); String base = ident; if (ident.length() > 27) { base = ident.substring(0,27); } int tiebreaker = (((ident + physicalName).hashCode() % 1000) + 1000) % 1000; logger.debug("regenerated identifier is: " + (base + tiebreaker)); return (base + tiebreaker); } } |
logger.debug("after replace of spaces: " + ident); | if (logger.isDebugEnabled()) logger.debug("after replace of spaces: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); // make sure first character is alpha Pattern p = Pattern.compile("^[^a-zA-Z]+"); Matcher m = p.matcher(ident); if (m.find()) { // just add something alpha to the front for now ident = "X" + ident; logger.debug("identifiers must start with letter, appending X: " + ident); } // see if it's a reserved word, and add something alpha to front if it is... if (isReservedWord(ident)) { ident = "X" + ident; logger.debug("identifier was reserved word, appending X: " + ident); } // replace anything that is not a letter, character, or underscore with an underscore... String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; // first time through if (physicalName == null) { // length is ok if (ident.length() < 31) { return ident; } else { // length is too big logger.debug("truncating identifier: " + ident); String base = ident.substring(0,27); int tiebreaker = ((ident.hashCode() % 1000) + 1000) % 1000; logger.debug("new identifier: " + base + tiebreaker); return (base + tiebreaker); } } else { // back for more, which means that we had a // namespace conflict. Hack the ident down // to size if it's too big, and then generate // a hash tiebreaker using the ident and the // current value of physicalName logger.debug("physical idenfier is not unique, regenerating: " + physicalName); String base = ident; if (ident.length() > 27) { base = ident.substring(0,27); } int tiebreaker = (((ident + physicalName).hashCode() % 1000) + 1000) % 1000; logger.debug("regenerated identifier is: " + (base + tiebreaker)); return (base + tiebreaker); } } |
logger.debug("identifiers must start with letter, appending X: " + ident); | if (logger.isDebugEnabled()) logger.debug("identifiers must start with letter, appending X: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); // make sure first character is alpha Pattern p = Pattern.compile("^[^a-zA-Z]+"); Matcher m = p.matcher(ident); if (m.find()) { // just add something alpha to the front for now ident = "X" + ident; logger.debug("identifiers must start with letter, appending X: " + ident); } // see if it's a reserved word, and add something alpha to front if it is... if (isReservedWord(ident)) { ident = "X" + ident; logger.debug("identifier was reserved word, appending X: " + ident); } // replace anything that is not a letter, character, or underscore with an underscore... String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; // first time through if (physicalName == null) { // length is ok if (ident.length() < 31) { return ident; } else { // length is too big logger.debug("truncating identifier: " + ident); String base = ident.substring(0,27); int tiebreaker = ((ident.hashCode() % 1000) + 1000) % 1000; logger.debug("new identifier: " + base + tiebreaker); return (base + tiebreaker); } } else { // back for more, which means that we had a // namespace conflict. Hack the ident down // to size if it's too big, and then generate // a hash tiebreaker using the ident and the // current value of physicalName logger.debug("physical idenfier is not unique, regenerating: " + physicalName); String base = ident; if (ident.length() > 27) { base = ident.substring(0,27); } int tiebreaker = (((ident + physicalName).hashCode() % 1000) + 1000) % 1000; logger.debug("regenerated identifier is: " + (base + tiebreaker)); return (base + tiebreaker); } } |
logger.debug("identifier was reserved word, appending X: " + ident); | if (logger.isDebugEnabled()) logger.debug("identifier was reserved word, appending X: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); // make sure first character is alpha Pattern p = Pattern.compile("^[^a-zA-Z]+"); Matcher m = p.matcher(ident); if (m.find()) { // just add something alpha to the front for now ident = "X" + ident; logger.debug("identifiers must start with letter, appending X: " + ident); } // see if it's a reserved word, and add something alpha to front if it is... if (isReservedWord(ident)) { ident = "X" + ident; logger.debug("identifier was reserved word, appending X: " + ident); } // replace anything that is not a letter, character, or underscore with an underscore... String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; // first time through if (physicalName == null) { // length is ok if (ident.length() < 31) { return ident; } else { // length is too big logger.debug("truncating identifier: " + ident); String base = ident.substring(0,27); int tiebreaker = ((ident.hashCode() % 1000) + 1000) % 1000; logger.debug("new identifier: " + base + tiebreaker); return (base + tiebreaker); } } else { // back for more, which means that we had a // namespace conflict. Hack the ident down // to size if it's too big, and then generate // a hash tiebreaker using the ident and the // current value of physicalName logger.debug("physical idenfier is not unique, regenerating: " + physicalName); String base = ident; if (ident.length() > 27) { base = ident.substring(0,27); } int tiebreaker = (((ident + physicalName).hashCode() % 1000) + 1000) % 1000; logger.debug("regenerated identifier is: " + (base + tiebreaker)); return (base + tiebreaker); } } |
String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; | ident = ident.replaceAll("[^a-zA-Z0-9_]", "_"); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); // make sure first character is alpha Pattern p = Pattern.compile("^[^a-zA-Z]+"); Matcher m = p.matcher(ident); if (m.find()) { // just add something alpha to the front for now ident = "X" + ident; logger.debug("identifiers must start with letter, appending X: " + ident); } // see if it's a reserved word, and add something alpha to front if it is... if (isReservedWord(ident)) { ident = "X" + ident; logger.debug("identifier was reserved word, appending X: " + ident); } // replace anything that is not a letter, character, or underscore with an underscore... String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; // first time through if (physicalName == null) { // length is ok if (ident.length() < 31) { return ident; } else { // length is too big logger.debug("truncating identifier: " + ident); String base = ident.substring(0,27); int tiebreaker = ((ident.hashCode() % 1000) + 1000) % 1000; logger.debug("new identifier: " + base + tiebreaker); return (base + tiebreaker); } } else { // back for more, which means that we had a // namespace conflict. Hack the ident down // to size if it's too big, and then generate // a hash tiebreaker using the ident and the // current value of physicalName logger.debug("physical idenfier is not unique, regenerating: " + physicalName); String base = ident; if (ident.length() > 27) { base = ident.substring(0,27); } int tiebreaker = (((ident + physicalName).hashCode() % 1000) + 1000) % 1000; logger.debug("regenerated identifier is: " + (base + tiebreaker)); return (base + tiebreaker); } } |
logger.debug("truncating identifier: " + ident); | if (logger.isDebugEnabled()) logger.debug("truncating identifier: " + ident); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); // make sure first character is alpha Pattern p = Pattern.compile("^[^a-zA-Z]+"); Matcher m = p.matcher(ident); if (m.find()) { // just add something alpha to the front for now ident = "X" + ident; logger.debug("identifiers must start with letter, appending X: " + ident); } // see if it's a reserved word, and add something alpha to front if it is... if (isReservedWord(ident)) { ident = "X" + ident; logger.debug("identifier was reserved word, appending X: " + ident); } // replace anything that is not a letter, character, or underscore with an underscore... String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; // first time through if (physicalName == null) { // length is ok if (ident.length() < 31) { return ident; } else { // length is too big logger.debug("truncating identifier: " + ident); String base = ident.substring(0,27); int tiebreaker = ((ident.hashCode() % 1000) + 1000) % 1000; logger.debug("new identifier: " + base + tiebreaker); return (base + tiebreaker); } } else { // back for more, which means that we had a // namespace conflict. Hack the ident down // to size if it's too big, and then generate // a hash tiebreaker using the ident and the // current value of physicalName logger.debug("physical idenfier is not unique, regenerating: " + physicalName); String base = ident; if (ident.length() > 27) { base = ident.substring(0,27); } int tiebreaker = (((ident + physicalName).hashCode() % 1000) + 1000) % 1000; logger.debug("regenerated identifier is: " + (base + tiebreaker)); return (base + tiebreaker); } } |
logger.debug("new identifier: " + base + tiebreaker); | if (logger.isDebugEnabled()) logger.debug("new identifier: " + base + tiebreaker); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); // make sure first character is alpha Pattern p = Pattern.compile("^[^a-zA-Z]+"); Matcher m = p.matcher(ident); if (m.find()) { // just add something alpha to the front for now ident = "X" + ident; logger.debug("identifiers must start with letter, appending X: " + ident); } // see if it's a reserved word, and add something alpha to front if it is... if (isReservedWord(ident)) { ident = "X" + ident; logger.debug("identifier was reserved word, appending X: " + ident); } // replace anything that is not a letter, character, or underscore with an underscore... String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; // first time through if (physicalName == null) { // length is ok if (ident.length() < 31) { return ident; } else { // length is too big logger.debug("truncating identifier: " + ident); String base = ident.substring(0,27); int tiebreaker = ((ident.hashCode() % 1000) + 1000) % 1000; logger.debug("new identifier: " + base + tiebreaker); return (base + tiebreaker); } } else { // back for more, which means that we had a // namespace conflict. Hack the ident down // to size if it's too big, and then generate // a hash tiebreaker using the ident and the // current value of physicalName logger.debug("physical idenfier is not unique, regenerating: " + physicalName); String base = ident; if (ident.length() > 27) { base = ident.substring(0,27); } int tiebreaker = (((ident + physicalName).hashCode() % 1000) + 1000) % 1000; logger.debug("regenerated identifier is: " + (base + tiebreaker)); return (base + tiebreaker); } } |
logger.debug("physical idenfier is not unique, regenerating: " + physicalName); | if (logger.isDebugEnabled()) logger.debug("physical idenfier is not unique, regenerating: " + physicalName); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); // make sure first character is alpha Pattern p = Pattern.compile("^[^a-zA-Z]+"); Matcher m = p.matcher(ident); if (m.find()) { // just add something alpha to the front for now ident = "X" + ident; logger.debug("identifiers must start with letter, appending X: " + ident); } // see if it's a reserved word, and add something alpha to front if it is... if (isReservedWord(ident)) { ident = "X" + ident; logger.debug("identifier was reserved word, appending X: " + ident); } // replace anything that is not a letter, character, or underscore with an underscore... String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; // first time through if (physicalName == null) { // length is ok if (ident.length() < 31) { return ident; } else { // length is too big logger.debug("truncating identifier: " + ident); String base = ident.substring(0,27); int tiebreaker = ((ident.hashCode() % 1000) + 1000) % 1000; logger.debug("new identifier: " + base + tiebreaker); return (base + tiebreaker); } } else { // back for more, which means that we had a // namespace conflict. Hack the ident down // to size if it's too big, and then generate // a hash tiebreaker using the ident and the // current value of physicalName logger.debug("physical idenfier is not unique, regenerating: " + physicalName); String base = ident; if (ident.length() > 27) { base = ident.substring(0,27); } int tiebreaker = (((ident + physicalName).hashCode() % 1000) + 1000) % 1000; logger.debug("regenerated identifier is: " + (base + tiebreaker)); return (base + tiebreaker); } } |
logger.debug("regenerated identifier is: " + (base + tiebreaker)); | if (logger.isDebugEnabled()) logger.debug("regenerated identifier is: " + (base + tiebreaker)); | public String toIdentifier(String logicalName, String physicalName) { // replace spaces with underscores if (logicalName == null) return null; logger.debug("getting physical name for: " + logicalName); String ident = logicalName.replace(' ','_').toUpperCase(); logger.debug("after replace of spaces: " + ident); // make sure first character is alpha Pattern p = Pattern.compile("^[^a-zA-Z]+"); Matcher m = p.matcher(ident); if (m.find()) { // just add something alpha to the front for now ident = "X" + ident; logger.debug("identifiers must start with letter, appending X: " + ident); } // see if it's a reserved word, and add something alpha to front if it is... if (isReservedWord(ident)) { ident = "X" + ident; logger.debug("identifier was reserved word, appending X: " + ident); } // replace anything that is not a letter, character, or underscore with an underscore... String tempString = ident; Pattern p2 = Pattern.compile("[^a-xA-Z0-9_]"); Matcher m2 = p2.matcher(ident); while (m2.find()) { tempString = tempString.replace(m2.group(),"_"); } ident = tempString; // first time through if (physicalName == null) { // length is ok if (ident.length() < 31) { return ident; } else { // length is too big logger.debug("truncating identifier: " + ident); String base = ident.substring(0,27); int tiebreaker = ((ident.hashCode() % 1000) + 1000) % 1000; logger.debug("new identifier: " + base + tiebreaker); return (base + tiebreaker); } } else { // back for more, which means that we had a // namespace conflict. Hack the ident down // to size if it's too big, and then generate // a hash tiebreaker using the ident and the // current value of physicalName logger.debug("physical idenfier is not unique, regenerating: " + physicalName); String base = ident; if (ident.length() > 27) { base = ident.substring(0,27); } int tiebreaker = (((ident + physicalName).hashCode() % 1000) + 1000) % 1000; logger.debug("regenerated identifier is: " + (base + tiebreaker)); return (base + tiebreaker); } } |
return connection.getAttributes(objectName, attributeNames); | List attributeList = new LinkedList(); for(int i=0; i<attributeNames.length; i++){ attributeList.add(getAttribute(objectName, attributeNames[i])); } return attributeList; | public List getAttributes(ObjectName objectName, String[] attributeNames) { final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); try { /* temporarily change the thread context classloader */ Thread.currentThread().setContextClassLoader(classLoader); /* invoke the method on the wrapped ServerConnection */ return connection.getAttributes(objectName, attributeNames); } finally { /* change the thread context classloader back to the original classloader*/ Thread.currentThread().setContextClassLoader(contextClassLoader); } } |
if ( ! context.isCacheTags() ) { clearTag(); } | public void run(JellyContext context, XMLOutput output) throws JellyTagException { URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); try { Tag tag = getTag(context); if ( tag == null ) { return; } tag.setContext(context); setContextURLs(context); if ( tag instanceof DynaTag ) { DynaTag dynaTag = (DynaTag) tag; // ### probably compiling this to 2 arrays might be quicker and smaller for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.getKey(); Expression expression = ((ExpressionAttribute) entry.getValue()).exp; Class type = dynaTag.getAttributeType(name); Object value = null; if (type != null && type.isAssignableFrom(Expression.class) && !type.isAssignableFrom(Object.class)) { value = expression; } else { value = expression.evaluateRecurse(context); } dynaTag.setAttribute(name, value); } } else { // treat the tag as a bean DynaBean dynaBean = new ConvertingWrapDynaBean( tag ); for (Iterator iter = attributes.entrySet().iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry) iter.next(); String name = (String) entry.getKey(); Expression expression = ((ExpressionAttribute) entry.getValue()).exp; DynaProperty property = dynaBean.getDynaClass().getDynaProperty(name); if (property == null) { throw new JellyException("This tag does not understand the '" + name + "' attribute" ); } Class type = property.getType(); Object value = null; if (type.isAssignableFrom(Expression.class) && !type.isAssignableFrom(Object.class)) { value = expression; } else { value = expression.evaluateRecurse(context); } dynaBean.set(name, value); } } tag.doTag(output); if (output != null) { output.flush(); } } catch (JellyTagException e) { handleException(e); } catch (JellyException e) { handleException(e); } catch (IOException e) { handleException(e); } catch (RuntimeException e) { handleException(e); } catch (Error e) { /* * Not sure if we should be converting errors to exceptions, * but not trivial to remove because JUnit tags throw * Errors in the normal course of operation. Hmm... */ handleException(e); } finally { context.setRootURL(rootURL); context.setCurrentURL(currentURL); } } |
|
*/ | public void testResolver() throws Exception { TagLibrary library = resolver.resolveTagLibrary("jelly:test-library" ); assertTrue( "Found a tag library", library != null ); assertEquals( "Tag library is of the correct type", "org.apache.commons.jelly.test.impl.DummyTagLibrary", library.getClass().getName() ); } |
|
suite.addTestSuite(TestDeleteSelectedAction.class); | public static Test suite() { TestSuite suite = new TestSuite("Test for Architect's Swing GUI"); //$JUnit-BEGIN$ suite.addTestSuite(TestSwingUIProject.class); suite.addTestSuite(TestArchitectFrame.class); suite.addTestSuite(TestAutoLayoutAction.class); suite.addTestSuite(TestPlayPen.class); suite.addTestSuite(TestUndoManager.class); suite.addTestSuite(TestColumnEditPanel.class); suite.addTestSuite(TestSQLObjectUndoableEventAdapter.class); suite.addTestSuite(TestFruchtermanReingoldForceLayout.class); suite.addTestSuite(TestCompareDMPanel.class); suite.addTestSuite(TestTablePane.class); //$JUnit-END$ return suite; } |
|
while (node != null) { path.add(0, node); node = node.getParent(); | if (! (node instanceof DBTreeRoot)) { while (node != null) { path.add(0, node); node = node.getParent(); } | public SQLObject[] getPathToNode(SQLObject node) { LinkedList path = new LinkedList(); while (node != null) { path.add(0, node); node = node.getParent(); } path.add(0, root); return (SQLObject[]) path.toArray(new SQLObject[path.size()]); } |
schemaLabel.setText(((SQLSchema)(finalSchemaParent.getChild(0))).getNativeTerm()); | public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate catalog dropdown!"); catalogDropdown.removeAllItems(); catalogDropdown.setEnabled(false); // This is either a database, a catalog, or null depending on // how db is structured SQLObject schemaParent; if (db.isCatalogContainer()) { for (SQLObject item : (List<SQLObject>) db.getChildren()) { // Note: if you change the way this works, also update the RestoreSettingsListener catalogDropdown.addItem(item); // did you read the note? } // check if we need to do schemas SQLCatalog cat = (SQLCatalog) catalogDropdown .getSelectedItem(); schemaParent = null; if (cat == null) { // there are no catalogs (database is completely empty) catalogDropdown.setEnabled(false); } else { // there are catalogs, but they don't contain schemas catalogDropdown.setEnabled(true); } } else if (db.isSchemaContainer()) { schemaParent = db; catalogDropdown.setEnabled(false); } else { // database contains tables directly schemaParent = null; catalogDropdown.setEnabled(false); } schemaDropdown.removeAllItems(); schemaDropdown.setEnabled(false); if (schemaParent == null) { startCompareAction.setEnabled(isStartable()); } else { // need a final reference to this so we can use it in the // inner class final SQLObject finalSchemaParent = schemaParent; new Thread(new Populator() { @Override public void doStuff() throws Exception { ListerProgressBarUpdater progressBarUpdater = new ListerProgressBarUpdater(progressBar, this); new javax.swing.Timer(100, progressBarUpdater) .start(); // this populates the schema parent (populate is not // visible here) finalSchemaParent.getChildren(); } /** * Populates the schema dropdown box from the schema * parent that doStuff() populated. * * @throws ArchitectException */ @Override public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate schema dropdown!"); for (SQLObject item : (List<SQLObject>) finalSchemaParent .getChildren()) { schemaDropdown.addItem(item); } if (schemaDropdown.getItemCount() > 0) { schemaDropdown.setEnabled(true); } startCompareAction.setEnabled(isStartable()); } }).start(); } } |
|
schemaLabel.setText(((SQLSchema)(finalSchemaParent.getChild(0))).getNativeTerm()); | public void cleanup() throws ArchitectException { setCleanupExceptionMessage("Could not populate schema dropdown!"); for (SQLObject item : (List<SQLObject>) finalSchemaParent .getChildren()) { schemaDropdown.addItem(item); } if (schemaDropdown.getItemCount() > 0) { schemaDropdown.setEnabled(true); } startCompareAction.setEnabled(isStartable()); } |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.