simoncchu / REPdenovo

A tool to construct repeats directly from raw reads
MIT License
16 stars 3 forks source link

cannot build TERefiner #7

Closed bzvew closed 7 years ago

bzvew commented 7 years ago

I find TERefiner cannot work, so I build that manually.

cd TERefiner && make && cd ..

Then it uses bamtools-master in the process, so I download bamtools, rename it, build it and put it in the REPdenovo folder.

Then another issues happen:

g++ -O3 -Wall -static -I../bamtools-master/include -L../bamtools-master/lib -Wl,-rpath,../bamtools-master/lib -o TERefiner_1 public_func.o StrOperation.o local_alignment.o Alignment.o bam_parse.o fai_parser.o contigs.o Coverage.o scaffolding.o RepeatsClassifier.o refiner.o main.o \ -lbamtools -lz -lm /usr/bin/ld: cannot find -lstdc++ /usr/bin/ld: cannot find -lm /usr/bin/ld: cannot find -lc

how to solve that?

simoncchu commented 7 years ago

@bzvew Have you change the path of include and lib foder in Makefile? BAMTOOLS=../bamtools-master/include BAMTOOLS_LD=../bamtools-master/lib

bzvew commented 7 years ago

No, it is BAMTOOLS=../bamtools-master/include BAMTOOLS_LD=../bamtools-master/lib And I don't change it.

simoncchu commented 7 years ago

Would you please change to the path on your computer, and try again?

bzvew commented 7 years ago

At the beginning I put the bamtools-master folder under REPdenovo folder, is that correct?

simoncchu commented 7 years ago

That should work, can you run ls and show the detailed info of the two folders? Perhaps need to compile bamtools first. ls -l ../bamtools-master/include ls -l ../bamtools-master/lib

bzvew commented 7 years ago

[user@localhost include]$ ls -R .: api shared

./api: algorithms BamConstants.h IBamIODevice.h SamReadGroupDictionary.h api_global.h BamIndex.h SamConstants.h SamReadGroup.h BamAlgorithms.h BamMultiReader.h SamHeader.h SamSequenceDictionary.h BamAlignment.h BamReader.h SamProgramChain.h SamSequence.h BamAux.h BamWriter.h SamProgram.h

./api/algorithms: Sort.h

./shared: bamtools_global.h

[user@localhost lib]$ ls -R .: libbamtools.a libbamtools.so libbamtools.so.2.4.1 libbamtools-utils.a libjsoncpp.a

simoncchu commented 7 years ago

This should work. Weird for me.

bzvew commented 7 years ago

Yes, I'm also confused. Another issue is can REPdenovo deal with Pacbio long reads? If ok, can I set content of the reads.txt like readfilename, -1, -1, -1?

simoncchu commented 7 years ago

If you change the path "../bamtools-master/" to absolute path, will report the same error?

No, REPdenovo mainly designed for short reads. The error rates for long reads is high.

bzvew commented 7 years ago

It doesn't compile successfully either.

If I use the corrected long reads, can it work?

simoncchu commented 7 years ago

I didn't try that before. I think corrected long reads can be better used than break to pieces and assemble again, which will lose lots of information.

simoncchu commented 7 years ago

Would you please compile bamtools first, and then compile TERefiner again? I never meet this kind of error before. For compiler, it seems cannot find the lib.

bzvew commented 7 years ago

I actually compile bamtools first, then move that folder inside REPdenovo.

bzvew commented 7 years ago

I find the original program can work if I change the permissions of current user. Because at the beginning the current user doesn't have execution permission for TERefiner and ContigsMerger . However there are still some errors when running the program. Can you have a look at the log?

output.txt

simoncchu commented 7 years ago

@bzvew Can you send me your configuration file?

bzvew commented 7 years ago

I change the readlength to 4000, because I want to test the REPdenovo on long reads.

sample_configuration_10X.txt

simoncchu commented 7 years ago

Please change these and try again:

BWA_PATH /usr/local/bin/bwa SAMTOOLS_PATH /usr/local/bin/samtools

bzvew commented 7 years ago

Good, it works now. Thank you!