Entering edit mode
13.5 years ago
Haiping
▴
110
Hello. I want to use Tablet to visualise the aligned reuslt(bam format).All the data were download to my laptop before run tablet. When I input the files(.bam and fasta reference)into Tablet. It shows that a index file needed for it. So I used "samtools index .bam" to create a index file and download it into the samefolder in my laptop. When input it again. it shows that one of the files cannot be understand by tablet? What can I do to make it works?
Thanks for your reply! THe command I used were: samtools view -bS csort.sam | samtools sort – csort.bam samtools index csort.bam And it's ture that I got csort.bam, csort.bam.bai and myref.fa before I used the tablet. The only differnece was that I did't use -t ref.fa when I run the samtools view. Is this the main reason I can't use tablet the open my bam file?
yes, most likely
I used the novoalign to align my read to the reference. Since there is a @sq at the begining of the sam file, it's why I don't using the reference during format conversion. Since the sam file is more than 40 G,it's realy cost times during format conversion. Thanks for your suggestion. I will try to do it this night if I can't get any another suggestion.
just take the first 1000 lines or so of your SAM file and make sure that works using the aforementioned recipe
It's a good idea. But How I can only convert the first 1000 lines?
head -n 1000 myalignment.sam > myalignment.subset.sam ...repeat recipe...
Haha! It turn out to be a mistake in reference. And the Tablet worked when I change the reference. And I also confirmed that the recipe you mentioned here worked well and the -t ref.fa doesn't affect the final visualization in Tablet. Thanks a lot for you kindly help.