On 09/18/2014 10:00 AM, Dario Strbenac wrote:
> If the user forgets the redirection character before the output file name,
> then some strange output is printed, and Ctrl-C or Ctrl-Z don't work. The
> command line has to be terminated from another window.
>
> $ samtools view -b test.sam test.bam
You probably meant 'samtools view -Sb test.sam test.bam'.
> [main_samview] random alignment retrieval only works for indexed BAM or CRAM
> files.
> ÿBC:U¿AÇo£\e¡ ÂÖì¼ù=6#p 'áN°H.¹Ü.9-D°-ÅÂÆÎZ°A°;[ý»
> ")AÆW¡ÁÌ"ÊÐÐÔ0-Pæ¨nÞ
> ÚýF+î
> L!Lp%X(T"4¢zéD(M¢|áa¡1Ldö^gP`È
> ÅhBíAa«4cóâT ×HÍâðÔõ2Ì+
> i$T.ThK
>
> ÿKíLKÎáA.äöü@öT±p£í4XãvtçV¥ó°m4ݧլa§½søà8îìÇö$Þt{zãØn÷úhÜ«¼Û.MzãýÚMÅ˰d7..{BàÑ
> 9QAëÞÏ'×
> »sP}zeNj:KßÉ{Bè÷å<Q®«/NH¸côë£
> 4L[300û|àÿBC
>
> It could be made to fail less seriously.
I'm not sure what you suggest more specifically.
It seems like a bad path if samtools would go and check if its output
sent to stdout is actually piped or redirected. It's none of samtools'
business, imvho.
In this particular case string 'test.bam' is interpreted as a region,
and one could argue that parsing of that string should occur (and fail)
before generating any output, but that is typically not the case with
even common tools like GNU coreutils such as `cat'.
Cheers,
Peter
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help