-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADAM-1992] Make maximum FASTQ read length configurable. #2011
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ | |
* a single Text output. This is then fed into the FastqConverter, which | ||
* converts the single Text instance into two AlignmentRecords. | ||
*/ | ||
abstract class FastqRecordReader extends RecordReader<Void, Text> { | ||
public abstract class FastqRecordReader extends RecordReader<Void, Text> { | ||
/* | ||
* fastq format: | ||
* <fastq> := <block>+ | ||
|
@@ -60,6 +60,13 @@ abstract class FastqRecordReader extends RecordReader<Void, Text> { | |
* application. We'll see if someone complains in other applications. | ||
*/ | ||
|
||
public static final String MAX_READ_LENGTH_PROPERTY = "org.bdgenomics.adam.io.FastqRecordReader.MAX_READ_LENGTH"; | ||
|
||
public static void setMaxReadLength(Configuration conf, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code style: add javadocs, make parameters final |
||
int maxReadLength) { | ||
conf.setInt(MAX_READ_LENGTH_PROPERTY, maxReadLength); | ||
} | ||
|
||
/** | ||
* First valid data index in the stream. | ||
*/ | ||
|
@@ -104,7 +111,7 @@ abstract class FastqRecordReader extends RecordReader<Void, Text> { | |
/** | ||
* Maximum length for a read string. | ||
*/ | ||
private static final int MAX_LINE_LENGTH = 10000; | ||
private int MAX_LINE_LENGTH; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code style: lower camel case variable name |
||
|
||
/** | ||
* True if the underlying data is splittable. | ||
|
@@ -135,6 +142,8 @@ abstract class FastqRecordReader extends RecordReader<Void, Text> { | |
*/ | ||
protected FastqRecordReader(final Configuration conf, | ||
final FileSplit split) throws IOException { | ||
MAX_LINE_LENGTH = conf.getInt(MAX_READ_LENGTH_PROPERTY, 10000); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use |
||
|
||
file = split.getPath(); | ||
start = split.getStart(); | ||
end = start + split.getLength(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add