Re: [Samtools-help] Cram conversion error: [main_samview] failed to write the SAM header

2016-10-26 Thread Shane McCarthy
NA12878.mapped.ILLUMINA.bwa.CEU.high_coverage_pcr_free.20130906.bam was mapped 
to the hs37d5.fa reference genome, which contains contigs not in 
human_g1k_v37.fasta. Try:

samtools view -C -T hs37d5.fa -o chrom_20.cram high20.bam


> On 26 Oct 2016, at 15:11, Veronica Suaste Morales  wrote:
> 
> Hi,
> 
> I'm doing some experiments with cram files, I'm working with high coverage 
> .bam file from 
> ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/phase3/data/NA12878/high_coverage_alignment
> First I extract only chromosome 20 and then I try to convert it to cram 
> format, the commands I run are:
> 
> samtools view -h -b 
> NA12878.mapped.ILLUMINA.bwa.CEU.high_coverage_pcr_free.20130906.bam -o 
> high20.bam 20
> 
> samtools view -C -T human_g1k_v37.fasta -o chrom_20.cram high20.bam
> And I get the next error:
> 
> Failed to populate reference for id 84
> [main_samview] failed to write the SAM header
> Nevertheless, if I run exactly the same commands with the low coverage file, 
> I don't get any error.
> I'm using last version of samtools 1.3.1. Do you have any idea what's the 
> error about it? 
> 
> I'll really appreciate your help!
> Thanks,
> Veronica
> --
> The Command Line: Reinvented for Modern Developers
> Did the resurgence of CLI tooling catch you by surprise?
> Reconnect with the command line and become more productive. 
> Learn the new .NET and ASP.NET CLI. Get your free copy!
> http://sdm.link/telerik___
> 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. 

--
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
___
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help


[Samtools-help] Cram conversion error: [main_samview] failed to write the SAM header

2016-10-26 Thread Veronica Suaste Morales
Hi,

I'm doing some experiments with cram files, I'm working with high coverage
.bam file from
ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/phase3/data/NA12878/high_coverage_alignment
First I extract only chromosome 20 and then I try to convert it to cram
format, the commands I run are:

samtools view -h -b
NA12878.mapped.ILLUMINA.bwa.CEU.high_coverage_pcr_free.20130906.bam -o
high20.bam 20

samtools view -C -T human_g1k_v37.fasta -o chrom_20.cram high20.bam
And I get the next error:

Failed to populate reference for id 84
[main_samview] failed to write the SAM header

Nevertheless, if I run exactly the same commands with the low coverage
file, I don't get any error.
I'm using last version of samtools 1.3.1. Do you have any idea what's the
error about it?

I'll really appreciate your help!
Thanks,
Veronica
--
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik___
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help