Hi,
I've used Cufflinks a load of times, with both sorted.bam alignments from tophat and Stampy. Even though my .bam files are sorted (samtools sort) I get this error when running cufflinks:
Error: this SAM file doesn't appear to be correctly sorted!
Cufflinks requires that if your file has SQ records in
the SAM header that they appear in the same order as the chromosomes names
in the alignments.
If there are no SQ records in the header, or if the header is missing,
the alignments must be sorted lexicographically by chromsome
name and by position.
I tried using .sam and sorting with
$ sort -k 3,3 -k 4,4n hits.sam > hits.sam.sorted
but the sort takes hours and doesn't seem to finish, or even produce a file.
Here are the first few lines of my .sam file:
@HD VN:1.0 SO:unsorted
@PG ID:dvtgm PN:stampy VN:1.0.21_(r1683) CL:-t 12 -g [...] -h [...] -o [...]
[...]
@CO TM:Tue, 30 Apr 2013 10:15:08 IST WD:[...] HN:[...]
@SQ SN:gi|AB014461.11|_X.l_mRNA_for_Zic-related-2,_complete_cds LN:2719 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|L09728.12|XELDLL4_X.l_putative_transcription_factor_DLL4_mRNA,_complete_cds LN:1087 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|L09730.13|XELDLL2_X.l_putative_transcription_factor_DLL2_mRNA,_3'_end LN:1485 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|L11263.14|XEL1A11RTP_X.l_71.0_kDa_protein_(retrotransposon_1a11_related)_mRNA,_complete_cds LN:4410 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|AB021705.15|_X.l_mRNA_for_XMAP4,_complete_cds LN:3920 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|AB022087.16|_X.l_mRNA_for_cytochrome_P450,_complete_cds,_clone_MC1 LN:2618 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|AB022088.17|_X.l_mRNA_for_cytochrome_P450,_complete_cds,_MC2 LN:2905 AS:Uni_blash_heads SP:X.laevis
Really baffled by this - it's never been a problem in the past...
Many thanks,
N
I've used Cufflinks a load of times, with both sorted.bam alignments from tophat and Stampy. Even though my .bam files are sorted (samtools sort) I get this error when running cufflinks:
Error: this SAM file doesn't appear to be correctly sorted!
Cufflinks requires that if your file has SQ records in
the SAM header that they appear in the same order as the chromosomes names
in the alignments.
If there are no SQ records in the header, or if the header is missing,
the alignments must be sorted lexicographically by chromsome
name and by position.
I tried using .sam and sorting with
$ sort -k 3,3 -k 4,4n hits.sam > hits.sam.sorted
but the sort takes hours and doesn't seem to finish, or even produce a file.
Here are the first few lines of my .sam file:
@HD VN:1.0 SO:unsorted
@PG ID:dvtgm PN:stampy VN:1.0.21_(r1683) CL:-t 12 -g [...] -h [...] -o [...]
[...]
@CO TM:Tue, 30 Apr 2013 10:15:08 IST WD:[...] HN:[...]
@SQ SN:gi|AB014461.11|_X.l_mRNA_for_Zic-related-2,_complete_cds LN:2719 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|L09728.12|XELDLL4_X.l_putative_transcription_factor_DLL4_mRNA,_complete_cds LN:1087 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|L09730.13|XELDLL2_X.l_putative_transcription_factor_DLL2_mRNA,_3'_end LN:1485 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|L11263.14|XEL1A11RTP_X.l_71.0_kDa_protein_(retrotransposon_1a11_related)_mRNA,_complete_cds LN:4410 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|AB021705.15|_X.l_mRNA_for_XMAP4,_complete_cds LN:3920 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|AB022087.16|_X.l_mRNA_for_cytochrome_P450,_complete_cds,_clone_MC1 LN:2618 AS:Uni_blash_heads SP:X.laevis
@SQ SN:gi|AB022088.17|_X.l_mRNA_for_cytochrome_P450,_complete_cds,_MC2 LN:2905 AS:Uni_blash_heads SP:X.laevis
Really baffled by this - it's never been a problem in the past...
Many thanks,
N
Comment