Updated documentation
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2363 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
4322beeb35
commit
d8cfd707bc
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/**
|
||||||
* To change this template, choose Tools | Templates
|
* File reader used by other Walkers to read HLA allele frequencies.
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.broadinstitute.sting.playground.gatk.walkers.HLAcaller;
|
package org.broadinstitute.sting.playground.gatk.walkers.HLAcaller;
|
||||||
|
|
@ -13,12 +12,16 @@ import java.util.Hashtable;
|
||||||
*/
|
*/
|
||||||
public class FrequencyFileReader {
|
public class FrequencyFileReader {
|
||||||
Hashtable AlleleFrequencies = new Hashtable();
|
Hashtable AlleleFrequencies = new Hashtable();
|
||||||
|
Hashtable UniqueAlleles = new Hashtable();
|
||||||
|
|
||||||
public Hashtable GetAlleleFrequencies(){
|
public Hashtable GetAlleleFrequencies(){
|
||||||
return AlleleFrequencies;
|
return AlleleFrequencies;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReadFile(String filename){
|
public Hashtable GetUniqueAlleles(){
|
||||||
|
return UniqueAlleles;
|
||||||
|
}
|
||||||
|
public void ReadFile(String filename, String uniqueAllelesFile){
|
||||||
try{
|
try{
|
||||||
FileInputStream fstream = new FileInputStream(filename);
|
FileInputStream fstream = new FileInputStream(filename);
|
||||||
DataInputStream in = new DataInputStream(fstream);
|
DataInputStream in = new DataInputStream(fstream);
|
||||||
|
|
@ -31,6 +34,16 @@ public class FrequencyFileReader {
|
||||||
//System.out.printf("Loaded: %s\t%s\n",s[0],AlleleFrequencies.get(s[0]).toString());
|
//System.out.printf("Loaded: %s\t%s\n",s[0],AlleleFrequencies.get(s[0]).toString());
|
||||||
}
|
}
|
||||||
in.close();
|
in.close();
|
||||||
|
|
||||||
|
fstream = new FileInputStream(uniqueAllelesFile);
|
||||||
|
in = new DataInputStream(fstream);
|
||||||
|
br = new BufferedReader(new InputStreamReader(in));
|
||||||
|
//Read File Line By Line
|
||||||
|
while ((strLine = br.readLine()) != null) {
|
||||||
|
UniqueAlleles.put(strLine,strLine);
|
||||||
|
//System.out.printf("Loaded: %s\t%s\n",s[0],AlleleFrequencies.get(s[0]).toString());
|
||||||
|
}
|
||||||
|
in.close();
|
||||||
}catch (Exception e){//Catch exception if any
|
}catch (Exception e){//Catch exception if any
|
||||||
System.err.println("FrequencyFileReader Error: " + e.getMessage());
|
System.err.println("FrequencyFileReader Error: " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue