Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SAMTOOLS problem

    Dear all,

    I have two different problems related to samtools.

    1. When I try to create a pileup using pileup option in samtools and sorted bam file, I get segmentation fault. I'm using following command.

    samtools pileup -cv -f all_chr.fa bamfile.sorted.bam

    2. when I use pysam to find different variations at particular coordinates of the human genome I get following errors.

    Traceback (most recent call last):
    File "twobitReader.py", line 5, in <module>
    samfile = pysam.Samfile("Brain_DNA.sorted.bam","rb")
    File "csamtools.pyx", line 266, in csamtools.Samfile.__cinit__ (pysam/csamtools.c:2759)
    File "csamtools.pyx", line 376, in csamtools.Samfile._open (pysam/csamtools.c:3871)
    ValueError: invalid BAM binary header (is this a BAM file?)


    This problem is only related to files which are more than 10 GBs in size. I have tested with smaller files and it works.

    --
    regards,
    Anmol

  • #2
    Dear All,

    Since this thread has been created for the problems regarding SAMtools I'd like to take advantage of it and add mine, which just popped up today.

    As of 15th November, the manual entry for SAMtools m/pileup command has been updated by replacing following lines

    samtools pileup -vcf hsRef.fa - > var-X.raw.txt
    samtools.pl varFilter -D100 var-X.raw.txt > var-X.flt.txt
    awk '($3=="*"&&$6>=50)||($3!="*"&&$6>=20)' var-X.flt.txt > var-X.final.txt

    with

    samtools mpileup -ugf ref.fa aln.sorted.bam | bcftools view -bvcg - > var.raw.bcf
    bcftools view var.raw.bcf | vcfutils.pl varFilter -D 100 > var.flt.vcf

    Mine problem with the latter pipeline lays in not getting the whole source parsed as it always stops at certain position (file size?) regardless what source file I use.

    This is what I get:

    awk '{print $1}' normal.var.final.vcf | sort | uniq -c
    46343 chr1
    30048 chr10
    1 chr10_random
    30111 chr11
    6 chr11_random
    27205 chr12
    19945 chr13
    114 chr13_random

    and without using mpileup-bcf command:

    awk '{print $1}' ./Finals/2007.02142B.normal.var.final.ST.plp | sort | uniq -c
    22053 chr1
    14314 chr10
    7 chr10_random
    13908 chr11
    5 chr11_random
    12635 chr12
    8127 chr13
    96 chr13_random
    7786 chr14
    8239 chr15
    8 chr15_random
    10247 chr16
    1 chr16_random
    9566 chr17
    308 chr17_random
    6534 chr18
    5 chr18_random
    8030 chr19
    86 chr19_random
    16 chr1_random
    21137 chr2
    7047 chr20
    5105 chr21
    292 chr21_random
    4800 chr22
    81 chr22_random
    3 chr2_random
    16190 chr3
    3 chr3_random
    16118 chr4
    124 chr4_random
    13458 chr5
    1 chr5_h2_hap1
    13203 chr6
    45 chr6_cox_hap1
    56 chr6_qbl_hap2
    29 chr6_random
    13484 chr7
    293 chr7_random
    11937 chr8
    23 chr8_random
    11056 chr9
    506 chr9_random
    3556 chrX
    2 chrX_random
    3110 chrY

    Could anyone hint why the whole file has not been parsed? Or are there any ways to transform plp format into vcf?

    Many thanks for help.
    Michal

    p.s. segmentation fault pops up after running samtools mpileup -ugf ref.fa aln.sorted.bam (and not being piped into bcftools) and the output size exceeds 10gb.
    Last edited by michalkovac; 11-22-2010, 09:05 AM.

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Recent Innovations in Spatial Biology
      by seqadmin


      Spatial biology is an exciting field that encompasses a wide range of techniques and technologies aimed at mapping the organization and interactions of various biomolecules in their native environments. As this area of research progresses, new tools and methodologies are being introduced, accompanied by efforts to establish benchmarking standards and drive technological innovation.

      3D Genomics
      While spatial biology often involves studying proteins and RNAs in their...
      01-01-2025, 07:30 PM
    • seqadmin
      Advancing Precision Medicine for Rare Diseases in Children
      by seqadmin




      Many organizations study rare diseases, but few have a mission as impactful as Rady Children’s Institute for Genomic Medicine (RCIGM). “We are all about changing outcomes for children,” explained Dr. Stephen Kingsmore, President and CEO of the group. The institute’s initial goal was to provide rapid diagnoses for critically ill children and shorten their diagnostic odyssey, a term used to describe the long and arduous process it takes patients to obtain an accurate...
      12-16-2024, 07:57 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, 01-09-2025, 04:04 PM
    0 responses
    431 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 01-09-2025, 09:42 AM
    0 responses
    439 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 01-08-2025, 03:17 PM
    0 responses
    452 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 01-03-2025, 11:18 AM
    1 response
    50 views
    1 like
    Last Post Tonia
    by Tonia
     
    Working...
    X