File: compare-fastx

package info (click to toggle)
abyss 2.3.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,284 kB
  • sloc: cpp: 78,182; ansic: 6,512; makefile: 2,252; perl: 672; sh: 509; haskell: 412; python: 4
file content (14 lines) | stat: -rwxr-xr-x 331 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
set -eu -o pipefail

if [ $# -ne 2 ]; then
	echo "Usage: $(basename $0) <file1> <file2>" >&2
	echo "Compare FASTX files without regard for sequence orientation." >&2
	exit 1
fi

function canonical_seqs {
	bioawk -c fastx '{print $seq; print revcomp($seq)}' "$@" | sort
}

diff <(canonical_seqs $1) <(canonical_seqs $2)