Skip to content

Instantly share code, notes, and snippets.

@wyim-pgl
Forked from inodb/mummer_duplicate_contigs
Created April 1, 2016 21:04
Show Gist options
  • Save wyim-pgl/0fb6f6c0a01ec0a908ffac5bacd90138 to your computer and use it in GitHub Desktop.
Save wyim-pgl/0fb6f6c0a01ec0a908ffac5bacd90138 to your computer and use it in GitHub Desktop.
Map contigs against itself with MUMmer. Then find duplicate contigs
for row in $(cat nucmer.coords | awk -v OFS=, '{if ($10 == 100.00 && $11 == 100.00 && $7 == 100.00 && $12 != $13) {print $12,$13}}')
do
echo $row | tr ',' '\n' | sort | tr '\n' ',' | sed 's/,$//'
echo
done | cut -d, -f2 | sort -u > duplicatecontigs.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment