Errors with Picard CollectRnaSeqMetrics
1
1
Entering edit mode
4.2 years ago
bertb ▴ 20

Hello,

I'm trying to run a QC on my bam files for an RNAseq, but when I run the command:

find *U*.bam -exec echo java -jar ~/path/picard.jar CollectRnaSeqMetrics I={} O=picard/{}.RNA_Metrics REF_FLAT=$RNA_HOME/refs/sacCer3.ncbiRefSeq.ref_flat.txt STRAND=SECOND_READ_TRANSCRIPTION_STRAND RIBOSOMAL_INTERVALS=$RNA_HOME/refs/ref_ribosome.interval_list \; | sh

I receive an error about missing an SM tag:

Exception in thread "main" htsjdk.samtools.SAMFormatException: Error parsing SAM header. @RG line missing SM tag. Line:
@RG ID:UMH; File /home/path/to/file/UMH.bam; Line number 19
    at htsjdk.samtools.SAMTextHeaderCodec.reportErrorParsingLine(SAMTextHeaderCodec.java:265)
    at htsjdk.samtools.SAMTextHeaderCodec.access$200(SAMTextHeaderCodec.java:43)
    at htsjdk.samtools.SAMTextHeaderCodec$ParsedHeaderLine.requireTag(SAMTextHeaderCodec.java:346)
    at htsjdk.samtools.SAMTextHeaderCodec.parseRGLine(SAMTextHeaderCodec.java:175)
    at htsjdk.samtools.SAMTextHeaderCodec.decode(SAMTextHeaderCodec.java:108)
    at htsjdk.samtools.BAMFileReader.readHeader(BAMFileReader.java:667)
    at htsjdk.samtools.BAMFileReader.<init>(BAMFileReader.java:298)
    at htsjdk.samtools.BAMFileReader.<init>(BAMFileReader.java:176)
    at htsjdk.samtools.SamReaderFactory$SamReaderFactoryImpl.open(SamReaderFactory.java:396)
    at htsjdk.samtools.SamReaderFactory$SamReaderFactoryImpl.open(SamReaderFactory.java:208)
    at picard.analysis.SinglePassSamProgram.makeItSo(SinglePassSamProgram.java:96)
    at picard.analysis.SinglePassSamProgram.doWork(SinglePassSamProgram.java:84)
    at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:295)
    at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:103)
    at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:113)

I found some posts that talked about removing the SM tag, and whether or not that was possible/required, but didn't know how I might apply that here. I'm also not sure how to view the BAM file to inspect the @RG line.

Any help would be appreciated!

Thanks,

RNA-Seq alignment software error • 1.0k views
ADD COMMENT
2
Entering edit mode
4.2 years ago

Your SAM header has a @RG line without the SM: (sample) attribute.

See :

. I'm also not sure how to view the BAM file to inspect the @RG line.

samtools view -H UMH.bam | grep '^@RG'
ADD COMMENT
0
Entering edit mode

Ok, I'm going to try that next. Thanks!

ADD REPLY

Login before adding your answer.

Traffic: 2369 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6