Hello everyboday, I am a newbie, my sam file size is about 45,786 kB, however after I use the samtools sort command, the .bai file produced is just only 1 kb, I wander it is right. In addition, after I use the samtools tview command, the result show a line N and nothing. I don't know where the problem is, who can help me?
Unconfigured Ad
Collapse
X
-
Samtools sort will produce a sorted bam file and a .bam.bai file to go with it.
For example,
samtools sort bam_unsorted.bam > myBam_sorted.bam
That will make: myBam_sorted.bam and myBam_sorted.bam.bai, and the .bam.bai file will be small.
Also consider if you want to sort by position or by name, many things require by name, especially when working with paired end data, you'd need to include the -n option in samtools sort for that.
Good luck.
-
-
Originally posted by aprice67 View PostSamtools sort will produce a sorted bam file and a .bam.bai file to go with it.
For example,
samtools sort bam_unsorted.bam > myBam_sorted.bam
That will make: myBam_sorted.bam and myBam_sorted.bam.bai, and the .bam.bai file will be small.
Also consider if you want to sort by position or by name, many things require by name, especially when working with paired end data, you'd need to include the -n option in samtools sort for that.
Good luck.
To: aprice67
thank you for your reply.
Yes, I have soted my bam file, thne made samtools index and got bai file, the bai file is just 1kb.
after then I use the command: samtools tview sorted.bam reference.fas
the result is as following, while not be the sequence. so I don't which step is wrong.Attached Files
Comment
-
-
It is normal for the .bai file to be small (compared to the bam file). It only contains index values that indicate where particular regions (chromosomes in this case) start in the bam files.
Ends of chromosomes contain unsequenceable hetero-chromatin, which is represented by the N's that you are seeing. If you keep scrolling to the right or jump to a different location you should be able to see sequence/reads.
I suggest that you give IGV a try as a graphical viewer with your reference/bam/bai files.
Comment
-
Latest Articles
Collapse
-
by GATTACATLove this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
-
Channel: Articles
07-01-2026, 11:43 AM -
-
by SEQadmin2
I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.
Here are nine questions we think about, in roughly the order they matter, before...-
Channel: Articles
-
ad_right_rmr
Collapse
News
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SEQadmin2, 07-02-2026, 11:08 AM
|
0 responses
25 views
0 reactions
|
Last Post
by SEQadmin2
07-02-2026, 11:08 AM
|
||
|
Started by SEQadmin2, 06-30-2026, 05:37 AM
|
0 responses
23 views
0 reactions
|
Last Post
by SEQadmin2
06-30-2026, 05:37 AM
|
||
|
Started by SEQadmin2, 06-26-2026, 11:10 AM
|
0 responses
23 views
0 reactions
|
Last Post
by SEQadmin2
06-26-2026, 11:10 AM
|
||
|
Whole-Genome Sequencing Traces Faroe Islands Ancestry to a North Atlantic Founder Population
by SEQadmin2
Started by SEQadmin2, 06-17-2026, 06:09 AM
|
0 responses
55 views
0 reactions
|
Last Post
by SEQadmin2
06-17-2026, 06:09 AM
|
Comment