BenLangmead / bowtie2

A fast and sensitive gapped read aligner
GNU General Public License v3.0
638 stars 160 forks source link

Issues trying to make install bowtie2-2.2.2 #432

Closed lateral-search closed 2 months ago

lateral-search commented 1 year ago

Hi, sorry for this issue belonging to an old version of bowtie2, it's just that I'm dedicated to finish a coursera specialization in genomics, and I'm stuck in the course about the command line 4 genomics, where they ask to install an specific version of bowtie2, I know by previous experience that better respect the versions indicated or results may vary. I used to have a Linux in another computer, but now I'm working with WSL2 (Windows Subsystem for Linux) using ubuntu until now everything works fine in this context. I'm receiving multiple "errors" while I executing make or gmake, I get into the code and repair some of them, but some continue appearing, and are a king of non sense, like for example

//////////////////one of them was:

diff_sample.h:176:67: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 176 | if(!diffs[d2]) diffCnt++; diffs[d2] = true; | ^~~~~ make: *** [Makefile:235: bowtie2-build-s] Error 1

Which I solve it just changing adding { } to each if clause:

                                    if(!diffs[d1]) {
                                            diffCnt++;
                                            diffs[d1] = true;
                                    }
                                    if(!diffs[d2]) {
                                            diffCnt++;
                                            diffs[d2] = true;
                                    }

/////////////In the next intent of "make" I receive this other:

processor_support.h:52:22: error: extended character “ is not valid in an identifier 52 | std::cerr << “ERROR: please define __cpuid() for this build.\n”; | ^ processor_support.h:52:70: error: extended character ” is not valid in an identifier 52 | std::cerr << “ERROR: please define __cpuid() for this build.\n”; | ^

so I get into processor_support.h and just changed (') instead of (") and that worked,

////////////Then I executed "make" and in the nexts steps another new error:::

aligner_result.cpp: In member function ‘bool AlnFlags::printYF(BTString&, bool) const’: aligner_result.cpp:1131:17: error: ordered comparison of pointer with integer zero (‘const char*’ and ‘int’) 1131 | if(flag > 0) { | ~^~~ In file included from aligner_seed2.h:103,

To fix this one I can think that this flag variable is being compared with zero using the > operator, but flag is actually a pointer to a character array (i.e., a const char*). Being an invalid comparison, since pointers are memory addresses and not integers. To fix I can flag variable being initialized as an integer, rather than a pointer, BUT here I think I'm going to a grey zone since I have not a great knowledge about the bowtie2 architecture, so I can make a mess.

I just want to know if I'm wrong with the source I downloaded or something, because I didn;t have this problems when I did the same process in cygwin some weeks ago whith the same version of bowtie2.

I get that source from:: wget https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.2.2/bowtie2-2.2.2-source.zip/download -O bowtie2-2.2.2-source.zip

Thank you in advance, and by the way say thank you to Ben for doing such a great work as an instructor on the course of algorithms for GDS

Andres