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(SAMLineParser.java:439)
at htsjdk.samtools.SAMLineParser.parseLine(SAMLineParser.java:341)
at htsjdk.samtools.SAMTextReader$RecordIterator.parseLine(SAMTextReader.java:248)
at htsjdk.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:236)
at htsjdk.samtools.SAMTextReader$RecordIterator.next(SAMTextReader.java:212)
at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:545)
at htsjdk.samtools.SamReader$AssertingIterator.next(SamReader.java:519)
at picard.sam.SamToFastq.doWork(SamToFastq.java:169)
at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:209)
at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:95)
at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:105)

What should I do?

Issue · Github
by Sheila

Issue Number
1476
State
closed
Last Updated
Assignee
Array
Milestone
Array
Closed By
vdauwera

Answers

Sign In or Register to comment.