# Stop on any error
set -uex

# Genome accession number
ACC=NC_045512

# Get a genbank file. Unfortunately we cannot load a Genbank file into IGV.
efetch -db nucleotide -format gb -id $ACC > $ACC.gb

# Convert the GenBank file into GFF and FASTA.
cat $ACC.gb | seqret -filter -feature -osformat fasta -ofname2 $ACC.gff > $ACC.fa

# Create an index of the FASTA file
samtools faidx $ACC.fa