Category

Sam/Bam Manipulation


Usage

java -jar picard.jar SamToFastq I=input.bam FASTQ=output.fastq


Manual

INPUT (File)    Input SAM/BAM file to extract reads from Required.
FASTQ (File)    Output FASTQ file (single-end fastq or, if paired, first end of the pair FASTQ). Required. Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG)
SECOND_END_FASTQ (File)    Output FASTQ file (if paired, second end of the pair FASTQ). Default value: null. Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG)
UNPAIRED_FASTQ (File)    Output FASTQ file for unpaired reads; may only be provided in paired-FASTQ mode Default value: null. Cannot be used in conjuction with option(s) OUTPUT_PER_RG (OPRG)
OUTPUT_PER_RG (Boolean)    Output a FASTQ file per read group (two FASTQ files per read group if the group is paired). Default value: false. This option can be set to 'null' to clear the default value. Possible values: {true, false} Cannot be used in conjuction with option(s) SECOND_END_FASTQ (F2) UNPAIRED_FASTQ (FU) FASTQ (F)
RG_TAG (String)    The read group tag (PU or ID) to be used to output a FASTQ file per read group. Default value: PU. This option can be set to 'null' to clear the default value.
OUTPUT_DIR (File)    Directory in which to output the FASTQ file(s). Used only when OUTPUT_PER_RG is true. Default value: null.
RE_REVERSE (Boolean)    Re-reverse bases and qualities of reads with negative strand flag set before writing them to FASTQ Default value: true. This option can be set to 'null' to clear the default value. Possible values: {true, false}
INTERLEAVE (Boolean)    Will generate an interleaved fastq if paired, each line will have /1 or /2 to describe which end it came from Default value: false. This option can be set to 'null' to clear the default value. Possible values: {true, false}
INCLUDE_NON_PF_READS (Boolean)    Include non-PF reads from the SAM file into the output FASTQ files. PF means 'passes filtering'. Reads whose 'not passing quality controls' flag is set are non-PF reads. See GATK Dictionary for more info. Default value: false. This option can be set to 'null' to clear the default value. Possible values: {true, false}
CLIPPING_ATTRIBUTE (String)    The attribute that stores the position at which the SAM record should be clipped Default value: null.
CLIPPING_ACTION (String)    The action that should be taken with clipped reads: 'X' means the reads and qualities should be trimmed at the clipped position; 'N' means the bases should be changed to Ns in the clipped region; and any integer means that the base qualities should be set to that value in the clipped region. Default value: null.
CLIPPING_MIN_LENGTH (Integer)    When performing clipping with the CLIPPING_ATTRIBUTE and CLIPPING_ACTION parameters, ensure that the resulting reads after clipping are at least CLIPPING_MIN_LENGTH bases long. If the original read is shorter than CLIPPING_MIN_LENGTH then the original read length will be maintained. Default value: 0. This option can be set to 'null' to clear the default value.
READ1_TRIM (Integer)    The number of bases to trim from the beginning of read 1. Default value: 0. This option can be set to 'null' to clear the default value.
READ1_MAX_BASES_TO_WRITE (Integer)    The maximum number of bases to write from read 1 after trimming. If there are fewer than this many bases left after trimming, all will be written. If this value is null then all bases left after trimming will be written. Default value: null.
READ2_TRIM (Integer)    The number of bases to trim from the beginning of read 2. Default value: 0. This option can be set to 'null' to clear the default value.
READ2_MAX_BASES_TO_WRITE (Integer)    The maximum number of bases to write from read 2 after trimming. If there are fewer than this many bases left after trimming, all will be written. If this value is null then all bases left after trimming will be written. Default value: null.
QUALITY (Integer)    End-trim reads using the phred/bwa quality trimming algorithm and this quality. Default value: null.
INCLUDE_NON_PRIMARY_ALIGNMENTS (Boolean)    If true, include non-primary alignments in the output. Support of non-primary alignments in SamToFastq is not comprehensive, so there may be exceptions if this is set to true and there are paired reads with non-primary alignments. Default value: false. This option can be set to 'null' to clear the default value. Possible values: {true, false}


Share your experience or ask a question