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

compressed blast num_threads value #4

Closed
BurntSushi opened this issue Nov 1, 2013 · 6 comments
Closed

compressed blast num_threads value #4

BurntSushi opened this issue Nov 1, 2013 · 6 comments

Comments

@BurntSushi
Copy link
Owner

It should be set to the value of the -p switch.

We could parse the arguments given after --blast-args, but I'd rather stick to our simple solution: don't touch them.

@nsarode
Copy link

nsarode commented Nov 13, 2013

Just one more observation. I face this issue not only during compression, but also in case of blastp. It appears that irrespective of what value I give using -p switch, the program attempts to use all the cores available on the machine (24, 64 etc). This kinda sucks when you are submitting jobs to a shared cluster .... jobs get killed within mins :(

@BurntSushi
Copy link
Owner Author

@nsarode Upon further inspection, I'm not actually able to re-create this problem. Here is an example I ran:

[andrew@Serval cablastp] cablastp-search -p 2 ./s288c ./data/test.fasta > /dev/null
Opening database in ./s288c...
        Opening compressed database...
        Done opening compressed database.
        Opening coarse database...
        Done opening coarse database.
Done opening database in ./s288c.

Blasting query on coarse database...
blastp -db s288c/blastdb-coarse -num_threads 2 -outfmt 5 -dbsize 3020248
Decompressing blast hits...
Blasting query on fine database...
blastp -subject /tmp/cablastp-fine-fasta447385406 -dbsize 3020248 -num_threads 2

Note the -p 2, which causes the -num_threads 2 option in both of the blastp commands.

@BurntSushi
Copy link
Owner Author

Aha! I've figured it out. I went back to the other issue and noticed you were using this command:

~/path/to/capblast/cablastp-search path/database query_file --p="4" --blast-args -max_target_seqs 10 -num_threads 4 -out out.blast -outfmt '6 qseqid sseqid pident qcovs length mismatch qstart qend sstart send evalue bitscore stitle'

But the usage documentation says:

Usage: cablastp-search [flags] database-directory query-fasta-file [--blast-args BLASTP_ARGUMENTS]

Notice that the flags (except for --blast-args) have to come before the positional arguments. Sorry about that!

I've committed an update so that if you give cablastp-search too many positional arguments (which is how your --p="2" was interpreted), then it will exit with a usage error.

In sum, change your command to this:

~/path/to/capblast/cablastp-search -p 4 path/database query_file --blast-args -max_target_seqs 10 -out out.blast -outfmt '6 qseqid sseqid pident qcovs length mismatch qstart qend sstart send evalue bitscore stitle'

@BurntSushi
Copy link
Owner Author

Note that if you have Go installed (and your GOPATH is set, e.g., export GOPATH=$HOME/go), you can update your cablastp binaries by simply running:

go get -u github.com/BurntSushi/cablastp/...

Or I can bug @ndaniels to update the official binaries. :-)

@ndaniels
Copy link
Collaborator

I will update the binaries. This is the problem with binary releases :)

Sent from my iPhone

On Nov 14, 2013, at 1:00 PM, Andrew Gallant notifications@github.com wrote:

Note that if you have Go installed, you can update your cablastp binaries by simply running go get -u github.com/BurntSushi/cablastp/....

Or I can bug @ndaniels to update the official binaries. :-)


Reply to this email directly or view it on GitHub.

@nsarode
Copy link

nsarode commented Nov 14, 2013

Got it ! I assumed that the order wasn't crucial and that flags would be recognized on the basis of -- before them. Thanks 👍

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

3 participants