Hi,

I suspect you will need to define the options before the input and region:

        Usage: samtools view [options] <in.bam>|<in.sam>|<in.cram> [region …]

i.e. 
        $ samtools view-U without-region.sam sample.bam 2:33050509-33154206 

Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

k...@sanger.ac.uk
Tel:+44 (0)1223 834244 Ext: 7703
Office: H104

> On 8 May 2016, at 17:27, Peter Chovanec <peter.chova...@babraham.ac.uk> wrote:
> 
> Hello,
> 
> The question has been asked before here:
> 
> https://www.biostars.org/p/183921/
> 
> But the solution isn't very satisfactory. Why doesn't this work:
> 
> samtools view sample.bam 2:33050509-33154206 -U without-region.sam
> 
> or
> 
> samtools view -b sample.bam 2:33050509-33154206 -o other_stuff.bam -U
> without-region.bam
> 
> Thank you
> 
> Peter
> The Babraham Institute, Babraham Research Campus, Cambridge CB22 3AT 
> Registered Charity No. 1053902.
> The information transmitted in this email is directed only to the addressee. 
> If you received this in error, please contact the sender and delete this 
> email from your system. The contents of this e-mail are the views of the 
> sender and do not necessarily represent the views of the Babraham Institute. 
> Full conditions at: www.babraham.ac.uk<http://www.babraham.ac.uk/terms>
> 
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> _______________________________________________
> Samtools-help mailing list
> Samtools-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/samtools-help




-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to