Created SAM file using Hisat2 alignment. Now trying to convert to sorted.bam, but samtools just spitting out numerous gzip files
0
0
Entering edit mode
8.2 years ago
aswartz85 ▴ 20

When I used the command:

samtools view -bS [filename].sam > [filename].bam

I get a GZIP file with the name "[filename].bam

I then try to convert to sorted.bam using command:

samtools sort [filename].bam -o [filename].sorted.bam

And I just get a bunch (~11) gzip files, and then my Ubuntu terminal just starts displaying gibberish.

What could be the issue?

RNA-Seq alignment • 3.4k views
ADD COMMENT
0
Entering edit mode

Could you give us the command lines you are using (+ your samtools version)? You might have done a small error since samtools view -bS should not give you a gzip file, just a .bam.

ADD REPLY
0
Entering edit mode

What do you mean command lines? I installed samtools from ubuntu software center. When I type "samtools" in terminal, it displays the program information and says it's version 0.1.18.

However, even after uninstalling and reinstalling, it still does the same thing. Could there be something wrong with the sam file that was created from Hisat2? I can't even open my sam file (not even with text editor) and when I right click > properties it says file type is lotus amipro. Does this sound right?

ADD REPLY
0
Entering edit mode

You should be able to open the sam file with a text editor. It is basically a text file with a series of well defined columns (https://samtools.github.io/hts-specs/SAMv1.pdf)

By command line I mean what you typed on in terminal to run HISat and samtools and generate the sam/bam files. Like

samtools sort align/mybamFile.bam align/mybamFile.sorted
ADD REPLY
0
Entering edit mode

Hisat2 command:

hisat2 -x genome_index [input fastq filename].fastq -S [output filename].sam

Samtools commands:

samtools view -bS [input filename].sam > [output filename].bam
ADD REPLY

Login before adding your answer.

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