FelixKrueger / Bismark

A tool to map bisulfite converted sequence reads and determine cytosine methylation states
http://felixkrueger.github.io/Bismark/
GNU General Public License v3.0
394 stars 103 forks source link

Bismark genome preparation issue #685

Closed lahyusof closed 1 month ago

lahyusof commented 4 months ago

Hi Felix,

Newbie to Bioinformatics here. I'm trying to build an index for my reference genome from Ubuntu using the following script:

Bismark genome prep

I've been able to run bowtie2-build on it just fine. I specified the file path to my reference genome (in fasta format). Any idea where I'm going wrong?

FelixKrueger commented 4 months ago

I believe there are potentially 2 issues here: 1: if bowtie2-build is already in your PATH then you can just lose the option. Other wise it would the be path to where Bowtie2 is installed (and not the executable bowtie2-build itself) 2: similarly here, you need to specific the path to a directory containing the genome .fa (or .fasta) file. You might have done this right, but it looks like you named the folder ending in .fasta, not sure if it really contains a .fa or .fasta file

Good luck!

lahyusof commented 4 months ago

Hi Felix, thank you for taking the time to answer.

The reference genome (in fasta format) that I intend to index is in a folder called 'MR219' (as seen from the first line in the terminal).

image

I tried 4 renditions of the command; replacing the bowtie2-build with the path where Bowtie2 is installed: 1.Specifying the genome-containing directory (MR219.)

  1. Further specifying the fasta file in the 'MR219 'folder
  2. Adding the bowtie2 version up to the 'MR219' folder
  3. Bowtie2 version up to the fasta file

I am still not getting anything successful. Am I missing a step somewhere?

FelixKrueger commented 4 months ago

Hmm, it really shouldn't be hard... I noticed that you have a rogue ~ in the command, that will probably incorrectly be interpreted as the genome input folder....

Generally, if you get an error "No such file or directory" then the folder you specified is mis-spelled and/or doesn't exist. Type ls -l /that/path/ to confirm.

The easiest way to get this to work is to have Bowtie 2 in the PATH, so that if you type bowtie2 --version you need to see the version. In case you have Bowtie2 installed elsewhere and don't want to add it to PATH, the specifying /usr/bin/bowtie2-2.4.4/bowtie2 --version needs to work.

Here is an example for a folder called E_coli on my machine:

E_coli
└── E_coli_K12.fa

The command is:

bismark_genome_preparation --verbose E_coli/

This works because bowtie2 is in the PATH.

If you want to specify it manually, I could do this like so:

which bowtie2
/opt/homebrew/bin/bowtie2

The command would thus be:

bismark_genome_preparation --verbose E_coli/ --path_to_aligner /opt/homebrew/bin/

You just need to get the path of your files right, and it will all fall into place! Good luck! :P