Tracks of single cell data in a heatmap form
1
0
Entering edit mode
10 months ago
ilomilo ▴ 10

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 :/ enter image description here

genomics sortchic deeptools single-cell • 695 views
ADD COMMENT
0
Entering edit mode
10 months ago
LChart 4.6k

Rather annoying, but typically your fragment file will have the barcodes in column 4.

chr1    3003761 3003928 TTTGCGACAGTAGGTG-1      48
chr1    3008963 3009663 AAGGTGCAGTCAATTG-1      3
chr1    3012286 3013245 AACCTAATCCCGTTGT-1      2

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.

ADD COMMENT
0
Entering edit mode

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 :)

ADD REPLY
0
Entering edit mode

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).

ADD REPLY
0
Entering edit mode

Thanks a lot. But I've been looking for some python or command line based tools which makes prettier plots :)

ADD REPLY

Login before adding your answer.

Traffic: 2369 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6