forked from fbreitwieser/krakenuniq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a9ee08
commit f447dc5
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
my $time = "wall clock"; | ||
my $mem = "Maximum resident set size"; | ||
my $sep = ";"; | ||
|
||
sub uutime { | ||
my $wt_h = `grep '$time' $_[0] | sed 's/.* //'`; chomp $wt_h; | ||
return $wt_h; | ||
} | ||
|
||
my $K="kraken"; | ||
|
||
print join($sep,qw/sample mbpm1 mbpm2 time1 time2 time3 mem1 mem2/),"\n"; | ||
for my $hll_t (@ARGV) { | ||
my $bn = `basename $hll_t .krakenhll.timing.log`; chomp $bn; | ||
die "$hll_t should be an hll timing log" if $bn == $hll_t; | ||
print "$bn$sep"; | ||
(my $hll = $hll_t) =~ s/.timing//; | ||
(my $k = $hll) =~ s/krakenhll/$K/; | ||
(my $k_t = $hll_t) =~ s/krakenhll/$K/; | ||
(my $kr_t = $hll_t) =~ s/krakenhll/$K-report/; | ||
|
||
my $hm = `grep -o '[0-9\.]* Mbp/m' $hll | sed 's/ .*//'`; chomp $hm; | ||
print $hm,$sep; | ||
my $km = `grep -o '[0-9\.]* Mbp/m' $k | sed 's/ .*//'`; chomp $km; | ||
print $km,$sep; | ||
|
||
print uutime($hll_t),$sep; | ||
print uutime($k_t),$sep; | ||
print uutime($kr_t),$sep; | ||
|
||
my $mem_h = `grep '$mem' $hll_t | sed 's/.* //'`; chomp $mem_h; | ||
print $mem_h,$sep; | ||
my $mem_k = `grep '$mem' $k_t | sed 's/.* //'`; chomp $mem_k; | ||
print $mem_k,"\n"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
|
||
TIME="/usr/bin/time -v" | ||
FILES=/ccb/salz4-1/fbreitwieser/microbiome-pipeline/staging/CP_PT{[0-9],10}-*.fastq.gz | ||
|
||
for J in 1 2; do | ||
for THREADS in 10 5 2 1; do | ||
|
||
krakenhll --preload --db ../dbs/refseq-oct2017-k31 --report-file /dev/null --fasta <(printf ">A\nA") | ||
for B in $*; do | ||
echo $B | ||
BN=`basename $B .fastq.gz` && echo $BN && BN="$BN.t$THREADS.j$J" | ||
$TIME -o log/$BN.krakenhll.timing.log krakenhll --db ../dbs/refseq-oct2017-k31 --fastq --gzip --report-file report/$BN.krakenhll.report --threads $THREADS $B > kraken/$BN.krakenhll.kraken 2> log/$BN.krakenhll.log; | ||
done | ||
|
||
kraken --preload --db ../dbs/refseq-oct2017-k31 --fasta <(printf ">A\nA") | ||
for B in $*; do | ||
echo $B | ||
BN=`basename $B .fastq.gz` && echo $BN && BN="$BN.t$THREADS.j$J" | ||
$TIME -o log/$BN.kraken.timing.log kraken --db ../dbs/refseq-oct2017-k31 --fastq --gzip --threads $THREADS $B > kraken/$BN.kraken 2> log/$BN.kraken.log | ||
$TIME -o log/$BN.kraken-report.timing.log kraken-report --db ../dbs/refseq-oct2017-k31 kraken/$BN.kraken > report/$BN.kraken.report; | ||
done | ||
|
||
done | ||
done | ||
|