Skip to content

Plot

Examples

Plot chromosome-level heatmap from contig-level mapping result

  • Convert pairs to cool file
cphasing-rs contigsizes contigs.fa > contigs.contigsizes
cphasing pairs2cool sample.pairs.pqs contigs.contigsizes sample.10k.cool -bs 10k
cphasing-rs contigsizes contigs.fa > contigs.contigsizes
cphasing pairs2cool sample.pairs.gz contigs.contigsizes sample.10k.cool -bs 10k
  • Adjust contig-level matrix to chromosome-level by agp file
    cphasing plot -a groups.agp -m sample.10k.cool -o groups.500k.wg.png   
    

Note

This function will generate two intermedia sample.10000.chrom.cool and sample.500k.chrom.cool.


groups.500k.wg.png

Directly plot heatmap from .cool file

cphasing plot -m sample.100k.chrom.cool -o groups.100k.wg.png 

Note

--binsize can be specified when you want to plot a larger resolution, e.g., 500k, plot will automatically generate a 1m matrix from the input matrix. Still, the binsize of the output matrix should be in integer multiples than the binsize of the input matrix.

cphasing plot -m sample.100k.chrom.cool -o groups.500k.wg.png -bs 500k


groups.100k.wg.png               groups.500k.wg.png

different_parameters

Add line to highlight the haplotype border

cphasing plot chrom.500k.cool -o chrom.500k.png --whitered --add-hap-border

Plot specified chromosome

chrom_plot

Plot all chromosome split in one picture

per_chrom