https://github.com/splatlab/squeakr
Revision 63d06dea8cdcd31bfcc3d9178284829ce1589a78 authored by Prashant Pandey on 25 January 2018, 18:51:34 UTC, committed by Prashant Pandey on 25 January 2018, 18:51:34 UTC
1 parent 6741efd
Tip revision: 63d06dea8cdcd31bfcc3d9178284829ce1589a78 authored by Prashant Pandey on 25 January 2018, 18:51:34 UTC
Adding the script to estmiate the size of the CQF using the output from ntCard.
Adding the script to estmiate the size of the CQF using the output from ntCard.
Tip revision: 63d06de
lognumslots.sh
#!/bin/bash
# This script takes as input the path to the output file of 'ntCard'. It then
# calculates log of the number of slots needed by Squeakr to count k-mers.
F0=`grep -P "^F0\t" $1 | cut -f2- -d$'\t'`
f1=`grep -P "^f1\t" $1 | cut -f2- -d$'\t'`
f2=`grep -P "^f2\t" $1 | cut -f2- -d$'\t'`
fgt2=$[ $F0 - $f1 - $f2 ]
ns=$[ $f1 + 2 * $f2 + 3 * $fgt2 ]
echo "x=$ns;l2=l(x)/l(2);s=scale;scale=0;l2ru=l2+1-(l2%1);np2=2^(l2ru/1);scale=s;if(x > (0.9*np2)) { l2ru=l2ru+1; np2=2*np2; }; s=scale; scale=0; print l2ru/1; scale=s;" | bc -l
echo
Computing file changes ...