Sortdep: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
The functionality is similar to '''sort -n depths.txt |uniq -c'''. | The functionality is similar to '''sort -n depths.txt |uniq -c'''. | ||
Problems with unix sort is that it floods the ''$TMPDIR''. This utility program keeps the data in memory, | |||
=Installation= | =Installation= | ||
<pre> | <pre> | ||
wget http://popgen.dk/software/download/sortDep.cpp | wget http://popgen.dk/software/download/sortDep.cpp | ||
g++ sortDep.cpp -O3 -o sortDep - | g++ sortDep.cpp -O3 -o sortDep -Liz | ||
</pre> | </pre> | ||
Line 25: | Line 26: | ||
<pre> | <pre> | ||
./sortDep -skip 1 -col 3 depths.txt >depths | ./sortDep -skip 1 -col 3 depths.txt >depths | ||
#or | |||
cat depths.txt |./sortDepth -skip 1 -col3 >depths | |||
#or | |||
cat depths.txt |cut -f3 |sed 1d|./sortDepth >depths | |||
</pre> | </pre> | ||
;Input as filename can be gz compressed, input as stdin are required to be uncompressed. |
Latest revision as of 14:45, 20 March 2014
A ultrafast and efficient tabulation of integers.
Very usefull for finding coverage and depth of coverage of sequencing data.
The functionality is similar to sort -n depths.txt |uniq -c.
Problems with unix sort is that it floods the $TMPDIR. This utility program keeps the data in memory,
Installation
wget http://popgen.dk/software/download/sortDep.cpp g++ sortDep.cpp -O3 -o sortDep -Liz
File below called depths.txt
chr pos depth 1 1 5 1 2 10 1 3 1 ....
./sortDep -skip 1 -col 3 depths.txt >depths #or cat depths.txt |./sortDepth -skip 1 -col3 >depths #or cat depths.txt |cut -f3 |sed 1d|./sortDepth >depths
- Input as filename can be gz compressed, input as stdin are required to be uncompressed.