Question: StringTie "missing header error" [for both HISAT2 and STAR alignment files]
1
gravatar for EagleEye
3.1 years ago by
EagleEye6.7k
Sweden
EagleEye6.7k wrote:

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!
rna-seq tool alignment stringtie • 2.4k views
ADD COMMENTlink written 3.1 years ago by EagleEye6.7k
3
gravatar for Russ
3.1 years ago by
Russ470
Ontario Veterinary College, University of Guelph, Guelph, Ontario, Canada
Russ470 wrote:

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 COMMENTlink modified 3.1 years ago • written 3.1 years ago by Russ470
1

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 REPLYlink written 3.1 years ago by EagleEye6.7k

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

ADD REPLYlink written 3.1 years ago by genomax91k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 887 users visited in the last hour