abyzovlab / CNVnator

a tool for CNV discovery and genotyping from depth-of-coverage by mapped reads
Other
211 stars 66 forks source link

issue during make or make OMP=no #209

Closed gatiyatov closed 3 years ago

gatiyatov commented 4 years ago

I did all steps accordingly https://github.com/abyzovlab/CNVnator, but after make or make OMP=no an error was emerged. I don't understand the reason for this problem.

(base) yura@yura-VirtualBox:~/CNVnator$ make Compiling with parallel (OpenMP) support g++ -O3 -std=c++11 -DCNVNATOR_VERSION=\"v0.4.1\" -fopenmp -I/home/yura/root/include -Isamtools -c IO.cpp -o obj/IO.o IO.cpp: In member function ‘void IO::cptrees(std::cxx11::string, std::cxx11::string*, int)’: IO.cpp:420:3: error: ‘set’ was not declared in this scope set userchr; ^ IO.cpp:420:13: error: expected primary-expression before ‘>’ token set userchr; ^ IO.cpp:420:15: error: ‘userchr’ was not declared in this scope set userchr; ^ Makefile:69: recipe for target 'obj/IO.o' failed make: *** [obj/IO.o] Error 1

oghzzang commented 4 years ago

I had same error.

user@user:Tools/CNVnator/CNVnator_v0.4.1/src$ make LIBS="-lcrypto -lpthread " OMP=no Compiling with NO parallel support g++ -O3 -std=c++11 -DCNVNATOR_VERSION=\"v0.4.1\" -I/data/jihye/Brain/Tools/CNVnator/root/include -Isamtools -Isamtools/htslib-1.9 -Isamtools/htslib-1.9/htslib -c cnvnator.cpp -o obj/cnvnator.o g++ -O3 -std=c++11 -DCNVNATOR_VERSION=\"v0.4.1\" -I/data/jihye/Brain/Tools/CNVnator/root/include -Isamtools -Isamtools/htslib-1.9 -Isamtools/htslib-1.9/htslib -c EXOnator.cpp -o obj/EXOnator.o g++ -O3 -std=c++11 -DCNVNATOR_VERSION=\"v0.4.1\" -I/data/jihye/Brain/Tools/CNVnator/root/include -Isamtools -Isamtools/htslib-1.9 -Isamtools/htslib-1.9/htslib -c IO.cpp -o obj/IO.o IO.cpp: In member function 'void IO::cptrees(std::cxx11::string, std::cxx11::string*, int)': IO.cpp:420:3: error: 'set' was not declared in this scope set userchr; ^~~ IO.cpp:420:3: note: suggested alternative: 'gets' set userchr; ^~~ gets IO.cpp:420:13: error: expected primary-expression before '>' token set userchr; ^ IO.cpp:420:15: error: 'userchr' was not declared in this scope set userchr; ^~~ IO.cpp:420:15: note: suggested alternative: 'strchr' set userchr; ^~~ strchr make: *** [Makefile:70: obj/IO.o] Error 1

suvakov commented 4 years ago

Can you try now?

git pull make OMP=no

Thanks

gatiyatov commented 4 years ago

Thank you, but now nothing is happening.

suvakov commented 4 years ago

Did you get the same error?

gatiyatov commented 4 years ago

Dear Milovan, thank you for your reply. Actually I have. Previously, when I wrote about the issue, I was installing CNVnator on my laptop. Now I tried to use it on a server. I did: 1) wget https://root.cern/download/root_v6.22.00.Linux-ubuntu19-x86_64-gcc9.2.tar.gz 2) tar -xzvf root_v6.22.00.Linux-ubuntu19-x86_64-gcc9.2.tar.gz 3) sudo apt-get install dpkg-dev cmake g++ gcc binutils libx11-dev libxpm-dev \ libxft-dev libxext-dev python 4) source root/bin/thisroot.sh 5) wget https://github.com/samtools/samtools/releases/download/1.10/samtools-1.10.tar.bz2 wget https://github.com/samtools/bcftools/releases/download/1.10.2/bcftools-1.10.2.tar.bz2 wget https://github.com/samtools/htslib/releases/download/1.10.2/htslib-1.10.2.tar.bz2 tar -xf *.tar.bz2 cd samtools-1.x # and similarly for bcftools and htslib ./configure --prefix=/where/to/install make make install

6) export PATH=/where/to/install/bin:$PATH 7) sudo apt-get install libbz2-dev liblzma-dev 8) ln -s /home/cnv/iuri/apps/lib/libhts.a ln -s /path/to/src/samtools samtools ln -s /home/cnv/iuri/apps/lib/libhts.a htslib

But finally, when I do "make" there is an error: cnv@student:~/iuri/downloads/CNVnator$ make Compiling with parallel (OpenMP) support g++ -O3 -std=c++11 -DCNVNATOR_VERSION=\"v0.4.1\" -fopenmp -I/include -Isamtools -c cnvnator.cpp -o obj/cnvnator.o In file included from cnvnator.cpp:14:0: AliParser.hh:10:17: fatal error: sam.h: No such file or directory compilation terminated. Makefile:69: recipe for target 'obj/cnvnator.o' failed make: *** [obj/cnvnator.o] Error 1 cnv@student:~/iuri/downloads/CNVnator$

I am an MS student (biotech) at Skolkovo institute science and technology (Moscow). Our team is testing CNV callers for clinical application. It would be great if you had some time to help us.

Sincerely, Yuriy Gatiyatov

чт, 16 июл. 2020 г. в 17:03, Milovan Šuvakov notifications@github.com:

Did you get the same error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/abyzovlab/CNVnator/issues/209#issuecomment-659433921, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNPHHUX5FH7QNBVRZWAZCDR34CEVANCNFSM4OQKTTIA .

suvakov commented 4 years ago

Dear Yuriy,

There should be sam.h on the path: samtools/htslib-1.10/htslib/sam.h. Please check. Can you see g++ option "-Isamtools/htslib-1.10 -Isamtools/htslib-1.10/htslib" when you run "make"?

Btw, you do not need to install htslib separately, it is already within samtools-1.10.tar.bz2.

Regards, Milovan

gatiyatov commented 4 years ago

Dear professor, thank you. I will try and send the feedback.

Sincerely, Yuriy Gatiyatov

чт, 16 июл. 2020 г. в 17:54, Milovan Šuvakov notifications@github.com:

Dear Yuriy,

There should be sam.h on the path: samtools/htslib-1.10/htslib/sam.h. Please check. Can you see g++ option "-Isamtools/htslib-1.10 -Isamtools/htslib-1.10/htslib" when you run "make"?

Btw, you do not need to install htslib separately, it is already within samtools-1.10.tar.bz2.

Regards, Milovan

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/abyzovlab/CNVnator/issues/209#issuecomment-659466019, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNPHHRA7EICZCDA5LHDAADR34IDRANCNFSM4OQKTTIA .

gatiyatov commented 4 years ago

Finally, I installed CNVnator with the next steps: 1) Installed all required dependencies with the system package manager (https://root.cern/install/dependencies/) 2) Installed ROOT 3) Installed SAMTOOLS installation 1.2 (with the last 1.10 version it does not work) 4) ln -s /home/cnv/iuri/samtools-1.2/bin but this failed:
ln: failed to create symbolic link './bin': File exists ln -s /home/cnv/iuri/samtools-1.2/htslib-1.2.1 5) make clean make LIBS="-lcrypto" 6) each time befor running: source ~/iuri/root/bin/thisroot.sh cnvnator Not enough parameters. CNVnator v0.4.1 Usage: cnvnator -root out.root [-genome name] [-chrom 1 2 ...] -tree file1.bam ... [-lite] cnvnator -root out.root [-genome name] [-chrom 1 2 ...] -merge file1.root ... cnvnator -root file.root [-genome name] [-chrom 1 2 ...] -vcf [file.vcf.gz | file.vcf] [-rmchr] [-addchr] cnvnator -root file.root [-genome name] [-chrom 1 2 ...] -idvar [file.vcf.gz | file.vcf] [-rmchr] [-addchr] cnvnator -root file.root [-genome name] [-chrom 1 2 ...] -mask strict.mask.file.fa.gz [-rmchr] [-addchr] cnvnator -root file.root [-genome name] [-chrom 1 2 ...] [-d dir | -fasta file.fa.gz] -his bin_size cnvnator -root file.root [-genome name] [-chrom 1 2 ...] -baf bin_size [-hap] [-useid] [-nomask] cnvnator -root file.root [-chrom 1 2 ...] -stat bin_size cnvnator -root file.root -eval bin_size cnvnator -root file.root [-chrom 1 2 ...] -partition bin_size [-ngc] cnvnator -root file.root [-chrom 1 2 ...] -call bin_size [-ngc] cnvnator -root file.root -genotype bin_size [-ngc] cnvnator -root file.root -view bin_size [-ngc] cnvnator -pe file1.bam ... -qual val(20) -over val(0.8) [-f file] cnvnator-root file.root [-chrom 1 2 ...] -cptrees newfile.root cnvnator-root file.root -ls Valid genomes (-genome option) are: NCBI36, hg18, GRCh37, hg19, mm9, hg38, GRCh38

Unfortunately, an extraction of CNV mapping works strangly:

~/iuri/CNVnator$ ./cnvnator -root /home/cnv/iuri/output/out.root -chrom chr1 chr2 chr3 -tree /home/cnv/Samples/CNV/R0348.dedup.abra2.bam Parsing file /home/cnv/Samples/CNV/R0348.dedup.abra2.bam ... Allocating memory ... Done. | (unblinking cursor)

It seems that the process is frozen because after a long time nothing is happening, so I do CTRL+Z or CTRL+C.

abyzov commented 4 years ago

Hi, do you have alignment in the bam to human genome? If the file is big it may take several hours to parse it.

Alexej Abyzov, Ph.D. Senior Associate Consultant, Associate Professor of Biomedical Informatics, Department of Health Sciences Research, Center for Individualized Medicine, Mayo Clinic

Mayo Clinic, 200 1st street SW, Harwick 3-12 Rochester, MN 55905 www.abyzovlab.orghttp://www.abyzovlab.org tel: +1-(507)-538-0978 fax: +1-(507)-284-0745

gatiyatov commented 4 years ago

Dear Alexej, thank you, indeed there is no problem except time. Excuse me, I did not understand your question. We have 30 samples of whole-exome sequencing data (.bam + .bai), reference genome (hg19), and a list of exome capture probes, which were used for obtaining bam files. One more question. How to get individual chromosome sequences (.fa) in our case? Something like this: samtools view -ub INPUT.bam chr1 | samtools bam2fq - > chr1.fastq ?

Yuriy

пт, 24 июл. 2020 г. в 07:54, abyzov notifications@github.com:

Hi, do you have alignment in the bam to human genome? If the file is big it may take several hours to parse it.

Alexej Abyzov, Ph.D. Senior Associate Consultant, Associate Professor of Biomedical Informatics, Department of Health Sciences Research, Center for Individualized Medicine, Mayo Clinic

Mayo Clinic, 200 1st street SW, Harwick 3-12 Rochester, MN 55905 www.abyzovlab.orghttp://www.abyzovlab.org tel: +1-(507)-538-0978 fax: +1-(507)-284-0745

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/abyzovlab/CNVnator/issues/209#issuecomment-663345963, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNPHHQR5O4SUAWEBYETFSDR5EHX7ANCNFSM4OQKTTIA .

abyzov commented 4 years ago

Hi, sorry for late reply. Hope you already resolve the issue. I was asking whether you are working with data for human.

Regarding fasta sequences for chromosome, it is better to get it directly from the reference genome.

Alexej Abyzov, Ph.D. Senior Associate Consultant, Associate Professor of Biomedical Informatics, Department of Health Sciences Research, Center for Individualized Medicine, Mayo Clinic

Mayo Clinic, 200 1st street SW, Harwick 3-12 Rochester, MN 55905 www.abyzovlab.orghttp://www.abyzovlab.org tel: +1-(507)-538-0978 fax: +1-(507)-284-0745

On Jul 27, 2020, at 8:31 AM, gatiyatov notifications@github.com<mailto:notifications@github.com> wrote:

Dear Alexej, thank you, indeed there is no problem except time. Excuse me, I did not understand your question. We have 30 samples of whole-exome sequencing data (.bam + .bai), reference genome (hg19), and a list of exome capture probes, which were used for obtaining bam files. One more question. How to get individual chromosome sequences (.fa) in our case? Something like this: samtools view -ub INPUT.bam chr1 | samtools bam2fq - > chr1.fastq ?

Yuriy

пт, 24 июл. 2020 г. в 07:54, abyzov notifications@github.com<mailto:notifications@github.com>:

Hi, do you have alignment in the bam to human genome? If the file is big it may take several hours to parse it.

Alexej Abyzov, Ph.D. Senior Associate Consultant, Associate Professor of Biomedical Informatics, Department of Health Sciences Research, Center for Individualized Medicine, Mayo Clinic

Mayo Clinic, 200 1st street SW, Harwick 3-12 Rochester, MN 55905 www.abyzovlab.orghttp://www.abyzovlab.orghttp://www.abyzovlab.org tel: +1-(507)-538-0978 fax: +1-(507)-284-0745

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/abyzovlab/CNVnator/issues/209#issuecomment-663345963, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADNPHHQR5O4SUAWEBYETFSDR5EHX7ANCNFSM4OQKTTIA .

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/abyzovlab/CNVnator/issues/209#issuecomment-664398225, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACLKGONCVVU56T2JOP4RSU3R5V6UFANCNFSM4OQKTTIA.