Ignore:
Timestamp:
04/07/09 15:40:03 (3 years ago)
Author:
jvelde
Message:
 
Location:
molgenis4xgap_importwizard/handwritten/java/cistransanalysis3
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • molgenis4xgap_importwizard/handwritten/java/cistransanalysis3/Run.java

    r1910 r1912  
    5252                for(int index=0; index<intervalGenes.size();index++){ 
    5353                        Marker m = Step3456.getMarkerInfo(db, intervalGenes.get(index).getEr().getMarkerName()); 
    54                         pw.println("Interval of " + intervalGenes.get(index).getEr().getTraitname() + " on chr " + m.getChr() + " has " + intervalGenes.get(index).getGenesFromInterval().size() + " genes (cM = " + intervalGenes.get(index).getEr().getCiLower() + " to " 
    55                                         + intervalGenes.get(index).getEr().getCiUpper() + ")"); 
     54                        pw.println("Interval of " + intervalGenes.get(index).getEr().getTraitname() + " on chr " + m.getChr() + " has " + intervalGenes.get(index).getGenesFromInterval().size() + " genes."); 
    5655 
    5756                } 
     
    119118                String[] pathways = new String[]{"carotenoids","flavonols", "glucosinolate", "phenylpropanoid", "tocopherol", "folate"}; 
    120119                 
    121                 //String[] pathways = new String[]{"phenylpropanoid"}; 
     120                //String[] pathways = new String[]{"glucosinolate"}; 
    122121                 
    123122                PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("D:/data/xgapdata/Frank_for_dbGG/cistransanalysis/results/output.txt"))); 
  • molgenis4xgap_importwizard/handwritten/java/cistransanalysis3/Step3456.java

    r1910 r1912  
    3535        { 
    3636                List<EQTLResultMap> intervalGenes = new ArrayList<EQTLResultMap>(); 
    37                  
    38                 System.out.println("getting all markers"); 
     37 
     38                // System.out.println("getting all markers"); 
    3939                List<Marker> allMarkers = db.find(Marker.class); 
    4040 
    4141                for (IntervalPeakResult er : reducedList2) 
    4242                { 
    43                         System.out.println("getting marker/gene info"); 
     43                        // System.out.println("getting marker/gene info"); 
    4444                        Marker m = getMarkerInfo(db, er.getMarkerName()); 
    4545                        Gene g = getGeneInfo(db, er.getTraitname()); 
    46                         System.out.println("\tdone"); 
     46                        // System.out.println("\tdone"); 
    4747 
    4848                        // Step 3 & 4 - get confidence intervals, and select closest markers 
    49                         System.out.println("getting closest markers"); 
     49                        // System.out.println("getting closest markers"); 
    5050                        Marker ciLowerClosestMarker = findMarkerClosestToCM(allMarkers, er.getCiLower(), Integer.parseInt(m 
    5151                                        .getChr())); 
    5252                        Marker ciUpperClosestMarker = findMarkerClosestToCM(allMarkers, er.getCiUpper(), Integer.parseInt(m 
    5353                                        .getChr())); 
    54                         System.out.println("\tdone"); 
     54                        // System.out.println("\tdone"); 
     55                         
     56                        if(ciLowerClosestMarker.getName().equals(ciUpperClosestMarker.getName())){ 
     57                                String warning = "WARNING: the same markers ("+ciLowerClosestMarker.getName()+") mapped for interval positions"; 
     58                                System.out.println(warning); 
     59                                pw.println(warning); 
     60                        } 
    5561 
    5662                        // Step 5 - get the bp positions of thse markers 
     
    6167                        List<Gene> genesFromInterval = findGenesFromInterval(db, Integer.parseInt(m.getChr()), lowerBp, upperBp); 
    6268 
    63                         boolean isCis = checkIfCis(er, m, g); 
     69                        boolean isCis = checkIfCis(m, g, ciLowerClosestMarker.getBpStart(), ciUpperClosestMarker.getBpStart()); 
    6470 
    6571                        if (!isCis) 
     
    6773                                intervalGenes.add(new EQTLResultMap(er, genesFromInterval, isCis, (((double) lowerBp) / 1000000.0), 
    6874                                                (((double) upperBp) / 1000000.0))); 
    69                                 pw.println((isCis ? "Cis" : "Trans") + " QTL of " + er.getTraitname() + " at marker " 
    70                                                 + er.getMarkerName() + " on chr " + g.getChr() + " has interval: " + lowerBp + "bp to " 
    71                                                 + upperBp + "bp on chr " + Integer.parseInt(m.getChr()) + ". Closest markers: " 
    72                                                 + ciLowerClosestMarker.getName() + " to " + ciUpperClosestMarker.getName()); 
    73  
    74                                 System.out.println((isCis ? "Cis" : "Trans") + " QTL of " + er.getTraitname() + " at marker " 
    75                                                 + er.getMarkerName() + " on chr " + g.getChr() + " has interval: " + lowerBp + "bp to " 
    76                                                 + upperBp + "bp on chr " + Integer.parseInt(m.getChr()) + ". Closest markers: " 
    77                                                 + ciLowerClosestMarker.getName() + " to " + ciUpperClosestMarker.getName()); 
    78                                  
     75 
     76                                String info = (isCis ? "Cis" : "Trans") + " QTL of " + er.getTraitname() + " (~" + meanGeneBpPos(g) 
     77                                                + "bp, chr " + g.getChr() + ") at marker " + er.getMarkerName() + " (" + m.getCM() + "cM, chr " 
     78                                                + m.getChr() + ")" + " has interval mapped to true markers: " + ciLowerClosestMarker.getName() 
     79                                                + " (" + ciLowerClosestMarker.getCM() + "cM, " + ciLowerClosestMarker.getBpStart() + "bp) and " 
     80                                                + ciUpperClosestMarker.getName() + " (" + ciUpperClosestMarker.getCM() + "cM, " 
     81                                                + ciUpperClosestMarker.getBpStart() + "bp)."; 
     82 
     83                                pw.println(info); 
     84                                System.out.println(info); 
     85 
    7986                        } 
    8087 
     
    94101        } 
    95102 
    96         private boolean checkIfCis(IntervalPeakResult er, Marker m, Gene g) 
    97         { 
    98                 if (g.getChr() == m.getChr()) 
    99                 { 
    100                         if (m.getCM() > er.getCiLower() && m.getCM() < er.getCiUpper()) 
     103        private boolean checkIfCis(Marker m, Gene g, long ciLowerBp, long ciUpperBp) 
     104        { 
     105                if (g.getChr().equals(m.getChr())) 
     106                { 
     107                        long geneBpPos = meanGeneBpPos(g); 
     108 
     109                        if (geneBpPos > ciLowerBp && geneBpPos < ciUpperBp) 
    101110                        { 
    102111                                return true; 
     
    104113                } 
    105114                return false; 
     115        } 
     116 
     117        static long meanGeneBpPos(Gene g) 
     118        { 
     119                long geneBpPos; 
     120                if (g.getBpStart() < g.getBpEnd()) 
     121                { 
     122                        geneBpPos = g.getBpStart() + ((long) g.getBpEnd() - (long) g.getBpStart()) / (long) 2.0; 
     123                } 
     124                else if (g.getBpStart() > g.getBpEnd()) 
     125                { 
     126                        geneBpPos = g.getBpEnd() + ((long) g.getBpStart() - (long) g.getBpEnd()) / (long) 2.0; 
     127                } 
     128                else 
     129                { 
     130                        geneBpPos = g.getBpStart(); 
     131                } 
     132                return geneBpPos; 
     133        } 
     134         
     135        static long meanGeneBpPos(BiosynthGene g) 
     136        { 
     137                long geneBpPos; 
     138                if (g.getBpStart() < g.getBpEnd()) 
     139                { 
     140                        geneBpPos = g.getBpStart() + ((long) g.getBpEnd() - (long) g.getBpStart()) / (long) 2.0; 
     141                } 
     142                else if (g.getBpStart() > g.getBpEnd()) 
     143                { 
     144                        geneBpPos = g.getBpEnd() + ((long) g.getBpStart() - (long) g.getBpEnd()) / (long) 2.0; 
     145                } 
     146                else 
     147                { 
     148                        geneBpPos = g.getBpStart(); 
     149                } 
     150                return geneBpPos; 
    106151        } 
    107152 
     
    128173        private Marker findMarkerClosestToCM(List<Marker> allMarkers, double cM, int chr) 
    129174        { 
    130                 System.out.println("finding marker..."); 
    131175                double smallestDiff = -1; 
    132176                Marker closestMarker = null; 
  • molgenis4xgap_importwizard/handwritten/java/cistransanalysis3/Step78.java

    r1910 r1912  
    1717 
    1818import org.apache.commons.math.MathException; 
     19import org.apache.commons.math.stat.descriptive.moment.Mean; 
    1920import org.apache.commons.math.stat.regression.SimpleRegression; 
    2021import org.molgenis.assets.data.DatabaseException; 
     
    4445                                + " for Pearson's product moment correlation coefficient\n"); 
    4546 
     47                List<Marker> allMarkers = db.find(Marker.class); 
     48                 
    4649                Map<IntervalPeakResult, List<Correlation>> correlatedGenes = new HashMap<IntervalPeakResult, List<Correlation>>(); 
    4750 
     
    5760                        if (intervalGenes.get(index).getGenesFromInterval().size() > 0) 
    5861                        { 
    59                                  
     62 
    6063                                Marker mt = Step3456.getMarkerInfo(db, intervalGenes.get(index).getEr().getMarkerName()); 
    6164                                Gene gt = Step3456.getGeneInfo(db, intervalGenes.get(index).getEr().getTraitname()); 
    6265 
    63                                 pw.println("Investigating all " + intervalGenes.get(index).getGenesFromInterval().size() 
    64                                                 + " genes within the QTL confidence interval at chr " 
    65                                                 + mt.getChr() + " of gene " 
    66                                                 + intervalGenes.get(index).getEr().getTraitname() + ", located at chr " 
    67                                                 + gt.getChr() + ""); 
    68                                  
    69                                 System.out.println("Investigating all " + intervalGenes.get(index).getGenesFromInterval().size() 
    70                                                 + " genes within the QTL confidence interval at chr " 
    71                                                 + mt.getChr() + " of gene " 
    72                                                 + intervalGenes.get(index).getEr().getTraitname() + ", located at chr " 
    73                                                 + gt.getChr() + ""); 
     66                                String info = "Investigating all " + intervalGenes.get(index).getGenesFromInterval().size() 
     67                                                + " genes within the QTL confidence interval at chr " + mt.getChr() + " of gene " 
     68                                                + intervalGenes.get(index).getEr().getTraitname() + ", located at chr " + gt.getChr(); 
     69 
     70                                pw.println(info); 
     71                                System.out.println(info); 
    7472 
    7573                                for (Gene g : intervalGenes.get(index).getGenesFromInterval()) 
    7674                                { 
    77  
    78                                         int GeneID = db.find(Gene.class, new QueryRule("name", Operator.EQUALS, g.getName())).get(0) 
    79                                                         .getId(); 
    80                                         QueryRule row = new QueryRule("row", Operator.EQUALS, GeneID); 
    81                                         List<DecimalDataElement> genePVals = db.find(DecimalDataElement.class, data, row); 
    82  
    8375                                        for (BiosynthGene bg : biosynthGenes) 
    8476                                        { 
     77                                                // onderzochte trait moet een pathway gene zijn 
    8578                                                if (bg.getAgiId().equals(intervalGenes.get(index).getEr().getTraitname())) 
    8679                                                { 
    87  
     80                                                        // interval gene mag niet dezelfde zijn als dit gene 
     81                                                        // (correlation 1.0) 
    8882                                                        if (!g.getName().equals(bg.getAgiId())) 
    8983                                                        { 
     84                                                                int GeneID = db.find(Gene.class, new QueryRule("name", Operator.EQUALS, g.getName())) 
     85                                                                                .get(0).getId(); 
     86                                                                QueryRule row = new QueryRule("row", Operator.EQUALS, GeneID); 
     87                                                                List<DecimalDataElement> genePVals = db.find(DecimalDataElement.class, data, row); 
     88 
    9089                                                                double corr = correlate(genePVals, biosynthExpressionMap.get(bg.getAgiId())); 
     90 
     91                                                                double mean1 = mean(genePVals); 
     92                                                                double mean2 = mean(biosynthExpressionMap.get(bg.getAgiId())); 
    9193                                                                 
    92                                                                  
    93                                                                  
    94 //                                                              if (corr > thresholdCorrStep8 || -corr > thresholdCorrStep8) 
    95 //                                                              { 
    96  
    97                                                                         boolean isCisCorrelation = isCisCorrelation(bg, intervalGenes.get(index), mt); 
    98                                                                         Correlation corrObj = new Correlation(g, bg, corr, isCisCorrelation); 
    99                                                                         correlatedGenesList.add(corrObj); 
    100 //                                                              } 
    101                                                                  
    102                                                                  
     94                                                                // if (corr > thresholdCorrStep8 || -corr > 
     95                                                                // thresholdCorrStep8) 
     96                                                                // { 
     97 
     98                                                                boolean isCisCorrelation = isCisCorrelation(bg, intervalGenes.get(index), mt); 
     99                                                                Correlation corrObj = new Correlation(g, bg, corr, isCisCorrelation, mean1, mean2); 
     100                                                                correlatedGenesList.add(corrObj); 
     101                                                                // } 
     102 
    103103                                                        } 
    104104                                                } 
     
    121121                        else 
    122122                        { 
    123 //                              pw.println("\tA total of " + correlatedGenesList.size() + " genes correlated with known " + pathway 
    124 //                                              + " genes located elsewhere."); 
    125                         } 
    126                          
     123                                // pw.println("\tA total of " + correlatedGenesList.size() + 
     124                                // " genes correlated with known " + pathway 
     125                                // + " genes located elsewhere."); 
     126                        } 
     127 
    127128                        Collections.sort(correlatedGenesList, new SortCorrelationList()); 
    128                         correlatedGenesList = correlatedGenesList.subList(0, correlatedGenesList.size() > 10 ? 10 : correlatedGenesList.size()); 
    129                          
    130                         for(Correlation c : correlatedGenesList){        
    131                                 if (c.isCis()) 
     129                        correlatedGenesList = correlatedGenesList.subList(0, correlatedGenesList.size() > 20 ? 20 
     130                                        : correlatedGenesList.size()); 
     131 
     132                        for (Correlation c : correlatedGenesList) 
     133                        { 
     134//                              if (c.isCis()) 
     135//                              { 
     136//                                      pw.print("\tCorr. (near): "); 
     137//                              } 
     138//                              else 
     139//                              { 
     140//                                      pw.print("\tCorr. (far): "); 
     141//                              } 
     142                                 
     143                                Marker m1 = findMarkerClosestToBp(allMarkers, (int)Step3456.meanGeneBpPos(c.getGene()), Integer.parseInt(c.getGene().getChr())); 
     144                                Marker m2 = findMarkerClosestToBp(allMarkers, (int)Step3456.meanGeneBpPos(c.getBiosynthGene()), c.getBiosynthGene().getChromosome()); 
     145                                 
     146                                double lod1 = getLOD(c.getGene().getName(), m1, db); 
     147                                double lod2 = getLOD(c.getBiosynthGene().getAgiId(), m2, db); 
     148                                 
     149                                double avgExpr1 = c.getAvgOfGene(); 
     150                                double avgExpr2 = c.getAvgOfBiosynthGene(); 
     151                                 
     152                                String info = c.getGene().getName() + " (chr " + c.getGene().getChr() + ", " 
     153                                                + Step3456.meanGeneBpPos(c.getGene()) + "bp, LOD at closest marker = "+lod1+", avg. expr. = "+avgExpr1+") correlates with " + c.getBiosynthGene().getAgiId() 
     154                                                + " (chr " + c.getBiosynthGene().getChromosome() + ", ~" 
     155                                                + Step3456.meanGeneBpPos(c.getBiosynthGene()) + "bp, LOD at closest marker = "+lod2+", avg. expr. = "+avgExpr2+"), strength = " + c.getCorrelation(); 
     156 
     157                                pw.println(info); 
     158                                System.out.println(info); 
     159                        } 
     160 
     161                        correlatedGenes.put(intervalGenes.get(index).getEr(), correlatedGenesList); 
     162                } 
     163                this.setCorrelatedGenes(correlatedGenes); 
     164        } 
     165         
     166        private double mean(List<DecimalDataElement> genePVals) 
     167        { 
     168                double total = 0; 
     169                for(DecimalDataElement d : genePVals){ 
     170                        total += d.getValue(); 
     171                } 
     172                return total / ((double)genePVals.size()); 
     173        } 
     174 
     175        private double getLOD(String geneName, Marker m, JDBCDatabase db) throws DatabaseException{ 
     176                int dataID = db.find(Data.class, new QueryRule("name", Operator.EQUALS, "Gene_lodscores")).get(0).getId(); 
     177                int geneID = db.find(Gene.class, new QueryRule("name", Operator.EQUALS, geneName)).get(0).getId(); 
     178                 
     179                QueryRule data = new QueryRule("data", Operator.EQUALS, dataID); 
     180                QueryRule row = new QueryRule("row", Operator.EQUALS, geneID); 
     181                QueryRule col = new QueryRule("col", Operator.EQUALS, m.getId()); 
     182                 
     183                return db.find(DecimalDataElement.class, data, row, col).get(0).getValue(); 
     184        } 
     185         
     186        private Marker findMarkerClosestToBp(List<Marker> allMarkers, int bp, int chr) 
     187        { 
     188                double smallestDiff = -1; 
     189                Marker closestMarker = null; 
     190                for (Marker tryMarker : allMarkers) 
     191                { 
     192                        if (tryMarker.getBpStart() != (long) 0) 
     193                        { 
     194                                if (Integer.parseInt(tryMarker.getChr()) == chr) 
    132195                                { 
    133                                         pw.print("\tCorr. (cis): "); 
     196                                        double diff = Math.abs(tryMarker.getBpStart() - bp); 
     197 
     198                                        if (diff < smallestDiff && smallestDiff != -1) 
     199                                        { 
     200                                                smallestDiff = diff; 
     201                                                closestMarker = tryMarker; 
     202                                        } 
     203                                        else if (smallestDiff == -1) 
     204                                        { 
     205                                                smallestDiff = diff; 
     206                                                closestMarker = tryMarker; 
     207                                        } 
    134208                                } 
    135                                 else 
    136                                 { 
    137                                         pw.print("\tCorr. (trans): "); 
    138                                 } 
    139                                 pw.println(c.getGene().getName() + " (chr " + c.getGene().getChr() 
    140                                                 + ") correlates with " + c.getBiosynthGene().getAgiId() + ", strength = " + c.getCorrelation()); 
    141                                  
    142                                 System.out.println(c.getGene().getName() + " (chr " + c.getGene().getChr() 
    143                                                 + ") correlates with " + c.getBiosynthGene().getAgiId() + ", strength = " + c.getCorrelation()); 
    144                         } 
    145                          
    146                          
    147                          
    148                         correlatedGenes.put(intervalGenes.get(index).getEr(), correlatedGenesList); 
    149                 } 
    150                 this.setCorrelatedGenes(correlatedGenes); 
     209                        } 
     210                } 
     211                return closestMarker; 
    151212        } 
    152213 
    153214        private boolean isCisCorrelation(BiosynthGene bg, EQTLResultMap resultMap, Marker m) 
    154215        { 
    155                 if (bg.getChromosome() == (int)Integer.parseInt(m.getChr())) 
    156                 { 
     216                // System.out.println("*** isCisCorrelation?"); 
     217                // System.out.println("\tbg.getChromosome() = " + bg.getChromosome() + 
     218                // ", m.getChr() = " + m.getChr()); 
     219                if (bg.getChromosome() == (int) Integer.parseInt(m.getChr())) 
     220                { 
     221                        // System.out.println("\tYES"); 
     222                        // System.out.println("\tbg.getMbPos() = " + bg.getMbPos()+ 
     223                        // ", IntervalMbStart() = " + resultMap.getIntervalMbStart() + 
     224                        // ", IntervalMbEnd() = " + resultMap.getIntervalMbEnd()); 
     225                        // System.out.println("\tbg > start && bg < end?"); 
    157226                        if (bg.getMbPos() > resultMap.getIntervalMbStart() && bg.getMbPos() < resultMap.getIntervalMbEnd()) 
    158227                        { 
     228                                // System.out.println("\tYES"); 
    159229                                return true; 
    160230                        } 
     
    181251        } 
    182252 
    183         private String printGene(Gene g) 
    184         { 
    185                 String print = ""; 
    186                 print += "chr = " + g.getChr() + ", "; 
    187                 print += "bpstr = " + g.getBpStart() + ", "; 
    188                 print += "bpend = " + g.getBpEnd(); 
    189                 return print; 
    190         } 
    191  
    192         private String printBiosynthGene(BiosynthGene bg) 
    193         { 
    194                 String print = ""; 
    195                 print += "abbr = " + bg.getGeneAbbr() + ", "; 
    196                 print += "prot = " + bg.getProtein() + ", "; 
    197                 print += "pathw = " + bg.getPathway() + ", "; 
    198                 print += "orien = " + bg.getOrientation() + ", "; 
    199                 print += "chr = " + bg.getChromosome() + ", "; 
    200                 print += "bpstr = " + bg.getBpStart() + ", "; 
    201                 print += "bpend = " + bg.getBpEnd() + ", "; 
    202                 print += "mbpos = " + bg.getMbPos(); 
    203                 return print; 
    204         } 
    205  
    206         private BiosynthGene getBiosynthGene(Gene gene, List<BiosynthGene> biosynthGenes) 
    207         { 
    208                 for (BiosynthGene bg : biosynthGenes) 
    209                 { 
    210                         if (bg.getAgiId().equals(gene.getName())) 
    211                         { 
    212                                 return bg; 
    213                         } 
    214                 } 
    215                 return null; 
    216         } 
    217  
    218253        private double correlate(List<DecimalDataElement> genePVals, List<DecimalDataElement> corrGenePVals) 
    219254                        throws MathException 
     
    244279} 
    245280 
    246  
    247 class SortCorrelationList implements Comparator<Correlation>{ 
    248     public int compare(Correlation c1, Correlation c2) { 
    249         return ((Double)(Math.abs(c2.getCorrelation()))).compareTo((Double)(Math.abs(c1.getCorrelation()))); 
    250     } 
     281class SortCorrelationList implements Comparator<Correlation> 
     282{ 
     283        public int compare(Correlation c1, Correlation c2) 
     284        { 
     285                return ((Double) (Math.abs(c2.getCorrelation()))).compareTo((Double) (Math.abs(c1.getCorrelation()))); 
     286        } 
    251287} 
    252288 
    253289class Correlation 
    254290{ 
    255         public Correlation(Gene gene, BiosynthGene biosynthGene, double correlation, boolean isCis) 
     291        public Correlation(Gene gene, BiosynthGene biosynthGene, double correlation, boolean isCis, double avgOfGene, double avgOfBiosynthGene) 
    256292        { 
    257293                this.gene = gene; 
     
    259295                this.correlation = correlation; 
    260296                this.isCis = isCis; 
     297                this.avgOfGene = avgOfGene; 
     298                this.avgOfBiosynthGene = avgOfBiosynthGene; 
    261299        } 
    262300 
     
    266304        boolean isCis; 
    267305         
    268         public boolean isCis(){ 
     306        double avgOfGene; 
     307        double avgOfBiosynthGene; 
     308         
     309         
     310 
     311        public double getAvgOfGene() 
     312        { 
     313                return avgOfGene; 
     314        } 
     315 
     316        public double getAvgOfBiosynthGene() 
     317        { 
     318                return avgOfBiosynthGene; 
     319        } 
     320 
     321        public boolean isCis() 
     322        { 
    269323                return isCis; 
    270324        } 
  • molgenis4xgap_importwizard/handwritten/java/cistransanalysis3/makeUniqueSortAndPrint.java

    r1910 r1912  
    2424                 
    2525                Collections.sort(uniqCorr, new SortSimpleCorrelation()); 
    26                 pw.println("UnknownGene_name\tUnknownGene_chr\tUnknownGene_isPathwayGene\tPathwayGene_name\tPathwayGene_chr\tCorrelationStrength"); 
     26                pw.println("UnknownGene_name\tUnknownGene_chr\tPathwayGene_name\tPathwayGene_chr\tCorrelationStrength"); 
    2727                for (SimpleCorrelation sc : uniqCorr) { 
    28                         pw.println(sc.getGene1() + "\t" + sc.getChrOfGene1() + "\t" + sc.isPathwayGene1() + "\t" + sc.getGene2()  + "\t" + sc.getChrOfGene2() + "\t" + sc.getCorr()); 
     28                        pw.println(sc.getGene1() + "\t" + sc.getChrOfGene1() + "\t" + sc.getGene2()  + "\t" + sc.getChrOfGene2() + "\t" + sc.getCorr()); 
    2929                } 
    3030                 
    3131                pw.println("___________\n"); 
    32         } 
    33          
    34         private String cisOrTrans(int chrOfGene1, int chrOfGene2) 
    35         { 
    36                 if(chrOfGene1==chrOfGene2){ 
    37                         return "cis"; 
    38                 }else{ 
    39                         return "trans"; 
    40                 } 
    4132        } 
    4233 
Note: See TracChangeset for help on using the changeset viewer.