annotateWithGeneParts, fraction of features in genome

219 views
Skip to first unread message

Britta

unread,
Oct 11, 2017, 3:19:01 PM10/11/17
to methylkit_discussion
Dear all, Dear Altuna

this might be a general question or a feature request to methylkit/genomation. Sorry I have no reproducible example.
But maybe it is enough to describe what I would like to do. Let me know if I can reformulate or be more precise.

 For comparative reasons and beside the output of

> annotateWithGeneParts(as(myDiff25p,"GRanges"),gene.obj)
# Summary of target set annotation with genic parts
# Rows in target set: 489
# -----------------------
#   percentage of target features overlapping with annotation:
#   promoter       exon     intron intergenic
# 13.09      29.86      33.74      35.17

I would like to know the features of my genome in fractions(percentages) also summing up to 1(100).  I found many examples with other packages, however they do not account for the nice
 #   (with promoter > exon > intron precedence)
 such as in Methylkit. And therefore the fractions are never summing up above 1. I guess because of multiple features for one region.

My idea was to add a Granges.object covering the whole genome with a window of 1 to annotateWithGeneParts. But this is a quite huge file. Stupid?
How would you do this? 

Any help or idea is appreciated!
Best wishes,
Britta
 


  

Britta

unread,
Oct 11, 2017, 3:29:30 PM10/11/17
to methylkit_discussion
Addon: I just realized maybe it would be also useful to export the (intergenic) features from the created object gene.obj=readTranscriptFeatures("some.bed").

Altuna Akalin

unread,
Oct 13, 2017, 4:12:05 PM10/13/17
to methylkit_...@googlegroups.com
Dear Britta,
I don't completely understand the problem but it seems like you are trying to customize annotateWithGeneParts. This can be done by  annotateWithFeatures method.
https://rdrr.io/bioc/genomation/man/annotateWithFeatures-methods.html

Best,
Altuna


On Wed, Oct 11, 2017 at 7:29 PM, Britta <britta....@gmail.com> wrote:
Addon: I just realized maybe it would be also useful to export the (intergenic) features from the created object gene.obj=readTranscriptFeatures("some.bed").

--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discussion+unsub...@googlegroups.com.
To post to this group, send email to methylkit_discussion@googlegroups.com.
Visit this group at https://groups.google.com/group/methylkit_discussion.
For more options, visit https://groups.google.com/d/optout.

Britta

unread,
Oct 17, 2017, 10:25:41 AM10/17/17
to methylkit_discussion
Dear Altuna, 

I will have a look into the proposed command. 
My aim was to get the percentage of features across the whole genome using the same method as in generation/methylKit for smaller Granges - to have comparable numbers.
I managed myself with a workaround. I subset the genome to chromosomes and created bed files with 1bp window. I get the bp counts per chromosome per feature with your command (annotate withGeneparts). I sum up all chromosomes and I have the total number and thus percentages.

What about my second "unrelated" question. Is is possible to export the intergenic definition as granges/bed etc? I haven't found any tricky solution yet.

Thanks a lot!
Britta
 


Am Freitag, 13. Oktober 2017 22:12:05 UTC+2 schrieb Altuna Akalin:
Dear Britta,
I don't completely understand the problem but it seems like you are trying to customize annotateWithGeneParts. This can be done by  annotateWithFeatures method.
https://rdrr.io/bioc/genomation/man/annotateWithFeatures-methods.html

Best,
Altuna

On Wed, Oct 11, 2017 at 7:29 PM, Britta <britta....@gmail.com> wrote:
Addon: I just realized maybe it would be also useful to export the (intergenic) features from the created object gene.obj=readTranscriptFeatures("some.bed").

--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discussion+unsub...@googlegroups.com.
To post to this group, send email to methylkit_...@googlegroups.com.

Altuna Akalin

unread,
Oct 17, 2017, 10:51:39 AM10/17/17
to methylkit_...@googlegroups.com
For your second question, you can use GenomicsRanges::gaps function on a GRanges object that has start and end coordinates of genes 

Best
Altuna 

On Tue 17. Oct 2017 at 16:25, Britta <britta....@gmail.com> wrote:
Dear Altuna, 

I will have a look into the proposed command. 
My aim was to get the percentage of features across the whole genome using the same method as in generation/methylKit for smaller Granges - to have comparable numbers.
I managed myself with a workaround. I subset the genome to chromosomes and created bed files with 1bp window. I get the bp counts per chromosome per feature with your command (annotate withGeneparts). I sum up all chromosomes and I have the total number and thus percentages.

What about my second "unrelated" question. Is is possible to export the intergenic definition as granges/bed etc? I haven't found any tricky solution yet.

Thanks a lot!
Britta
 


Am Freitag, 13. Oktober 2017 22:12:05 UTC+2 schrieb Altuna Akalin:
Dear Britta,
I don't completely understand the problem but it seems like you are trying to customize annotateWithGeneParts. This can be done by  annotateWithFeatures method.
https://rdrr.io/bioc/genomation/man/annotateWithFeatures-methods.html

Best,
Altuna

On Wed, Oct 11, 2017 at 7:29 PM, Britta <britta....@gmail.com> wrote:
Addon: I just realized maybe it would be also useful to export the (intergenic) features from the created object gene.obj=readTranscriptFeatures("some.bed").

--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discus...@googlegroups.com.
To post to this group, send email to methylkit_...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "methylkit_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to methylkit_discus...@googlegroups.com.

To post to this group, send email to methylkit_...@googlegroups.com.
Visit this group at https://groups.google.com/group/methylkit_discussion.
For more options, visit https://groups.google.com/d/optout.
--
Sent from mobile, excuse the brevity
Reply all
Reply to author
Forward
0 new messages