Open mmokrejs opened 5 years ago
The dependencies of bam2wig have been kind of a nuisance. We now have a Python3 script that utilizes samtools directly and does not require linking of any kind: https://github.com/Gaius-Augustus/Augustus/commit/3da1d64553bafb7d0a80decea0b09e11dfd4a872
bamToWig.py lowers the priority of this issue. bam2wig might become deprecated.
Hi, I am struggling with bam2wig as well. I followed the instructions here https://github.com/Gaius-Augustus/Augustus/blob/master/auxprogs/bam2wig/README.txt and installed bcftools, samtools and htslib, all in the same place. The last command doesn't make sense to me. Why type in make when bam2wig doesn't have a make file? Accordingly, I can't install Augustus, because it is missing bam2wig. I'd be happy to use bamtoWig instead, but do I implement it? I'd be really thankful for a pointer here... Best, Mathilde
bam2wig does have a Makefile: https://github.com/Gaius-Augustus/Augustus/blob/master/auxprogs/bam2wig/Makefile
It shouldn't be a problem to compile AUGUSTUS without bam2wig. Except from the main Makefile of Augustus:
all: mkdir -p bin cd src && ${MAKE} cd auxprogs && ${MAKE}
This means, AUGUSTUS is compiled before any of the auxprogs are touched.
In the auxprogs/Makefile, only utrrnaseq was after bam2wig. I altered that order with commit https://github.com/Gaius-Augustus/Augustus/commit/1eaf5ae1d65696c13bd8d876f70bc9004ce7f5b2 . So it really shouldn't matter if compilation of bam2wig fails, since in practice, you can simply use bamToWig.py to accomplish the same task.
I'm also having issues with bamToWig:
ERROR in file /packages/braker/2.1.4/scripts/braker.pl at line 10244 Failed to execute: /packages/python/3.6.7/bin/python3 /gpfs/packages/augustus/3.3.3/scripts/bamToWig.py -b /gpfs/projects/nereus/mcurrey/ptae/annotate/braker/rnaseq_plus.s.bam -g /gpfs/projects/nereus/mcurrey/ptae/annotate/braker/genome.fa -o /gpfs/projects/nereus/mcurrey/ptae/annotate/braker/rnaseq_plus.wig 2> /gpfs/projects/nereus/mcurrey/ptae/annotate/braker/errors/bamToWig_plus.err
Traceback (most recent call last):
File "/gpfs/packages/augustus/3.3.3/scripts/bamToWig.py", line 154, in
Please update sources from github. This issue has been fixed.
On Tue 15. Oct 2019 at 23:01, Mark Currey notifications@github.com wrote:
I'm also having issues with bamToWig:
ERROR in file /packages/braker/2.1.4/scripts/braker.pl at line 10244 Failed to execute: /packages/python/3.6.7/bin/python3 /gpfs/packages/augustus/3.3.3/scripts/bamToWig.py -b /gpfs/projects/nereus/mcurrey/ptae/annotate/braker/rnaseq_plus.s.bam -g /gpfs/projects/nereus/mcurrey/ptae/annotate/braker/genome.fa -o /gpfs/projects/nereus/mcurrey/ptae/annotate/braker/rnaseq_plus.wig 2> /gpfs/projects/nereus/mcurrey/ptae/annotate/braker/errors/bamToWig_plus.err
Traceback (most recent call last): File "/gpfs/packages/augustus/3.3.3/scripts/bamToWig.py", line 154, in with urllib.request.urlopen(tool_url) as response, open(key, 'wb') as out_file: AttributeError: module 'urllib' has no attribute ‘request'
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Gaius-Augustus/Augustus/issues/53?email_source=notifications&email_token=AJMC6JF4UPB6TGH4UIM6FK3QOYVSNA5CNFSM4HCJI4F2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBKGT3Q#issuecomment-542403054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMC6JFTXHJX67UDR7C6QLLQOYVSNANCNFSM4HCJI4FQ .
Dear Augustus team,
I think I have the same issue with Augustus 3.3.3 ( I follow the instruction from samtools, bamtools) but I have this error :
g++ -o "utrrnaseq" ./src/Compute_UTRs.o ./src/Coord_Transform.o ./src/Genomic_Data.o ./src/Splice_Sites.o ./src/Supporting_Methods.o ./src/Test.o ./src/UTRs.o ./src/main.o
Finished building target: utrrnaseq
make[2]: Leaving directory '/opt/Augustus/auxprogs/utrrnaseq/Debug' cd bam2wig; make; make[2]: Entering directory '/opt/Augustus/auxprogs/bam2wig' gcc -Wall -O2 -I/tools/samtools -I. -I/tools/htslib -I/tools/bcftools -c bam2wig.c -o bam2wig.o bam2wig.c:18:10: fatal error: sam.h: No such file or directory
^~~~~~~
compilation terminated. Makefile:33: recipe for target 'bam2wig.o' failed make[2]: [bam2wig.o] Error 1 make[2]: Leaving directory '/opt/Augustus/auxprogs/bam2wig' Makefile:7: recipe for target 'all' failed make[1]: [all] Error 2 make[1]: Leaving directory '/opt/Augustus/auxprogs' Makefile:7: recipe for target 'all' failed make: *** [all] Error 2 FATAL: post proc: exit status 2 FATAL: While performing build: while running engine: exit status 255
Can you help me ?
It shouldn't be a problem to compile AUGUSTUS without bam2wig
This should be in the Readme.
We install Augustus because it is a dependency of BUSCO.
That error message from bam2wig
is confusing.
HI!
I have a query related to AUGUSTUS (gene prediction tool) I could install all the dependencies required to install Augustus but unable to install bam2wig I followed README.md and installed bam2wig's dependency HTSlib and was successful in installing it but still bam2wig isn't working correctly. Kindly guide how to go about it.
I wrote "make" in bam2wig folder
Output:
cc -Wall -O2 -c bam2wig.c -o bam2wig.o -I/usr/include/htslib bam2wig.c: In function ‘main’: bam2wig.c:62:2: error: unknown type name ‘hts_pos_t’ hts_pos_t beg, end, pos; ^ bam2wig.c:89:17: error: ‘HTS_POS_MAX’ undeclared (first use in this function) beg = 0; end = HTS_POS_MAX; tid = -1; ^ bam2wig.c:89:17: note: each undeclared identifier is reported only once for each function it appears in bam2wig.c:107:2: error: unknown type name ‘sam_hdr_t’ sam_hdr_t htmp = bam_hdr_read(data[0]->bgzf_fp); ^ bam2wig.c:107:20: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] sam_hdr_t htmp = bam_hdr_read(data[0]->bgzf_fp); ^ bam2wig.c:112:4: warning: implicit declaration of function ‘hts_parse_region’ [-Wimplicit-function-declaration] hts_parse_region(reg, &tid, &beg, &end, (hts_name2id_f)bam_name2id, htmp, 0); ^ bam2wig.c:141:21: warning: implicit declaration of function ‘bam_mplp64_auto’ [-Wimplicit-function-declaration] while ((exitCode = bam_mplp64_auto(mplp, &tid, &pos, n_plp, plp)) > 0) ^ bam2wig.c:149:23: error: request for member ‘target_name’ in something not a structure or union newTargetName = htmp->target_name[tid]; ^ bam2wig.c:172:11: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] printf("%ld %d\n", pos+1, coverage); ^ bam2wig.c:185:2: warning: implicit declaration of function ‘sam_hdr_destroy’ [-Wimplicit-function-declaration] sam_hdr_destroy(htmp); ^ Makefile:46: recipe for target 'bam2wig.o' failed make: [bam2wig.o] Error 1 (ignored) Check if HTSlib is installed and of version 1.10 or higher - see README.txt Makefile:46: recipe for target 'bam2wig.o' failed make: *** [bam2wig.o] Error 1
I usually skip compiling bam2wig (I confirm that it is currently very difficult). Wie have a python script in the scripts folder that does the same job. You can safely skip bam2wig.
On Tue, Mar 2, 2021 at 11:15 AM aditi17142 notifications@github.com wrote:
HI!
I have a query related to AUGUSTUS (gene prediction tool) I could install all the dependencies required to install Augustus but unable to install bam2wig I followed README.md and installed bam2wig's dependency HTSlib ans was successfully in installing it but still bam2wig isn't working correctly. Kindly guide how to go about it.
I wrote "make" in bam2wig folder
Output:
cc -Wall -O2 -c bam2wig.c -o bam2wig.o -I/usr/include/htslib bam2wig.c: In function ‘main’: bam2wig.c:62:2: error: unknown type name ‘hts_pos_t’ hts_pos_t beg, end, pos; ^ bam2wig.c:89:17: error: ‘HTS_POS_MAX’ undeclared (first use in this function) beg = 0; end = HTS_POS_MAX; tid = -1; ^ bam2wig.c:89:17: note: each undeclared identifier is reported only once for each function it appears in bam2wig.c:107:2: error: unknown type name ‘sam_hdr_t’ sam_hdr_t htmp = bam_hdr_read(data[0]->bgzf_fp); ^ bam2wig.c:107:20: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] sam_hdr_t htmp = bam_hdr_read(data[0]->bgzf_fp); ^ bam2wig.c:112:4: warning: implicit declaration of function ‘hts_parse_region’ [-Wimplicit-function-declaration] hts_parse_region(reg, &tid, &beg, &end, (hts_name2id_f)bam_name2id, htmp, 0); ^ bam2wig.c:141:21: warning: implicit declaration of function ‘bam_mplp64_auto’ [-Wimplicit-function-declaration] while ((exitCode = bam_mplp64_auto(mplp, &tid, &pos, n_plp, plp)) > 0) ^ bam2wig.c:149:23: error: request for member ‘target_name’ in something not a structure or union newTargetName = htmp->target_name[tid]; ^ bam2wig.c:172:11: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] printf("%ld %d\n", pos+1, coverage); ^ bam2wig.c:185:2: warning: implicit declaration of function ‘sam_hdr_destroy’ [-Wimplicit-function-declaration] sam_hdr_destroy(htmp); ^ Makefile:46: recipe for target 'bam2wig.o' failed make: [bam2wig.o] Error 1 (ignored) Check if HTSlib is installed and of version 1.10 or higher - see README.txt Makefile:46: recipe for target 'bam2wig.o' failed make: *** [bam2wig.o] Error 1
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Gaius-Augustus/Augustus/issues/53#issuecomment-788793597, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJMC6JCQWZWOEJNGEE4Y7DTTBS3DPANCNFSM4HCJI4FQ .
Thank you for replying @KatharinaHoff I would request you if you could guide more specifically how I can skip the bam2wig file and execute augustus. As when I checked into scripts directory, I could find bam2wig.py. While executing the file I typed ./bamToWig.py Output usage: bamToWig.py [-h] -b BAMFILE -g GENOMEFILE -o OUTFILE [-s SAMTOOLS_PATH] bamToWig.py: error: the following arguments are required: -b/--bamFile, -g/--genomeFile, -o/--outFile
Kindly guide. Thank you.
Hello, this problem persists on Ubuntu 20.04, after installing the htslib both ways per instructions here https://github.com/Gaius-Augustus/Augustus/blob/master/auxprogs/bam2wig/README.md
Seems like the TOOLDIR in the bam2wig Makefile was overriding my local TOOLDIR export? I ended up using the second install method (... install htslib from github.com/samtools), and hashed out default TOOLDIR code in the the Augustus/auxprogs/bam2wig/Makefile, and replaced it with my local TOOLDIR, as below
export TOOLDIR=/my/dir/to/htslib
This compiled the bam2wig executalbe which worked on the Augustus/tests/short/auxprogs/bam2wig/test_files/test.s.bam file, and allowed the augustus install
@aditi17142 : probably a version of HTSlib lower than 1.10 is used compare compiler output "Check if HTSlib is installed and of version 1.10 or higher" see docs/INSTALL.md for help and Augustus#307
@chris1234321 : the build process has been updated and TOOLDIR has been made obsolete, please use INCLUDE_PATH_HTSLIB and LIBRARY_PATH_HTSLIB in commons.mk and see the HTSlib section in docs/INSTALL.md
Still BROKEN; fix is here: https://github.com/Gaius-Augustus/Augustus/issues/307
亲爱的奥古斯都团队,
我认为我与 Augustus 3.3.3 有同样的问题(我按照 samtools、bamtools 的说明进行操作),但出现此错误: g++ -o“utrrnaseq” ./src/Compute_UTRs.o ./src/Coord_Transform.o ./ src/Genomic_Data.o ./src/Splice_Sites.o ./src/Supporting_Methods.o ./src/Test.o ./src/UTRs.o ./ 已src/main.o完成目标构建:utrrnaseq
make[2]: 离开目录“/opt/Augustus/auxprogs/utrrnaseq/Debug” cd bam2wig;制作; make[2]: 进入目录“/opt/Augustus/auxprogs/bam2wig” gcc -Wall -O2 -I/tools/samtools -I. -I/tools/htslib -I/tools/bcftools -c bam2wig.c -o bam2wig.o bam2wig.c :18:10: 致命错误:sam.h: 没有此文件或目录 #include "sam.h" ^ Makefile:33:目标“bam2wig.o”的配方失败make [2]: [bam2wig.o]错误1make [2]:离开目录“/opt/ Augustus/auxprogs/bam2wig” Makefile:7:目标“all”的配方失败 make[1]: [all] 错误 2 make[1]:离开目录“/opt/Augustus/auxprogs” Makefile:7:目标“all”的配方失败 make:*** [all] 错误 2 FATAL:后处理:退出状态 2 FATAL:执行时构建:运行引擎时:退出状态 255
你能帮我吗? file in here,add CLAGS args in Makefile or make conmmand. htslib/1.11/include/htslib/sam.h
It does not seem one needs any of the following to link:
$(HTSLIB)/libhts.a -lcurses -lm -lz -lpthread -lcurl -lssl -lcrypto
, only-lbam
is needed.