Package picard.fastq

# Class SamToBfqWriter

java.lang.Object
picard.fastq.SamToBfqWriter

Direct Known Subclasses:
  `BamToBfqWriter`

public class SamToBfqWriter extends Object
Class to take unmapped reads in SAM/BAM/CRAM file format and create Maq binary fastq format file(s) -- one or two of them, depending on whether it's a paired-end read. This relies on the unmapped file having all paired reads together in order.

## Constructor Summary

Constructors
Constructor
Description
`SamToBfqWriter(File samFile, File referenceSequence, String outputPrefix, Integer total, Integer chunk, boolean pairedReads, String namePrefix, boolean includeNonPfReads, boolean clipAdapters, Integer basesToWrite)`
Constructor
`SamToBfqWriter(File samFile, String outputPrefix, boolean pairedReads, String namePrefix, boolean includeNonPfReads)`
Constructor

## Method Summary

Modifier and Type
Method
Description
`void`
`writeBfqFiles()`
Writes the binary fastq file(s) to the output directory

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SamToBfqWriter

public SamToBfqWriter(File samFile, File referenceSequence, String outputPrefix, Integer total, Integer chunk, boolean pairedReads, String namePrefix, boolean includeNonPfReads, boolean clipAdapters, Integer basesToWrite)
Constructor

Parameters:
  `samFile` - the BAM file to read from
  `outputPrefix` - the directory and file prefix for the binary fastq files
  `total` - the total number of records that should be written, drawn evenly from throughout the file (null for all).
  `chunk` - the maximum number of records that should be written to any one file
  `pairedReads` - whether these reads are from a paired-end run
  `namePrefix` - The string to be stripped off the read name before writing to the bfq file. May be null, in which case the name will not be trimmed.
  `includeNonPfReads` - whether to include non pf-reads
  `clipAdapters` - whether to replace adapters as marked with XT:i clipping position attribute

### SamToBfqWriter

public SamToBfqWriter(File samFile, String outputPrefix, boolean pairedReads, String namePrefix, boolean includeNonPfReads)
Constructor

Parameters:
  `samFile` - the BAM file to read from
  `outputPrefix` - the directory and file prefix for the binary fastq files
  `pairedReads` - whether these reads are from a paired-end run
  `namePrefix` - the barcode of the run (to be stripped off the read name before writing to the bfq file)
  `includeNonPfReads` - whether to include non pf-reads

## Method Details

### writeBfqFiles

public void writeBfqFiles()
Writes the binary fastq file(s) to the output directory