On Wed, 4 Jan 2017, John Marshall wrote:

> TL;DR i.e. what Rob said.  But note that when you output SAM with 
>samtools view, samtools appends basic @SQ headers if there aren't already 
>any.  So Rob's `samtools view -H ... | grep '^@SQ'` will display some 
>headers whether the file contains textual headers or not.  Removing the 
>grep will allow some educated guesses to be made about whether @SQ 
>headers seen with samtools view are synthetic or really in the input 
>file: if there are any other (e.g. @RG) headers *after* the block of @SQ 
>headers, or if the @SQ headers have any fields beyond SN and LN, then 
>they are definitely real.

Yes, I've just spotted this - samtools view fixes the problem too.

Looking at the bam file with 'zless' might be the quickest way of checking 
for @SQ lines.  The text header is fairly readable at the start.

Rob Davies              r...@sanger.ac.uk
The Sanger Institute    http://www.sanger.ac.uk/
Hinxton, Cambs.,        Tel. +44 (1223) 834244
CB10 1SA, U.K.          Fax. +44 (1223) 494919


-- 
 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. 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to