If you happen to see a question you know the answer to, please do chime in and help your fellow community members. We encourage our fourm members to be more involved, jump in and help out your fellow researchers with their questions. GATK forum is a community forum and helping each other with using GATK tools and research is the cornerstone of our success as a genomics research community.We appreciate your help!

Test-drive the GATK tools and Best Practices pipelines on Terra

Check out this blog post to learn how you can get started with GATK and try out the pipelines in preconfigured workspaces (with a user-friendly interface!) without having to install anything.
We will be out of the office on November 11th and 13th 2019, due to the U.S. holiday(Veteran's day) and due to a team event(Nov 13th). We will return to monitoring the GATK forum on November 12th and 14th respectively. Thank you for your patience.

FilterSAMReads ReadID pattern in Read_LIST_FILE

bavcibavci Member
edited February 2018 in Ask the GATK team


I am running FilterSamReads in picardtools with the following command:

java -jar /bioinf/software/picard/picard-1.133/picard.jar FilterSamReads I=20100518_vs_20100518_Bin_42_1-contigs.fa.sorted.bam O=20100518_Bin42_1_unique_reads.bam READ_LIST_FILE=Read_ID.txt FILTER=includeReadList

picard.sam.FilterSamReads INPUT=20100518_vs_20100518_Bin_42_1-contigs.fa.sorted.bam FILTER=includeReadList [OUTPUT SAM/BAM will contain reads that are supplied in the READ_LIST_FILE file] READ_LIST_FILE=Read_ID.txt OUTPUT=20100518_Bin42_1_unique_reads.bam WRITE_READS_FILES=true VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
Executing as [email protected] on Linux 3.0.101-0.35-default amd64; Java HotSpot(TM) 64-Bit Server VM 1.6.0_30-b12; Picard version: 1.133(95818b6e611725775e29d3b4acbaa23747eb3e94_1433169311) IntelDeflater
INFO 2018-02-07 17:23:56 FilterSamReads Filtering [presorted=true] 20100518_vs_20100518_Bin_42_1-contigs.fa.sorted.bam -> OUTPUT=20100518_Bin42_1_unique_reads.bam [sortorder=coordinate]
INFO 2018-02-07 17:23:56 FilterSamReads 0 SAMRecords written to 20100518_Bin42_1_unique_reads.bam
picard.sam.FilterSamReads done. Elapsed time: 0.13 minutes.

but my output .bam file is empty. As far as I figure out, the readIDs in the read list file could not be detected.

In the read list file, I have the read IDs in the following pattern:

Picard gave another output file with *.reads extension. It contains the all read IDs in the input file and the pattern in this file is:
HISEQ04:245:C21W7ACXX:5:2307:9359:64216 1:N:0:CTTGTA BH:ok 2/2 149b aligned read.

My question is the following: what is the correct read ID pattern which should be provided in read list file?

Thanks in advance for your help!




  • SheilaSheila Broad InstituteMember, Broadie admin

    Hi Burak,

    Can you try with the latest version of Picard? How do you know the read ID pattern is incorrect? Was there an error message or part of the log output that stated that?
    Can you also try validating your input BAM file with ValidateSamFile?


Sign In or Register to comment.