No announcement yet.

Bowtie: How do I map files to reference genome?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Bowtie: How do I map files to reference genome?

    I want to map out1.fq and out2.fq to the reference genome `NC_008253.fa.fai` based on the following conditions:
    • - seed length=24
      - hits written in sam file format
      - maximum insert size=600
      - mates are in the forward/reverse orientation
      - input files are fastq format
      - output the wall-clock time
      - seed sequence mismatches=3
      - output the mapped and unmapped reads in separate files

    bowtie -q  out1.fq out2.fq -x 1.bt2 NC_008253.fa.fai -l/--seedlen 24 -S/--sam -X/--maxins 600 -t/--time -v 3 > mapped

  • #2
    Hi Melissa,

    I'm assuming you did not test this command and are wondering if it will work. From the look of it it will not. The first thing you'll want to do is to choose between the single-character option or the long, more readable one (e.g. choose between -l or --seedlen) because you can't provide both. The short one is more raw and makes for a very short command, but the longer one is more readable and may be useful for future you or colleagues who might use that command.

    Then, before mapping to a reference genome, you need to index it using the bowtie-build command (or bowtie2-build command, depending on your input data). It will create an index for your genome; that index is what will be used by the bowtie(2) command to align your reads.

    Then, I recommend testing your command and seeing what happens. The logs will help you troubleshoot, and if google can't help you make sense of errors you might have, don't hesitate to ask about it here (or to browse this or other forums, as it is highly probable someone else ran into the same errors as you well.

    Finally, you might want to evaluate wether you need bowtie or bowtie2; if you're not sure, this might help.

    Cheers !