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.

Error parsing text SAM file. Empty sequence dictionary.; File rRNA_mapped.sam; Line 1

I am trying to remove rRNA sequences from my fastq files. I built the rRNA index file with bowtie-build, then mapped my reads to the index file producing .sam files. Then used: samtools view -f 4 rRNA.sam > rRNA_unmapped.sam, samtools view -F 4 rRNA.sam > rRNA_mapped.sam
Now I am trying to convert the sam files to fastq. I am getting this error:

Exception in thread "main" htsjdk.samtools.SAMFormatException: Error parsing text SAM file. Empty sequence dictionary.; File rRNA_mapped.sam; Line 1
Line: 2265:2:1101:1080:1987/2 0 HM991685 292 255 98M * 0 0 TTCTACGAGTCGAGTTGCTTGGGATTGCAGCTCAAATTTGGTGGTAAATTCCATCTAAAGCTAAATATTGGTGGGATACCGATAGTGCACAAGTACCG aceeeegggeghhihhiiiihiifghafhhhhifhiiihiifhgeghhiffhhhihhhihhiiihifgfggdeeccdddccacaabbbccccabbcba XA:i:0 MD:Z:98 NM:i:0
at htsjdk.samtools.SAMLineParser.reportErrorParsingLine(
at htsjdk.samtools.SAMLineParser.parseLine(
at htsjdk.samtools.SAMTextReader$RecordIterator.parseLine(
at htsjdk.samtools.SAMTextReader$
at htsjdk.samtools.SAMTextReader$
at htsjdk.samtools.SamReader$
at htsjdk.samtools.SamReader$
at picard.sam.SamToFastq.doWork(
at picard.cmdline.CommandLineProgram.instanceMain(
at picard.cmdline.PicardCommandLine.instanceMain(
at picard.cmdline.PicardCommandLine.main(

What should I do?

Issue · Github
by Sheila

Issue Number
Last Updated
Closed By


Sign In or Register to comment.