Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix with dash needs quotes in velveth command line #4

Open
olingerc opened this issue Jun 24, 2014 · 4 comments
Open

Prefix with dash needs quotes in velveth command line #4

olingerc opened this issue Jun 24, 2014 · 4 comments

Comments

@olingerc
Copy link

When using the option -p with a dash in the string, I get strange error messages about wrong category numbers. For example with LTCF-1-10:

Logfile name: LTCF-1-10_logfile.txt
Jun 20 15:38:27     Running velveth with hash value: 25.
*** Category number 25 in -10_data_25 higher than that velvet compiled with (2)
 at /home/christophe/workstation/external_apps/velvetoptimizer/VelvetOptimiser.pl line 552 thread 1
*** File 25 doesn't exist or is unreadable.
 at /home/christophe/workstation/external_apps/velvetoptimizer/VelvetOptimiser.pl line 552 thread 1
Block -10_data_25 25 FAILED!

After a lot of trial and error I could trace it back to dashes in the prefix. By putting single quotes around the prefix in line 546 I got rid of the error:

    #make the velveth command line.
    my $vhline = "'" . $prefix . "_data_$hv' $hv $rf";

I think the problem lies in velvet itself, but am not sure.

@sestaton
Copy link

Can you show us the full command? I just tested this with Velvet and VelvetOptimiser and I cannot reproduce the error.

@sestaton
Copy link

Upon further inspection, I can confirm this is a bug in VelvetOptimiser. I was running VelvetOptimiser from a git branch where I have made a number of changes to the code (mentioned in a previous issue report), and this is one of the things I fixed long ago but forgot about it.

The other solution is to just replace dashes with underscores and you won't get this issue.

@olingerc
Copy link
Author

Thanks for the reply, I was scratching my head what else I could have done wrong in my pipeline. Changing only the line I mentioned caused the expected coverage optimization at the end to not start at all, so my one line fix was a bit naïve. I am glad you fixed the problem.
Is it safe to work with master? Or shall pick out the related commits? Replacing dashes with underscores is of course an option.

@sestaton
Copy link

You should use this branch for the bug fixes (I haven't touched the master branch yet): https://github.com/sestaton/VelvetOptimiser/tree/topic/reuse_sequences

I should mention that currently the dashes are replaced with underscores because I never had a situation where it was critical. So, if you specify LTCF-1-10 as the prefix, the prefix would become LTCF_1_10 in the output files. My main concern was getting things to work but I do think it should produce the expected output (with dashes), so I'll look into that when I get a chance. That should be an easy fix, but if you want to get things running right away you could always change the names back manually after the program runs, if that is an option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants