Question: Seeing only "N's" in tablet genome viewer?
0
gravatar for tuj92050
8 months ago by
tuj920500
tuj920500 wrote:

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?

bam viewer genome • 259 views
ADD COMMENTlink written 8 months ago by tuj920500
1

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 REPLYlink modified 8 months ago • written 8 months ago by genomax73k

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

ADD REPLYlink written 8 months ago by swbarnes26.7k

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

ADD REPLYlink written 8 months ago by tuj920500

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 REPLYlink modified 8 months ago • written 8 months ago by genomax73k

do you have the file NA20515.bam.bai ?

ADD REPLYlink written 8 months ago by Pierre Lindenbaum123k

yes, the bai file is in the same directory

ADD REPLYlink written 8 months ago by tuj920500
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 3118 users visited in the last hour