Seeing only "N's" in tablet genome viewer?
0
0
Entering edit mode
5.2 years ago
tuj92050 • 0

I downloaded a bam file of an exome sequence from the 1000 genome project website and ran samtools view to extract chromosome 22. My command was

samtools view -b NA20515.bam 22 > chr22.bam

I received the message random alignment retrieval only works for indexed BAM or CRAM files but it still created a bam file nonetheless that was 5 kb in size. I then ran samtools index chr22.bam to create the indexed bam file. I want to map the reads in Tablet genome viewer, so I load the chr22 bam file with the reference genome in Tablet, but when I visualize all of the reads in tablet all I see are N's. Did I do something wrong with samtools?

genome viewer bam • 1.1k views
ADD COMMENT
1
Entering edit mode

but it still created a bam file nonetheless that was 5 kb in size.

Did you check by doing samtools view chr22.bam | less to make sure there are actually alignments in it? Perhaps you only created a file with the header, which is otherwise empty.

ADD REPLY
0
Entering edit mode

If it's only header, s/he needs samtools view -h chr22.bam to see the header

ADD REPLY
0
Entering edit mode

How would I know that it actually has alignments in it?

ADD REPLY
0
Entering edit mode

You should see lines like this (apologies for borrowing the data from a recent unrelated thread)

K00333:90:H3TMTBBXY:2:1101:1133:28780   83  NC_000964.3 476475  60  75M =   476412  -138    GAAAAACGGGCGCGGTGAGAGAGTGCCGCGCGAAGTCTGTTATAATAACAGGATGAGCGTGAAAGAAAGAGAAGT     NM:i:1  MD:Z:16T58  MC:Z:75M    AS:i:70 XS:i:0  
K00333:90:H3TMTBBXY:2:1101:1133:28780   163 NC_000964.3 476412  60  75M =   476475  138 NATTCACCAAACATCGCCCTCCGCGCAAACCGTCCCTCACGTCATTTTCTCAGAACTTGACCCGACAACCGGGCG  NM:i:9  MD:Z:0C3A2A12A13A20A5A3A2A6 MC:Z:75M    AS:i:38 XS:i:0
ADD REPLY
0
Entering edit mode

do you have the file NA20515.bam.bai ?

ADD REPLY
0
Entering edit mode

yes, the bai file is in the same directory

ADD REPLY

Login before adding your answer.

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