Changes

From Genome Analysis Wiki
Jump to: navigation, search

BamUtil: bam2FastQ

1,936 bytes added, 23:53, 5 March 2016
Parameters
= Parameters =
<pre>
Required Parameters: --in : the SAM/BAM file to convert to FastQ Optional Parameters: --readname : Process the BAM as readName sorted instead of coordinate if the header does not indicate a sort order. --splitRG : Split into RG specific fastqs. --qualField : Use the base quality from the specified tag rather than from the Quality field (default) --merge : Generate 1 interleaved (merged) FASTQ for paired-ends (unpaired in a separate file) use firstOut to override the filename of the interleaved file. --refFile : Reference file for converting '=' in the sequence to the actual base if '=' are found and the refFile is not specified, 'N' is written to the FASTQ --firstRNExt : read name extension to use for first read in a pair default is "/1" --secondRNExt : read name extension to use for second read in a pair default is "/2" --rnPlus : Add the Read Name/extension to the '+' line of the fastq records --noReverseComp : Do not reverse complement reads marked as reverse --region : Only convert reads containing the specified region/nucleotide. Position formatted as: chr:pos:base pos (0-based) & base are optional. --gzip : Compress the output FASTQ files using gzip --noeof : Do not expect an EOF block on a bam file. --params : Print the parameter settings to stderr Optional OutputFile Names: --outBase : Base output name for generated output files --firstOut : Output name for the first in pair file over-rides setting of outBase --secondOut : Output name for the second in pair file over-rides setting of outBase --unpairedOut : Output name for unpaired reads over-rides setting of outBase
</pre>
The file does not need to be strictly sorted by read name. The only requirement is that matching read names are next to each other.
 
=== Split into RG Specific FASTQs (<code>--splitRG</code>) ===
 
Create RG specific FASTQ files.
 
Cannot be specified with firstOut/secondOut/unpairedOut since there will be a different filename for each RG.
 
Cannot write to stdout when <code>--splitRG</code> is specified.
 
Output filenames will be <outBase>.<RG>_1.fastq, <outBase>.<RG>_2.fastq, and <outBase>.<RG>.fastq. A fastq list file <outBase>.list will be created containing MERGE_NAME (the RG tag's SM value or outBase if the value is empty), fastq 1, fastq 2 (or . if it is a single ended fastq), and the RG tag string.
 
=== Use the Base Quality from the Specified Tag (<code>--qualField</code>) ===
 
By default, the quality field is used for the Base Qualities in the FASTQ file. Specify <code>--qualField <tagName></code> to use the base qualities from the specified tag instead of the quality field.
 
=== Generate 1 Paired-End Output File (<code>--merge</code>) ===
Specifying <code>--noReverseComp</code> would result in a FASTQ sequence of ACCGTG
 
=== Only Convert the Specified Region (<code>--region</code>) ===
 
Only convert reads containing the specified region/nucleotide.
 
Position formatted as: chr:pos:base
 
pos (0-based) & base are optional.
{{noeofBGZFParameter}}

Navigation menu