genome_diff 312 B

1234567891011
  1. #!/bin/bash
  2. # https://jameshfisher.com/2020/02/09/diffing-coronaviruses/
  3. fetch_genome() {
  4. curl -s "https://www.ncbi.nlm.nih.gov/sviewer/viewer.cgi?report=fasta&id=$1" \
  5. | grep -v '^>' | tr -d '\n' | sed 's/\(.\)/\1 /g' | sed 's/ / /g' > $1
  6. }
  7. fetch_genome $1
  8. fetch_genome $2
  9. wdiff -s -123 $1 $2
  10. # diff $1 $2