I am working with single-cell datatset where I have the BedGraph files for each cell and I can generate single cell profiles in IGV like the screenshot. I have been looking for any command line based tools I can use to recreate this so that I can reproduce my figures. I have tried coolbox but it does not seem to have a heatmap feature for tracks (or maybe I am not aware of).
Any help would be greatly appreciated as I am stuck to create pretty plots :/
You can combine awk and bedtools via something like
zcat fragments.tsv.gz | awk '{print > $4".tsv"}'
for fn in `ls *.tsv`; do
base="${fn%%.*}"
bedtools genomecov -bg -g /path/to/ref.fa.contigs -i "${fn}" > "${base}.bdg"
done
which will split the fragments into per-cell tsv files, and convert each to bedgraphs. You can use gnu parallel to speed up the process (after splitting the fragment file). Bedops might be able to do this all in one go; but I didn't find an option the last time I looked.
Thanks for the reply but I already have the bedgraph files for each cell where column 4 has the score. I want to recreate the igv figure using any command line based tool. But good to know :)
Thanks for the reply but I already have the bedgraph files for each cell where column 4 has the score. I want to recreate the igv figure using any command line based tool. But good to know :)
Sorry are you asking how to automatically generate an IGV shot like that? Use the "Batch scripts" feature in IGV: https://igv.org/doc/desktop/#UserGuide/tools/batch/#script-commands
You'll probably need to write them out with a separate script (since you'll have a separate "load" for each bedgraph).
Thanks a lot. But I've been looking for some python or command line based tools which makes prettier plots :)