Package htsjdk.samtools.fastq
Class FastqEncoder
java.lang.Object
htsjdk.samtools.fastq.FastqEncoder
Codec for encoding records into FASTQ format.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BiConsumer<FastqRecord, SAMRecord> static final BiConsumer<FastqRecord, SAMRecord> Encodes the quality header into the comment tag (use inasSAMRecord(FastqRecord, SAMFileHeader, BiConsumer). -
Method Summary
Modifier and TypeMethodDescriptionstatic FastqRecordasFastqRecord(SAMRecord record) Converts aSAMRecordinto aFastqRecord.static SAMRecordasSAMRecord(FastqRecord record, SAMFileHeader header) Converts aFastqRecordinto a simple unmappedSAMRecord.static SAMRecordasSAMRecord(FastqRecord record, SAMFileHeader header, BiConsumer<FastqRecord, SAMRecord> custom) Converts aFastqRecordinto a simple unmappedSAMRecord.static Stringencode(FastqRecord record) Encodes a FastqRecord in the String FASTQ format.static StringEncodes a SAMRecord in the String FASTQ format.static Appendablewrite(Appendable out, FastqRecord record) Writes a FastqRecord into the Appendable output.
-
Field Details
-
QUALITY_HEADER_TO_COMMENT_TAG
Encodes the quality header into the comment tag (use inasSAMRecord(FastqRecord, SAMFileHeader, BiConsumer).Note that all tabs present in the quality header are replaced by spaces.
-
QUALITY_HEADER_PARSE_SAM_TAGS
-
-
Method Details
-
encode
Encodes a FastqRecord in the String FASTQ format. -
write
Writes a FastqRecord into the Appendable output.- Throws:
SAMException- if any I/O error occurs.
-
encode
Encodes a SAMRecord in the String FASTQ format.- See Also:
-
asFastqRecord
Converts aSAMRecordinto aFastqRecord. -
asSAMRecord
Converts aFastqRecordinto a simple unmappedSAMRecord. -
asSAMRecord
public static SAMRecord asSAMRecord(FastqRecord record, SAMFileHeader header, BiConsumer<FastqRecord, SAMRecord> custom) Converts aFastqRecordinto a simple unmappedSAMRecord.This method allows to pass a
BiConsumerto add the information from the record in a customizable manner.- Parameters:
record- object to encode.header- header for the returned object.custom- function to customize encoding. Note that default information might be overriden.
-