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

Method hasOnlyOneSequence

src/rnabloom/util/FileUtils.java:158–171  ·  view source on GitHub ↗
(String fasta)

Source from the content-addressed store, hash-verified

156 }
157
158 public static boolean hasOnlyOneSequence(String fasta) throws IOException {
159 FastaReader reader = new FastaReader(fasta);
160 int numSeq = 0;
161 while (reader.hasNext()) {
162 reader.next();
163 if (++numSeq > 1) {
164 reader.close();
165 return false;
166 }
167 }
168 reader.close();
169
170 return numSeq == 1;
171 }
172
173 public static void fileToStringCollection(String path, Collection<String> c) throws FileNotFoundException, IOException {
174 BufferedReader br = getTextFileReader(path);

Callers 2

overlapLayoutMethod · 0.80

Calls 3

hasNextMethod · 0.95
nextMethod · 0.95
closeMethod · 0.95

Tested by

no test coverage detected