Missing SAM header when piping the samtools mpileup output to a VarScan call
0
0
Entering edit mode
2.7 years ago

I want to run samtools and pipe the mpileup output into a VarScan call using the following conditions:

  • 30 mapping score
  • 30 phred quality score
  • output-snp format
  • min coverage = 50
  • min tumor coverage = 3
  • p-value = 0.01
  • min variant frequency = 4%

Code:

samtools mpileup -B -q 30 -Q 30 -f hg19.fa normal_sort.bam tumor_sort.bam | java
-jar VarScan.v2.3.9.jar somatic /dev/stdin output --mpileup 1 --strand-filter 1 --output-snp --min-coverage 50 --min-coverage-tumor 3 --p-value 0.01 --min-var-freq 0.04

Traceback:

[E::sam_parse1] missing SAM header
[W::sam_read1] Parse error at line 1
Input file was not ready after 100 5-second cycles!
samtools varscan • 900 views
ADD COMMENT
0
Entering edit mode

it's a problem with samtools mpileup -B -q 30 -Q 30 -f hg19.fa normal_sort.bam tumor_sort.bam not varscan.

check both commands output a header

samtools view -H normal_sort.bam 
samtools view -H tumor_sort.bam 
ADD REPLY
0
Entering edit mode

Seems like the normal_sort.bam is missing the header. What should I do about it?

samtools view -H normal_sort.bam
samtools view -H tumor_sort.bam
@SQ     SN:chr22        LN:51304566
ADD REPLY
0
Entering edit mode

check your upstream workflow, re-run.

ADD REPLY
0
Entering edit mode

Why did you delete the post, melissachua90?

ADD REPLY

Login before adding your answer.

Traffic: 2234 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6