Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wmseq
    Member
    • May 2011
    • 71

    #1

    questions on the three index files for RNAseq analysis

    Hi every one,
    During preperation of the count file, I met three index files--- .bt2 file from bowtie2-build, .fa.fai file from samtools faidx, and .bam.bai file from samtools index.

    My first question is:
    Is there any one know the difference between them and their purposes?

    According to some tutorials, the first two are directedly used in the following commands; and as to the last, it is the .bam file that is used in the following command instead of it.

    Why the last one could not be used directedly in the following command?

    Thanks a lot!!

    Richard
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    The bt2 files are used by bowtie2. The .fai is just the index for the reference genome. I think tophat2 makes use of that, though I don't recall (it's very small, regardless). If you ever need to quickly extract a region of the genome, you can "samtools faidx genome.fa chrX:1000-20000", which uses the .fai file internally to know where to quickly seek. The .bai file is similar, but it allows samtools to quickly extract reads from a specified location in a BAM file. If you ever need to "samtools view foo.bam chrX:1000-20000" then you'll find that you need to the .bai file. Also, the .bai file is used by programs like IGV (for the same reasons, in fact).

    Comment

    • wmseq
      Member
      • May 2011
      • 71

      #3
      Hi Devon,
      Glad to meed you again. Thanks a lot!!
      Then, in the following commands, using the .sam file is right no matter what programs will be used. If they need the .bai file, they will find it internally, right?

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        They'll find it if you're using the BAM file and they have a need for the index (which needs to be in the same directory as the BAM file to which it belongs). If a program just needs a SAM file (e.g., htseq-count), then it's not doing random access and won't bother with the index.

        Comment

        • wmseq
          Member
          • May 2011
          • 71

          #5
          Devon, thans! I got it.
          Another question:
          When I converted the sam files to the bam files, I used the fa.fai reference file in the command of "samtools import " instead of the fa referece file, because I did it before I got your answer. Do you think that It is ok for the convertion of the sam files, or I have to convert them using the fa reference file again?

          Comment

          • dpryan
            Devon Ryan
            • Jul 2011
            • 3478

            #6
            What version of samtools are you using that it still has the "import" command? That's extremely old and you'd be advised to upgrade. "samtools view -bS foo.sam > foo.bam" doesn't require any index files. I don't recall what the syntax was for the old import commands, that hasn't been used in forever :P

            Comment

            • wmseq
              Member
              • May 2011
              • 71

              #7
              I used samtools-0.1.17

              Comment

              Latest Articles

              Collapse

              • SEQadmin2
                16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
                by SEQadmin2




                NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification, detection...
                Today, 06:46 AM
              • SEQadmin2
                Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                by SEQadmin2



                Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                ...
                10-14-2026, 09:55 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by SEQadmin2, 10-28-2026, 09:57 AM
              0 responses
              22 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-28-2026, 09:51 AM
              0 responses
              14 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-22-2026, 11:13 AM
              0 responses
              67 views
              0 reactions
              Last Post SEQadmin2  
              Started by SEQadmin2, 10-22-2026, 10:48 AM
              0 responses
              47 views
              0 reactions
              Last Post SEQadmin2  
              Working...