<aside> 💡 wiggle or wig files are files that store some kind of signal (usually just a number) associated with a nucleotide.
To visualise and thus load wig files into JBrowse (genome browser), you need to convert them to bigWig first.
Here I show how to convert wig to bigwig using the command line tool wigToBigWig.
</aside>
wigToBigWig
: http://hgdownload.cse.ucsc.edu/admin/exe/Prepare your chrom.sizes file which lists the sizes of all chromosomes. The file will look like this:
cat chrom.sizes
I 230218
II 813184
III 316620
...
Create a fasta index from the fasta file that your wiggle file is associated with:
samtools faidx <example.fasta>
This creates a .fai file which is your index file.
Cut that index down to only contain the chrom sizes
cut -f1,2 <example.fai> > chrom.sizes
Now, run wigToBigWig:
wigToBigWig <in.wig> <chrom.sizes> <out.bw>