Question: Can't change MAXKMERLENGTH on Velvet
3
0
Entering edit mode
9.9 years ago

Hi Everyone.

I know a couple people have been having this problem as well, but I have tried everything to change the acceptable max Kmer length on velvet. I have changed the directory to my velvet folder and used the command: make 'MAXKMERLENGTH=49'. I have done this with and without the quotes. I have gone into the actual Makefile and changed MAXKMERLENGTH to 49, and then typed in the command: make. And I always get the message Velvet can't handle k-mers as long as 49! We'll stick to 31 if you don't mind.

That devilish little quote is starting to show up in my stress dreams!

I currently have the latest version of Velvet (1.2.10). Does anyone know what to do? Or am I cursed to have a lifelong career of poor assemblies?

Assembly • 7.6k views
ADD COMMENT
0
Entering edit mode
9.9 years ago

What happens when you do which velvetg?

There's a possibility that you're accidentally using the system-wide version instead of the one you compiled. Try running your process with the full path to your compiled velvetg and velveth

ADD COMMENT
0
Entering edit mode

Yes, I think this is the problem. When I type which velvetg it comes up with /usr/bin. I have tried to do the follow commands:

make 'MAXKMERLENGTH=49'
make velveth velvetg

The problem seems to be that the last command is not actually making a velveth and velvetg in the correct directory, and instead, the velveth and velvetg command are using the /usr/bin/ directory. Am I doing something that is preventing me from properly compiling velveth and velvetg?

ADD REPLY
0
Entering edit mode
9.9 years ago

You have the choice to manually edit the Makefile file that is downloaded with the source. I do this with my students and this have been done successfully many times. Here goes the header of such a Makefile file

$gedit Makefile

CC = gcc
CFLAGS = -Wall
DEBUG = -g
LIBS = -lm
OPT = -O3
MAXKMERLENGTH=101
CATEGORIES=4
OPENMP=1
DEF = -D MAXKMERLENGTH=$(MAXKMERLENGTH) -D CATEGORIES=$(CATEGORIES)
PDFLATEX_VERSION := $(shell pdflatex --version 2> /dev/null)
ADD COMMENT
0
Entering edit mode
9.9 years ago
Ram 44k

This happened to another person too(See here: Velvet can't handle k-mers as long as X! We'll stick to 32 if you don't mind. ). Seems to be a problem with the Makefile. This is the workaround:

$ make clean
$ make MAXKMERLENGTH=49

If you wish to use your local velvet binaries, you either need to use them with their full path specified in the command, such as:

~/myBinaries/velvet/vetveth --rest-of-command

or add your velvet binaries to PATH before the system wide binaries, like so:

PATH=~/myBinaries/velvet:$PATH

in your bash profile.

ADD COMMENT
0
Entering edit mode

Yes, I might have to be more specific in what I have tried. Sorry for the length, and sorry for the ugly glimpse at my lack of bioinformatics aptitude. Starting from downloading velvet:

wget http://www.ebi.ac.uk/~zerbino/velvet/velvet_1.2.03.tgz
tar xzf velvet_1.2.10.tgz
cd velvet_1.2.03
make MAXKMERLENGTH=91
make velveth velvetg
cd EPRIinsitu/RawFastq/BG1Folder #(this is where my fastq files are)
~/velvet_1.2.03/velveth BG1_35 35 -short -fastq BG1.trim.fastq

This I believe should give me a correct assembly with a KMER of 35. However, it says the file or directory of ~/velvet_1.2.10/velveth does not exist. A couple of things that I noticed: velveth and velvetg are never compiled in the velvet_1.2.10 folder. However, I do find them in the /usr/bin folder. This appears to be what is doing the assemblies. I cannot figure out how to compile these files in the /usr/bin folder, as the Makefile is in the velvet_1.2.10 folder, and for some reason I am not allowed to copy it to the /usr/bin folder. I have also tried copying the velveth and velvetg from the /usr/bin folder to the velvet_1.2.10 folder and doing the commands:

cd velvet_1.2.10
make clean
make MAXKMERLENGTH=91
make velveth velvetg
cd EPRIinsitu/RawFastq/BG1Folder #(once again, the folder my fastq's are in)
~/velvet_1.2.03/velveth BG1_35 35 -short -fastq BG1.trim.fastq

Unfortunately, this has not worked either. I still get that damned message "Velvet can't handle k-mers as long as 35! We'll stick to 31 if you don't mind."

Needless to say, I am out of ideas.

ADD REPLY
0
Entering edit mode

You're hopping between versions 1.2.10 and 1.2.03. Try using 1.2.10 and nothing else. If required, rm -rf ~/velvet_1.2.03

Your link says 1.2.10 but points to 1.2.03. Use this link: http://www.ebi.ac.uk/~zerbino/velvet/velvet_1.2.10.tgz

ADD REPLY
0
Entering edit mode

Sorry, it was suppose to say 1.2.10 for all of the versions.

This is why my New Years Resolution is to reread every email and post for typo's before hitting that send button.

ADD REPLY
0
Entering edit mode

Perhaps the problem can be deduced by the following error message whenever I run a make command:

src/readSet.c:36:18: fatal error: zlib.h: No such file or directory #include <zlib.h>

Whatever that means.

ADD REPLY
0
Entering edit mode

This is interesting. Does the make succeed at all? It should return an Error Code (possibly 1) and error out, if there's a problem with zlib.

ADD REPLY
0
Entering edit mode

Yes, after that message, it says:

compilation terminated.
make: ***[obj/readSet.o] Error 1

I have just now tried to download a new zlib (version 1.2.8). I run the commands:

PATH=$PATH:zlib-1.2.8 (which is the pathway to my zlib folder)
cd velvet_1.2.10
make MAXKMERLENGTH=71

But I still get the same error message.

ADD REPLY
0
Entering edit mode

Adding it to PATH won't work, you'll have to point LD_FLAGS and CPP_FLAGS to the lib and include folders within zlib, like so:

LD_FLAGS='-L /path/to/zlib/lib'
CPP_FLAGS='-I /path/to/zlib/include'
cd /path/to/velvet
make MAXKMERLENGTH=71
ADD REPLY
0
Entering edit mode

Thanks.

I compiled the zlib with:

./configure --prefix=/gullived/home # which is the folder I want zlib in
make
make install

After I put in the LD_FLAGS and CDD_FLAGS, it appeared to work. So it was a zlib issue after all.

ADD REPLY

Login before adding your answer.

Traffic: 1523 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6