Sorting of bam files
2
0
Entering edit mode
5.7 years ago
Liftedkris ▴ 30

Hi I’m performing dual RNAseq. I have my transcript aligned to human genome and the resulting Sam file converted to bam file. I’m using samtools version 0.1.19. Now I want to sort the bam file and each time I run the program using the command: (samtools sort accepted_hits.bam -o host_sorted) The program keeps producing weird figures on the screen and runs for hours unending. Please what can I do to solve this mystery

RNA-Seq samtools • 2.1k views
ADD COMMENT
2
Entering edit mode
5.7 years ago
JC 13k

You are running an outdated version, the old version outputs to STDOUT (your screen). So you have 2 options:

  1. update your samtools, current version is 1.9 https://github.com/samtools/samtools/releases
  2. if you cannot update, you can redirect your output to a file samtools sort accepted_hits.bam > host_sorted
ADD COMMENT
1
Entering edit mode
5.7 years ago
ATpoint 85k

It is not a mystery. Your samtools version is ancient, therefore your command does not recognize the -o option after the input file, sending everything to stdout (so to your screen) and as BAMs are binary, it looks messy / non-human readable. Upgrade your samtools and do samtools sort -o out_sorted.bam in.bam. By the way, as you seem to be a beginner in NGS analysis (which is totally fine, no offense), please spend quality time reading online material, such as blogs and tutorials and use google and the search function if you encounter problems. Most of the typical problems have been encountered many times before and you will find answers for most situations ;-) For the future, please use Question when posting questions. For general guidelines on posting questions, also see Brief Reminder On How To Ask A Good Question

ADD COMMENT

Login before adding your answer.

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