DaehwanKimLab / hisat2

Graph-based alignment (Hierarchical Graph FM index)
GNU General Public License v3.0
464 stars 113 forks source link

Conversion table regex error for HISAT-3N: `terminate called after throwing an instance of 'std::regex_error'` #285

Closed metamaden closed 3 years ago

metamaden commented 3 years ago

Hello,

I'm getting an error when I attempt to build the conversion table using HISAT-3N. I have a sorted SAM file for a paired-end Bisulfite-seq sample from the eGTEx project. My command looks like:

hisat-3n-table -p 16 --sam $sampath --ref $genomepath --table-name $tablepath --base-change C,T

This returns the error message:

terminate called after throwing an instance of 'std::regex_error' what():  regex_error
/var/spool/slurmd/job15368693/slurm_script: line 13: 131670 Aborted                 (core dumped) hisat-3n-table -p 16 --sam $sampath --ref $genomepath --table-name $tablepath --base-change C,T

It looked like this error might have originated with my gcc version (v.4.8.5), but I get the same error if I use a newer gcc version (v.9.3.0), per the Stack Overflow thread here.

Running hisat-3n --help shows I'm using "HISAT2 version 2.2.1-3n".

Any advice is appreciated -- thanks in advance!

parkchanhee commented 3 years ago

@metamaden HISAT2 requires a compiler that supports the c++11 version. The gcc 4.8.5 is too old to compile the HISAT2. And, could you please make sure that the hisat-3n-table is compiled by gcc 9.3?

metamaden commented 3 years ago

Hi @parkchanhee ,

Thanks for your prompt reply! It looks like I get the same error if I switch the gcc version to 9.3.0, e.g. gcc --version returns:

gcc (Spack GCC) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I wonder if there's a way to specify the gcc path from hisat-3n-table? I can't tell, as I get the same error if I try to access help with hisat-3n-table --help. This returns:

terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
Aborted (core dumped)

Thanks,

Sean

parkchanhee commented 3 years ago

@metamaden You can change the gcc path like this:

make hisat-3n-table CC='Path to gcc' CPP='Path to g++'
ex> make hisat-3n-table CC=/usr/bin/gcc CPP=/usr/bin/g++

It would be useful if you upload a log of the make command

metamaden commented 3 years ago

Thanks @parkchanhee ! I just realized I wasn't using the newer gcc version when I originally ran make. As a result, it looks like I was working with a partial installation.

I've just re-cloned the hisat2n repo, and re-run make for hisat-3n with gcc 9.3.0 enabled. So far, so good! I'm able to view hisat-3n-table --help and my script with hisat-3n-table is now running.

Thanks

Sean