StringTie "missing header error" [for both HISAT2 and STAR alignment files]
1
1
Entering edit mode
7.2 years ago
EagleEye 7.6k

Hi,

I am getting error while using StringTie (1.3.3b) on aligned reads from both HISAT2 (2.1.0) and STAR (2.5.3a). Please help me to rectify the problem. The error is related to missing headers in the alignment files but when I print header using samtools I can see the headers in those alignment files (hisat2 and star aligned).

Steps used:

HISAT2 alignment:

hisat2 --dta --known-splicesite-infile spliceSites.txt --phred33 --qc-filter -x ht2_index/hg38 -U sample1.fastq.gz | samtools view -bS -o sample1_hisat2.bam -
samtools sort -o sample1_hisat2_sorted.bam -O sample1_hisat2.bam
samtools view -H sample1_hisat2_sorted.bam | head

@HD VN:1.0  SO:coordinate
@SQ SN:1    LN:248956422
@SQ SN:10   LN:133797422
@SQ SN:11   LN:135086622
@SQ SN:12   LN:133275309
@SQ SN:13   LN:114364328
@SQ SN:14   LN:107043718
@SQ SN:15   LN:101991189
@SQ SN:16   LN:90338345
@SQ SN:17   LN:83257441

stringtie sample1_hisat2_sorted.bam -G hg38.GTF -B -e -x -C hg38.GTF -p 8 -A hg38_gene_abund.tab -o hg38_assembled.gtf

Error:

[samopen] no @SQ lines in the header.
[sam_read1] missing header? Abort!

STAR alignment:

STAR \
  --readFilesCommand zcat \
  --outSAMmapqUnique 255 \
  --outSAMattributes All \
  --outSAMattrIHstart 0 \
  --outSAMtype BAM SortedByCoordinate \
  --outSAMunmapped None \
  --outFileNamePrefix path/sample1_star \
  --runMode alignReads \
  --genomeDir genome_dir/STAR_index/ \
  --readFilesIn sample1.fastq.gz

samtools view -H sample1_starAligned.sortedByCoord.out.bam | head

@HD VN:1.4  SO:coordinate
@SQ SN:1    LN:248956422
@SQ SN:10   LN:133797422
@SQ SN:11   LN:135086622
@SQ SN:12   LN:133275309
@SQ SN:13   LN:114364328
@SQ SN:14   LN:107043718
@SQ SN:15   LN:101991189
@SQ SN:16   LN:90338345
@SQ SN:17   LN:83257441

stringtie sample1_starAligned.sortedByCoord.out.bam -G hg38.GTF -B -e -x -C hg38.GTF -p 8 -A hg38_gene_abund.tab -o hg38_assembled.gtf

Error:

[samopen] no @SQ lines in the header.
[sam_read1] missing header? Abort!
stringtie RNA-Seq alignment • 4.9k views
ADD COMMENT
3
Entering edit mode
7.2 years ago
Russ ▴ 520

I think the issue is not in your file but in your stringtie command. It looks like it could use a bit of tweaking. The -x option requires a parameter and is interpreting the -C hg38.GTF as input, resulting in the error message. Try removing the -x (or specifying a file) and seeing if that helps.

ADD COMMENT
1
Entering edit mode

Thank a lot. You saved my day. The problem was exactly what you mentioned.

  • I removed '-x' since it doesn't have any input file (unnecessary parameter)

  • I also had another problem that -C (the output file name) and the -G (reference files names) where pointing to same GTF reference file (hg38.GTF). It was replacing the original GTF reference file for the output.

ADD REPLY
0
Entering edit mode

Moved @Russ's comment to an answer. Go ahead and accept to provide closure to this thread.

ADD REPLY

Login before adding your answer.

Traffic: 1617 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