MCPcopy Create free account
hub / github.com/BirolLab/RNA-Bloom / restoreQuartilesFromFile

Method restoreQuartilesFromFile

src/rnabloom/RNABloom.java:2681–2713  ·  view source on GitHub ↗
(String path)

Source from the content-addressed store, hash-verified

2679 }
2680
2681 public Quartiles restoreQuartilesFromFile(String path) throws IOException {
2682 Quartiles q = new Quartiles();
2683
2684 BufferedReader br = getTextFileReader(path);
2685 String line;
2686 while ((line = br.readLine()) != null) {
2687 String[] entry = line.split(LABEL_SEPARATOR);
2688 String key = entry[0];
2689 String val = entry[1];
2690 switch(key) {
2691 case LABEL_MIN:
2692 q.min = Integer.parseInt(val);
2693 break;
2694 case LABEL_Q1:
2695 q.q1 = Integer.parseInt(val);
2696 break;
2697 case LABEL_MEDIAN:
2698 q.median = Integer.parseInt(val);
2699 break;
2700 case LABEL_Q3:
2701 q.q3 = Integer.parseInt(val);
2702 break;
2703 case LABEL_MAX:
2704 q.max = Integer.parseInt(val);
2705 break;
2706 }
2707 }
2708 br.close();
2709
2710 longFragmentLengthThreshold = q.q1;
2711
2712 return q;
2713 }
2714
2715 private static int getPairedReadsMaxDistance(Quartiles q) {
2716 return q.q3 + ((q.q3 - q.q1) * 3 / 2); // 1.5*IQR

Callers 1

mainMethod · 0.95

Calls 2

getTextFileReaderMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected