Skip to content

Commit

Permalink
Adding KRAKEN_NUM_THREADS support
Browse files Browse the repository at this point in the history
  • Loading branch information
DerrickWood committed Jan 28, 2015
1 parent 450c599 commit 9947443
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ v0.10.5-beta:
* Included full sequence descriptions when using "--[un]classified-out"
* Reduced memory usage of db_shrink (Build step 2 / kraken-build --shrink)
* Reduced memory usage of db_sort (Build step 3)
* Support added for KRAKEN_DB_PATH and KRAKEN_DEFAULT_DB env. variables
* Support added for KRAKEN_NUM_THREADS, KRAKEN_DB_PATH, and KRAKEN_DEFAULT_DB
env. variables
* Added kraken-translate for getting taxonomic names for each sequence

v0.10.4-beta:
Expand Down
11 changes: 8 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ on the output of "kraken", like so:
kraken-translate --db $DBNAME sequences.kraken > sequences.labels

(The same database used to run kraken should be used to translate the
output; see DATABASE ENVIRONMENT VARIABLES below for ways to reduce
output; see KRAKEN ENVIRONMENT VARIABLES below for ways to reduce
redundancy on the command line.)

The file sequences.labels generated by the above example is a text file
Expand Down Expand Up @@ -638,13 +638,18 @@ in sensitivity that must be taken into account when deciding on the
threshold to use for your own project.


DATABASE ENVIRONMENT VARIABLES
KRAKEN ENVIRONMENT VARIABLES
==============================

The Kraken programs (with the exception of kraken-build) support the
use of two environment variables to help in reducing command line
use of some environment variables to help in reducing command line
lengths:

- KRAKEN_NUM_THREADS: this variable is only used by "kraken"; if the
"--threads" option is not supplied to kraken, then the value of this
variable (if it is set) will be used as the number of threads to run
kraken.

- KRAKEN_DB_PATH: much like the PATH variable is used for executables
by your shell, KRAKEN_DB_PATH is a colon-separated list of directories
that will be searched for the database you name if the named database
Expand Down
6 changes: 5 additions & 1 deletion scripts/kraken
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ my $min_hits = 1;
my $fasta_input = 0;
my $fastq_input = 0;
my $db_prefix;
my $threads = 1;
my $threads;
my $preload = 0;
my $gunzip = 0;
my $bunzip2 = 0;
Expand All @@ -73,6 +73,10 @@ GetOptions(
"bzip2-compressed" => \$bunzip2
);

if (! defined $threads) {
$threads = $ENV{"KRAKEN_NUM_THREADS"} || 1;
}

if (! @ARGV) {
print STDERR "Need to specify input filenames!\n";
usage();
Expand Down

0 comments on commit 9947443

Please sign in to comment.