PrintReads

Renders, in SAM/BAM format, all reads from the input data set in the order in which they appear in the input file.

Category Quality Control and Simple Analysis Tools


Introduction

PrintReads can dynamically merge the contents of multiple input BAM files, resulting in merged output sorted in coordinate order. Can also optionally filter reads based on the --read_filter command line argument.

Input

One or more bam files.

Output

A single processed bam file.

Examples

 java -Xmx2g -jar GenomeAnalysisTK.jar \
   -R ref.fasta \
   -T PrintReads \
   -o output.bam \
   -I input1.bam \
   -I input2.bam \
   --read_filter MappingQualityZero

 // Prints the first 2000 reads in the BAM file
 java -Xmx2g -jar GenomeAnalysisTK.jar \
   -R ref.fasta \
   -T PrintReads \
   -o output.bam \
   -I input.bam \
   -n 2000

 // Downsamples BAM file to 25%
 java -Xmx2g -jar GenomeAnalysisTK.jar \
   -R ref.fasta \
   -T PrintReads \
   -o output.bam \
   -I input.bam \
   -ds 0.25
 

PrintReads specific arguments

Name Type Default value Summary
Required
--out SAMFileWriter stdout Write output to this BAM filename instead of STDOUT
Optional
--downsample_coverage double 1.0 Downsample BAM to desired coverage
--number int -1 Print the first n reads from the file, discarding the rest
--platform String NA Exclude all reads with this platform from the output
--readGroup String NA Exclude all reads with this read group from the output
--sample_file Set[File] [] File containing a list of samples (one per line). Can be specified multiple times
--sample_name Set[String] [] Sample name to be included in the analysis. Can be specified multiple times.
--simplify boolean false Simplify all reads.

Additional capabilities

The arguments described in the entries below can be supplied to this tool to modify its behavior. For example, the -L argument directs the GATK engine restricts processing to specific genomic intervals. This capability is available to all GATK walkers.

Argument details

--downsample_coverage / -ds ( double with default value 1.0 )

Downsample BAM to desired coverage. Downsamples the bam file by the given ratio, printing only approximately the given percentage of reads. The downsampling is balanced (over the entire coverage)

--number / -n ( int with default value -1 )

Print the first n reads from the file, discarding the rest. Only prints the first n reads of the file

--out / -o ( SAMFileWriter with default value stdout )

Write output to this BAM filename instead of STDOUT.

--platform / -platform ( String )

Exclude all reads with this platform from the output. For example, --platform ILLUMINA or --platform 454.

--readGroup / -readGroup ( String )

Exclude all reads with this read group from the output.

--sample_file / -sf ( Set[File] with default value [] )

File containing a list of samples (one per line). Can be specified multiple times. Only reads from samples listed in the provided file(s) will be included in the output.

--sample_name / -sn ( Set[String] with default value [] )

Sample name to be included in the analysis. Can be specified multiple times.. Only reads from the sample(s) will be included in the output.

--simplify / -s ( boolean with default value false )

Simplify all reads.. Erase all extra attributes in the read but keep the read group information


See also Documentation index | GATK Site | GATK support forum

GATK version 2.3-9-ge5ebf34 built at 2013/01/11 22:47:55.