sam 2 bam 格式文件处理

Use the built-in “samtools sort” command rather than a generic sort. Samtools sort works on BAM files so you should convert your alignments to BAM format using

samtools view -bS filename.sam > filename.bam samtools sort filename.bam sorted samtools index sorted.bam 

This ofcourse assumes you have generated the SAM file using method (1).

The file “sorted.bam” is indexed and you can get all chrX records using

samtools view sorted.bam chrX > chrX.sam 

Now you have a SAM file you can put into Cufflinks.

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>