Discussion:
[Samtools-help] Trouble running samtools view and tview with 1000genomes
Alexander F Kemper
2009-07-21 17:36:34 UTC
Permalink
Hi, I am trying to run samtools view on some of the alignment files found in the 1000genomes project for the purpose of looking at a specific area of the alignments. When I run the command:

${SAMTOOLS_PATH}samtools view -o ${OUT_PATH}stdout -t ${IN_PATH}NA12891.chrom22.SLX.SRP000032.2009_07.bam.bai ${IN_PATH}NA12891.chrom22.SLX.SRP000032.2009_07.bam chr22:1,000-2,000

I get the following messages:

[sam_header_read2] 177 sequences loaded.
Segmentation fault

and then it quits with nothing in the stdout file. I was wondering if there is some error in the way I am running the command or not. Also, this is just chromosome 22, I believe, when selecting a region from a file such as this, is it necessary to put chr22:1,000-2,000 or can you put 1,000-2,000?

Secondly, when running tview with the command:

${SAMTOOLS_PATH}samtools tview ${IN_PATH}NA12891.chrom1.SLX.SRP000032.2009_07.bam

Everything appears and works correctly except for the goto command. When I type in chr1:1,000-2,000 or 1,000-2,000 or 1000, nothing happens.When I run this using the accompanying .bai file nothing changes:

${SAMTOOLS_PATH}samtools tview ${IN_PATH}NA12891.chrom1.SLX.SRP000032.2009_07.bam ${IN_PATH}NA12891.chrom1.SLX.SRP000032.2009_07.bam.bai

Thanks for all your help

Alex
Heng Li
2009-07-21 18:40:46 UTC
Permalink
Post by Alexander F Kemper
${SAMTOOLS_PATH}samtools view -o ${OUT_PATH}stdout -t ${IN_PATH}NA12891.chrom22.SLX.SRP000032.2009_07.bam.bai ${IN_PATH}NA12891.chrom22.SLX.SRP000032.2009_07.bam chr22:1,000-2,000
[sam_header_read2] 177 sequences loaded.
Segmentation fault
I guess you are using an old version of samtools. The latest versionw
will complain that "[main_samview] fail to get the reference
name. Continue anyway.". Note that the chromosome names are 1, 2, ... ,
X, Y, MT, NA... NOT chr1 and so on. You can see this simply from the
header.

Heng
Post by Alexander F Kemper
and then it quits with nothing in the stdout file. I was wondering if there is some error in the way I am running the command or not. Also, this is just chromosome 22, I believe, when selecting a region from a file such as this, is it necessary to put chr22:1,000-2,000 or can you put 1,000-2,000?
${SAMTOOLS_PATH}samtools tview ${IN_PATH}NA12891.chrom1.SLX.SRP000032.2009_07.bam
${SAMTOOLS_PATH}samtools tview ${IN_PATH}NA12891.chrom1.SLX.SRP000032.2009_07.bam ${IN_PATH}NA12891.chrom1.SLX.SRP000032.2009_07.bam.bai
Thanks for all your help
Alex
------------------------------------------------------------------------------
_______________________________________________
Samtools-help mailing list
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.
Loading...