Question: Errors with Picard CollectRnaSeqMetrics
1
gravatar for bertb
4 weeks ago by
bertb10
bertb10 wrote:

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,

ADD COMMENTlink modified 4 weeks ago by Pierre Lindenbaum131k • written 4 weeks ago by bertb10
2
gravatar for Pierre Lindenbaum
4 weeks ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum131k wrote:

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 COMMENTlink modified 4 weeks ago • written 4 weeks ago by Pierre Lindenbaum131k

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

ADD REPLYlink written 4 weeks ago by bertb10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1268 users visited in the last hour