question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RevertSam does not accept /dev/stdin and should have a better error message

See original GitHub issue

Here’s the cryptic error message when we try and run RevertSam with I=/dev/stdin. Full command line:

RevertSam INPUT=/dev/stdin OUTPUT=/dev/stdout SORT_ORDER=queryname RESTORE_ORIGINAL_QUALITIES=false REMOVE_DUPLICATE_INFORMATION=false REMOVE_ALIGNMENT_INFORMATION=false ATTRIBUTE_TO_CLEAR=[] SANITIZE=true

Stack trace:

Exception in thread "main" htsjdk.samtools.SAMException: Cannot determine candidate qualities: no qualities found.
	at htsjdk.samtools.util.QualityEncodingDetector.generateCandidateQualities(QualityEncodingDetector.java:228)
	at htsjdk.samtools.util.QualityEncodingDetector.generateBestGuess(QualityEncodingDetector.java:382)
	at htsjdk.samtools.util.QualityEncodingDetector.detect(QualityEncodingDetector.java:335)
	at picard.sam.RevertSam.createReadGroupFormatMap(RevertSam.java:534)
	at picard.sam.RevertSam.doWork(RevertSam.java:271)
	at picard.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:268)
	at picard.cmdline.PicardCommandLine.instanceMain(PicardCommandLine.java:96)
	at picard.cmdline.PicardCommandLine.main(PicardCommandLine.java:106)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
yfarjouncommented, Dec 6, 2017

Huh?

On Wed, Dec 6, 2017 at 10:38 AM grozhnev notifications@github.com wrote:

As it is clear to me, you got the exception because of SANITIZE=true. What is the purpose of using this parameter? In the documentation RevertSam http://broadinstitute.github.io/picard/command-line-overview.html#RevertSam it is said that

SANITIZE (Boolean) WARNING: This option is potentially destructive. If enabled will discard reads in order to produce a consistent output BAM. Reads discarded include (but are not limited to) paired reads with missing mates, duplicated records, records with mismatches in length of bases and qualities. This option can only be enabled if the output sort order is queryname and will always cause sorting to occur. Default value: false. This option can be set to ‘null’ to clear the default value. Possible values: {true, false}

So, if it is not necessary, it is better not to use it.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/broadinstitute/picard/issues/1008#issuecomment-349677067, or mute the thread https://github.com/notifications/unsubscribe-auth/ACnk0ktw8js_D3oAoVTi3avNC6pTRZmHks5s9rT9gaJpZM4Q07gZ .

0reactions
sooheeleecommented, May 30, 2018

A researcher has reported on the forum that the streaming error depends on the parameter SANITIZE=true at https://gatkforums.broadinstitute.org/gatk/discussion/comment/49098#Comment_49098 and also thinks it odd that if the end point of a stream is ReverSam that this should then error the tool.

Read more comments on GitHub >

github_iconTop Results From Across the Web

1818. RevertSam SANITIZETRUE via pipe leads to ...
In my opinion, this parameter is vital in any work dealing with final BAM files from public dataset. The problem with public datasets...
Read more >
RevertSam in BamRealigner: Failed to write bam - GATK
I ran ValidateSam on input bam file, and it found no errors. ... In the output bucket for call-RevertSam, there was a subdirectory...
Read more >
Recent Discussions — GATK-Forum - RSSing.com
I'm compiling, packaging & everything is fine: $ java -cp GenomeAnalysisTK.jar:mygatk.jar org.broadinstitute.gatk.engine.CommandLineGATK -T EigenVariants --help ...
Read more >
Revert bam to fastq - Biostars
Can someone please help me resolve the problem I am having here. ... Write error; BinaryCodec in writemode; streamed file (filename not ......
Read more >
[Samtools-help] Picard 1.106 error on using /dev/stdin
Hi, It seems that Picard 1.106 has problems with using /dev/stdin and /dev/stdout (and it now emits a stackguard warning, but will run)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found