maickrau / GraphAligner

MIT License
261 stars 32 forks source link

Several issues about installsion version,compile,and assertion. #91

Open linsindian opened 1 year ago

linsindian commented 1 year ago

Hello, I recently wanted to use Graphaligner to align the sequences of hg002 back to the GRCh38 Graph (Minigraph-cactus) released by hprc. During the process, I encountered the following issues and would like to seek your advice:

  1. Version issues during conda install.
  2. Inability to successfully compile by myself.
  3. Some reads failed during the mapping process, but not all versions seem to have this issue.

1.At first, I attempted to install Graphaligner using the command conda install -c bioconda graphaligner, but I noticed that it installed version 1.0.13 instead of the latest version, which is 1.0.17b. So, I tried to specify the version during installation using the command conda install -c bioconda graphaligner=1.0.17b=h21ec9f0_2. However, this installation resulted in the following error:

Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: - Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

ResolvePackageNotFound:

  • libstdcxx-ng[version='>=12']

Each time I encountered the "ResolvePackageNotFound" error, the specific packages mentioned were not consistent. I encountered three different packages, including "libzlib[version='>=1.2.11,<1.3.0a0'], libgcc-ng[version='>=12'], jemalloc==5.2.0." I attempted to install older versions of Graphaligner sequentially, starting from 1.0.17b, in an effort to find a version that would install successfully without encountering this error. However, the same problem persisted until version 1.0.13. This version corresponds to the one that was initially installed when using the "conda install -c bioconda graphaligner" command without specifying a version.

I was finally able to successfully install the latest version, 1.0.17b, by using the command conda install -c conda-forge -c bioconda graphaligner=1.0.17b=h21ec9f0_2. Interestingly, if I directly use conda install -c conda -forge -c bioconda graphaligner without specifying the version, it installs version 1.0.17 instead of 1.0.17b. I am not certain whether other users have encountered a similar issue during the "conda install" process. As of now, it seems that adding the "-c conda-forge" channel and specifying the version can resolve the problem of installing an older version. However, there remains uncertainty about whether this might lead to unexpected issues during execution.

2.While attempting to install the latest version, I followed the suggested method on GitHub to compile it myself. However, throughout the process, I consistently encountered issues like the ones shown below. Even after creating a new environment and attempting to compile, I still faced the same problem.

protoc -I=src --cpp_out=src src/vg.proto /bip7_disk/sindian111/miniconda3/envs/GraphAligner/bin/x86_64-conda-linux-gnu-c++ -c -o obj/Aligner.o src/Aligner.cpp -Wall -Wextra -std=c++17 -O3 -g -Iconcurrentqueue -IBBHash -Izstr/src -Iparallel-hashmap/parallel_hashmap/ pkg-config --cflags protobuf pkg-config --cflags libsparsehash -Wno-unused-parameter -IMEMfinder/src -Ijemalloc-config --includedir In file included from src/Aligner.cpp:12: src/stream.hpp:58: warning: ignoring '#pragma omp critical' [-Wunknown-pragmas] 58 #pragma omp critical (stream_out)
src/stream.hpp:70: warning: ignoring '#pragma omp critical' [-Wunknown-pragmas] 70 #pragma omp critical (stream_out)
src/stream.hpp:153: warning: ignoring '#pragma omp parallel' [-Wunknown-pragmas] 153 #pragma omp parallel shared(more_input, more_objects, objects, count, in, lambda, handle_count, raw_in, gzip_in, coded_in)
src/stream.hpp:158: warning: ignoring '#pragma omp critical' [-Wunknown-pragmas] 158 #pragma omp critical (objects)
src/stream.hpp:171: warning: ignoring '#pragma omp master' [-Wunknown-pragmas] 171 #pragma omp master
src/stream.hpp:186: warning: ignoring '#pragma omp critical' [-Wunknown-pragmas] 186 #pragma omp critical (objects)
src/stream.hpp:196: warning: ignoring '#pragma omp critical' [-Wunknown-pragmas] 196 #pragma omp critical (objects)
In file included from BBHash/ParallelBB.h:7, from src/MinimizerSeeder.h:9, from src/Aligner.cpp:19: BBHash/BooPHF.h:39: warning: ignoring '#pragma mark ' [-Wunknown-pragmas] 39 #pragma mark -
BBHash/BooPHF.h:40: warning: ignoring '#pragma mark utils' [-Wunknown-pragmas] 40 #pragma mark utils
BBHash/BooPHF.h:335: warning: ignoring '#pragma mark ' [-Wunknown-pragmas] 335 #pragma mark -
BBHash/BooPHF.h:336: warning: ignoring '#pragma mark hasher' [-Wunknown-pragmas] 336 #pragma mark hasher
In file included from BBHash/ParallelBB.h:7, from src/MinimizerSeeder.h:9, from src/Aligner.cpp:19: BBHash/BooPHF.h:512: warning: ignoring '#pragma mark ' [-Wunknown-pragmas] 512 #pragma mark -
BBHash/BooPHF.h:513: warning: ignoring '#pragma mark iterators' [-Wunknown-pragmas] 513 #pragma mark iterators
BBHash/BooPHF.h:540: warning: ignoring '#pragma mark ' [-Wunknown-pragmas] 540 #pragma mark -
BBHash/BooPHF.h:541: warning: ignoring '#pragma mark BitVector' [-Wunknown-pragmas] 541 #pragma mark BitVector
BBHash/BooPHF.h:795: warning: ignoring '#pragma mark ' [-Wunknown-pragmas] 795 #pragma mark -
BBHash/BooPHF.h:796: warning: ignoring '#pragma mark level' [-Wunknown-pragmas] 796 #pragma mark level
BBHash/BooPHF.h:829: warning: ignoring '#pragma mark ' [-Wunknown-pragmas] 829 #pragma mark -
BBHash/BooPHF.h:830: warning: ignoring '#pragma mark mphf' [-Wunknown-pragmas] 830 #pragma mark mphf
BBHash/BooPHF.h:1530: warning: ignoring '#pragma mark ' [-Wunknown-pragmas] 1530 #pragma mark -
BBHash/BooPHF.h:1531: warning: ignoring '#pragma mark threading' [-Wunknown-pragmas] 1531 #pragma mark threading

In file included from src/MinimizerSeeder.h:7, from src/Aligner.cpp:19: /bip7_disk/sindian111/miniconda3/envs/GraphAligner/include/sdsl/int_vector.hpp:1393:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 1393 | inline auto | ^~~~ /bip7_disk/sindian111/miniconda3/envs/GraphAligner/include/sdsl/int_vector.hpp:1401:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 1401 | inline auto | ^~~~ /bip7_disk/sindian111/miniconda3/envs/GraphAligner/include/sdsl/int_vector.hpp:1409:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 1409 | inline auto | ^~~~ /bip7_disk/sindian111/miniconda3/envs/GraphAligner/include/sdsl/int_vector.hpp:1417:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 1417 | inline auto | ^~~~ /bip7_disk/sindian111/miniconda3/envs/GraphAligner/include/sdsl/int_vector.hpp:1425:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 1425 | inline auto | ^~~~ /bip7_disk/sindian111/miniconda3/envs/GraphAligner/include/sdsl/int_vector.hpp:1433:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 1433 | inline auto | ^~~~ In file included from BBHash/ParallelBB.h:7, from src/MinimizerSeeder.h:9, from src/Aligner.cpp:19: BBHash/BooPHF.h: In member function 'void boomphf::Progress::finish_threaded()': BBHash/BooPHF.h:241:32: warning: unused variable 'rem' [-Wunused-variable] 241 | double rem = 0;

3.After successfully installing version 1.0.17b using the "-c conda-forge" channel, I attempted to align the provided pangenome graph from hprc with the sequences of hg002 using the following command: GraphAligner -x vg -g ./hprc-v1.1-mc-grch38.gfa -f hg002.ont.30x.fa -a hg002.ont.30x.gam -t 16

During the execution, I encountered the following issues:

src/GraphAlignerBitvectorCommon.h:1118: Assertion 'previous.node(neighbor).endSlice.scoreEnd >= scoreHere-(eq?0:1)' failed. Read: tag1118__87653b2c-7593-410e-88fb-85bad2996184. Seed: 0+,0,0,0

src/GraphAligner.h:646: Assertion 'trace.trace[i].DPposition.seqPos == trace.trace[i-1].DPposition.seqPos || trace.trace[i].DPposition.seqPos == trace.trace[i-1].DPposition.seqPos+1' failed. Read: tag647__a449a8a3-3217-4501-83e9-ac016120ea99. Seed: 0+,0,0,0

src/GraphAlignerBitvectorBanded.h:537: Assertion 'currentSlice.node(i).minScore <= currentSlice.node(i).startSlice.scoreEnd' failed. Read: tag536__7869584b-a638-4d42-9ee1-a3fef9b19272. Seed: 0+,0,0,0

The most common failed encountered was "Assertion 'currentSlice.node(i).minScore <= currentSlice.node(i).startSlice.scoreEnd' failed." Subsequently, I extracted 80 sequences from these three types of failed reads for testing. I found that in versions 1.0.17b and 1.0.17, all 80 of them reported failed. In versions 1.0.15 and 1.0.16, 69 sequences was failed. However, in version 1.0.13, these 80 sequences aligned successfully without failed.

Although other issues have mentioned that failed reads do not affect the alignment of other reads, I still wanted to confirm whether there was an issue during my installation process or if you have any suggestions regarding these matters.

Thank you for reading, and I look forward to your response.