normalize coordinates to the same length
0
1
Entering edit mode
20 months ago
Chironex ▴ 50

HI, I have a set of coordinates (gene bodies) of different lengths.

GRanges object with 100 ranges and 5 metadata columns:
        seqnames              ranges strand |   gene_name       
           <Rle>           <IRanges>  <Rle> | <character>  
    [1]     chr2 169633646-169888504      + |       Tshz2 
    [2]    chr11   44618134-45005175      + |        Ebf1 
    [3]     chr5 136741764-136883107      - |     Col26a1
    [4]    chr14   67233292-67429767      + |        Ebf2   
    [5]     chr3 141465564-141834922      + |       Unc5c
    ...      ...                 ...    ... .         ...          ...       ...               
   [96]    chr15   93499114-93595891      - |    Prickle1
   [97]     chr7   51879145-51994458      + |        Gas2 
   [98]    chr13   88821472-89323225      + |       Edil3 
   [99]    chr19   14448072-14597983      - |        Tle4 
  [100]     chr1   21398403-21961942      - |       Kcnq5 
  -------
  seqinfo: 20 sequences from an unspecified genome; no seqlengths

I need to normalize them to get coordinates with the same length. Please any suggestions?

I have to create a coverage heatmap using the gene bodies as coordinates, but since they are of different lengths I can't plot them in a visually decent way and I need to bring them all to the same length, enlarging the shorter ones or reducing the longer ones. an example of the length I would like to get is the one in this image:

enter image description here

r genomicranges • 1.0k views
ADD COMMENT
2
Entering edit mode

Can you explain what you're trying to do in more detail? Currently there isn't enough information to answer the question.

ADD REPLY
0
Entering edit mode

Yes sorry I've tried to explain it updating the post

ADD REPLY
0
Entering edit mode

A program like deepTools can also generate a figure like that.

ADD REPLY
0
Entering edit mode

Yes I know but I'm working on single Cell data. Im using some function from Signac RegionMatrix() to get the Matrix of coverages and enrichedHeatmap to normalize the Matrix and create nice plots. They work fine with TSS +/-1000 bp (all same length) but very bad with gene bodies with so differences in length

ADD REPLY
2
Entering edit mode

As shown in the example plot, you can transform the gene length to percentages (of the whole gene length) to get a consistent x-axis for your meta-gene plot.

ADD REPLY
0
Entering edit mode

Hi, thanks for suggestioni. With granges there Is a way to do this transformation?

ADD REPLY

Login before adding your answer.

Traffic: 1709 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