This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Velvet can't handle k-mers as long as X! We'll stick to 32 if you don't mind.

I am trying to create the k-mer hash table with velveth, with this command line:

velveth directory 15,49 -fasta -shortPaired interleavedInputFile.fasta

My issue here is that I get Velvet can't handle k-mers as long as 49! We'll stick to 32 if you don't mind. I searched in other posts and figured I need to change the Makefile from Velvet directory, where 'MAXKMERLENGTH=31', to the number I wished.

After changing this, there was no change.

I also tried by writing make 'MAXKMERLENGTH=57' at the directory when compiling, but the terminal just doesn't respond.

What am I doing wrong?

Thanks!

assembly kmer-length velvet

The make MAXKMERLENGTH=57 step should fix it. What do you mean by "terminal won't respond"?

I meant that it didn't compile and just showed me a ">" as in that it kept thinking indefinitely.

I just tried make MAXKMERLENGTH=57 without quotes and it compiled. I had taken it literally from here.

The problem is that it didn't do a thing, because the velvet directory still doesn't have velveth and velvetg, and Makefile still has MAXKMERLENGTH?=31

Could you check if the output of which velveth points to the directory with the velvet binaries you just compiled? Maybe the velvet you compiled is not the velvet being used.

Yep, it does point to the directory I just compiled.

Really weird.

If you say it's possible to compile by make MAXKMERLENGTH=57, then it is weird. I'll try again later just in case, though.

Try make clean, then make MAXKMERLENGTH=57

Well, that worked perfectly. I don't know what had happened before. Thanks!

make decides which files to compile based on if the prereq files changed. Because none of them did, it did not recompile. make clean removed all previously compiled files and forced a re-compile from scratch, and took your MAXKMERLENGTH into account when it compiled this time.

This is a bug. make with added parameters should make clean automatically.

2 answers

Okay, so I figured what was I doing wrong:

I changed the MakeFile into MAXKMERLENGTH=57 before compiling, and then just used make.

Now it works perfectly. I didn't know the make basics very well.

That is weird. make MAXKERLENGTH=57 should work. Hmmm.

I am sorry I still have not clear how to compile Velvet with a longer K-mer. Either changing the MAXKMERLENGTH option in Makefile and compiling with make afterwards or changing that option with make MAXKMERLENGTH=57 (with or without quotes) don't seem to work (still showing the error "Velvet can't handle k-mers as long as ....").

I have make clean and even removed the directory each time so that Velvet does not get confused (because of that mentioned bug).

Does someone have any advice? any other option I have still not tried?

Thank you!

EDIT: Just find out. In case anyone have this same problem, I fixed it like mentioned in here: Question: Can't change MAXKMERLENGTH on Velvet

What's the output of this command:

which velveth

Is this the directory you're running make MAXKMERLENGTH=57 in?

Log in to answer this question.