• Diagnostics and Quality Control Tools
  • ASEReadCounter
  • AnalyzeCovariates
  • CallableLoci
  • CheckPileup
  • CompareCallableLoci
  • ContEst
  • CountBases
  • CountIntervals
  • CountLoci
  • CountMales
  • CountRODs
  • CountRODsByRef
  • CountReadEvents
  • CountReads
  • CountTerminusEvent
  • DepthOfCoverage
  • DiagnoseTargets
  • DiffObjects
  • ErrorRatePerCycle
  • FastaStats
  • FindCoveredIntervals
  • FlagStat
  • GCContentByInterval
  • GatherBqsrReports
  • Pileup
  • PrintRODs
  • QualifyMissingIntervals
  • ReadClippingStats
  • ReadGroupProperties
  • ReadLengthDistribution
  • SimulateReadsForVariants
  • Sequence Data Processing Tools
  • BaseRecalibrator
  • ClipReads
  • IndelRealigner
  • LeftAlignIndels
  • PrintReads
  • RealignerTargetCreator
  • SplitNCigarReads
  • SplitSamFile
  • Variant Discovery Tools
  • ApplyRecalibration
  • CalculateGenotypePosteriors
  • GATKPaperGenotyper
  • GenotypeGVCFs
  • HaplotypeCaller
  • MuTect2
  • RegenotypeVariants
  • UnifiedGenotyper
  • VariantRecalibrator
  • Variant Evaluation Tools
  • GenotypeConcordance
  • ValidateVariants
  • VariantEval
  • VariantFiltration
  • Variant Manipulation Tools
  • CatVariants
  • CombineGVCFs
  • CombineVariants
  • HaplotypeResolver
  • LeftAlignAndTrimVariants
  • PhaseByTransmission
  • RandomlySplitVariants
  • ReadBackedPhasing
  • SelectHeaders
  • SelectVariants
  • ValidationSiteSelector
  • VariantAnnotator
  • VariantsToAllelicPrimitives
  • VariantsToBinaryPed
  • VariantsToTable
  • VariantsToVCF

  • Annotation Modules
  • AS_BaseQualityRankSumTest
  • AS_FisherStrand
  • AS_InbreedingCoeff
  • AS_InsertSizeRankSum
  • AS_MQMateRankSumTest
  • AS_MappingQualityRankSumTest
  • AS_QualByDepth
  • AS_RMSMappingQuality
  • AS_ReadPosRankSumTest
  • AS_StrandOddsRatio
  • AlleleBalance
  • AlleleBalanceBySample
  • AlleleCountBySample
  • BaseCounts
  • BaseCountsBySample
  • BaseQualityRankSumTest
  • BaseQualitySumPerAlleleBySample
  • ChromosomeCounts
  • ClippingRankSumTest
  • ClusteredReadPosition
  • Coverage
  • DepthPerAlleleBySample
  • DepthPerSampleHC
  • ExcessHet
  • FisherStrand
  • FractionInformativeReads
  • GCContent
  • GenotypeSummaries
  • HaplotypeScore
  • HardyWeinberg
  • HomopolymerRun
  • InbreedingCoeff
  • LikelihoodRankSumTest
  • LowMQ
  • MVLikelihoodRatio
  • MappingQualityRankSumTest
  • MappingQualityZero
  • MappingQualityZeroBySample
  • NBaseCount
  • OxoGReadCounts
  • PossibleDeNovo
  • QualByDepth
  • RMSMappingQuality
  • ReadPosRankSumTest
  • SampleList
  • SnpEff
  • SpanningDeletions
  • StrandAlleleCountsBySample
  • StrandBiasBySample
  • StrandOddsRatio
  • TandemRepeatAnnotator
  • TransmissionDisequilibriumTest
  • VariantType
  • Read Filters
  • BadCigarFilter
  • BadMateFilter
  • CountingFilteringIterator.CountingReadFilter
  • DuplicateReadFilter
  • FailsVendorQualityCheckFilter
  • HCMappingQualityFilter
  • LibraryReadFilter
  • MalformedReadFilter
  • MappingQualityFilter
  • MappingQualityUnavailableFilter
  • MappingQualityZeroFilter
  • MateSameStrandFilter
  • MaxInsertSizeFilter
  • MissingReadGroupFilter
  • NoOriginalQualityScoresFilter
  • NotPrimaryAlignmentFilter
  • OverclippedReadFilter
  • Platform454Filter
  • PlatformFilter
  • PlatformUnitFilter
  • ReadGroupBlackListFilter
  • ReadLengthFilter
  • ReadNameFilter
  • ReadStrandFilter
  • ReassignMappingQualityFilter
  • ReassignOneMappingQualityFilter
  • ReassignOriginalMQAfterIndelRealignmentFilter
  • SampleFilter
  • SingleReadGroupFilter
  • UnmappedReadFilter
  • Resource File Codecs
  • BeagleCodec
  • BedTableCodec
  • RawHapMapCodec
  • RefSeqCodec
  • SAMPileupCodec
  • SAMReadCodec
  • TableCodec

  • Reference Utilities
  • FastaAlternateReferenceMaker
  • FastaReferenceMaker
  • QCRef
  • Showing docs for version 3.7-0


    PrintReads

    Write out sequence read data (for filtering, merging, subsetting etc)

    Category Sequence Data Processing Tools

    Traversal ReadWalker

    PartitionBy READ


    Overview

    PrintReads is a generic utility tool for manipulating sequencing data in SAM/BAM format. It can dynamically merge the contents of multiple input BAM files, resulting in merged output sorted in coordinate order. It can also optionally filter reads based on various read properties such as read group tags using the `--read_filter/-rf` command line argument (see documentation on read filters for more information).

    Note that when PrintReads is used as part of the Base Quality Score Recalibration workflow, it takes the `--BQSR` engine argument, which is listed under Inherited Arguments > CommandLineGATK below.

    Input

    One or more bam files.

    Output

    A single processed bam file.

    Usage examples

     // Prints all reads that have a mapping quality above zero
     java -jar GenomeAnalysisTK.jar \
       -T PrintReads \
       -R reference.fasta \
       -I input1.bam \
       -I input2.bam \
       -o output.bam \
       --read_filter MappingQualityZero
    
     // Prints the first 2000 reads in the BAM file
     java -jar GenomeAnalysisTK.jar \
       -T PrintReads \
       -R reference.fasta \
       -I input.bam \
       -o output.bam \
       -n 2000
    
     // Downsamples BAM file to 25%
     java -jar GenomeAnalysisTK.jar \
       -T PrintReads \
       -R reference.fasta \
       -I input.bam \
       -o output.bam \
       -dfrac 0.25
     

    Additional Information

    Read filters

    These Read Filters are automatically applied to the data by the Engine before processing by PrintReads.

    Parallelism options

    This tool can be run in multi-threaded mode using this option.

    Downsampling settings

    This tool does not apply any downsampling by default.


    Command-line Arguments

    Engine arguments

    All tools inherit arguments from the GATK Engine' "CommandLineGATK" argument collection, which can be used to modify various aspects of the tool's function. For example, the -L argument directs the GATK engine to restrict processing to specific genomic intervals; or the -rf argument allows you to apply certain read filters to exclude some of the data from the analysis.

    PrintReads specific arguments

    This table summarizes the command-line arguments that are specific to this tool. For more details on each argument, see the list further down below the table or click on an argument name to jump directly to that entry in the list.

    Argument name(s) Default value Summary
    Optional Outputs
    --out
     -o
    stdout Write output to this BAM filename instead of STDOUT
    Optional Parameters
    --number
     -n
    -1 Print the first n reads from the file, discarding the rest
    --platform
    NA Exclude all reads with this platform from the output
    --readGroup
    NA Exclude all reads with this read group from the output
    --sample_file
     -sf
    [] File containing a list of samples (one per line). Can be specified multiple times
    --sample_name
     -sn
    [] Sample name to be included in the analysis. Can be specified multiple times.
    Optional Flags
    --simplify
     -s
    false Simplify all reads

    Argument details

    Arguments in this list are specific to this tool. Keep in mind that other arguments are available that are shared with other tools (e.g. command-line GATK arguments); see Inherited arguments above.


    --number / -n

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

    int  -1  [ [ -∞  ∞ ] ]


    --out / -o

    Write output to this BAM filename instead of STDOUT

    GATKSAMFileWriter  stdout


    --platform / -platform

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

    String  NA


    --readGroup / -readGroup

    Exclude all reads with this read group from the output

    String  NA


    --sample_file / -sf

    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.

    Set[File]  []


    --sample_name / -sn

    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.

    Set[String]  []


    --simplify / -s

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

    boolean  false