Skip to content

Instantly share code, notes, and snippets.

@fac2003
Created June 3, 2012 15:57
Show Gist options
  • Save fac2003/2863978 to your computer and use it in GitHub Desktop.
Save fac2003/2863978 to your computer and use it in GitHub Desktop.
Parsing a Goby reads file
final String inputFilename = "input.compact-reads";
final MutableString sequence = new MutableString();
final ReadsReader reader = new ReadsReader(new FileInputStream(inputFilename));
for (final Reads.ReadEntry readEntry : reader) {
ReadsReader.decodeSequence(readEntry, sequence);
System.out.printf("read-index: %d read-id: %s sequence: %s %n",
readEntry.getReadIndex(),
readEntry.hasReadIdentifier() ? readEntry.getReadIdentifier() : "",
sequence);
}
@fac2003
Copy link
Author

fac2003 commented Jun 3, 2012

Demonstrate how to parse/iterate through a Goby .compact reads file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment