Closed bri2020 closed 2 years ago
I think I answered myself most of the questions meanwhile: I checked and it seems that in both cases "annotateWithFeatureFlank and/or annotateWithGeneParts" the overlap matrix is calculated with "countOverlaps" and thus the order of the query object is kept. I also easily manage to extract the positions knowing the order of counts/overlaps. However I would be happy for any input/doubts coming up at a later stage. Thanks Britta
Dear Altuna Akalin, Dear others,
I would like to know if you have an idea or strategy, how to proceed with the information from a AnnotationByFeature -object generated by annotateWithGeneParts or annotateWithFeatureFlank method. E.g. the aim is, that I would like to extract the methylation status for the specific features.
How could I extract the information for promotor, exon, intron into coordinates or Granges? Is there a way to generate something? I saw in another issue that you mentioned https://github.com/BIMSBbioinfo/genomation/issues/186 So I basically I could do
XYZ_exons=subsetByOverlaps(XYZ_gr,gene.parts$exon
However I like the idea of priority of promoter > exons > introns and - this membership data frame could be interesting to extract only "pure" features. How can I keep the priority for promoter > exons > introns when subsetting the data with
subsetByOverlaps
and assigning unique features..... I would like to get the same numbers for
... but thats because there are several hits in different features of course.
Questions
a. from YZ__gr_exons, I would remove all promotor positions b. from YZ_gr_introns, I would remove all exon and promotor position
Correct?
I guess you had only count the ones which, havent gotten any assignment in your code, correct? Here:
intergenic = 100*sum(rowSums(memb)==0)/nrow(memb) )
That means I could also generate a granges of what is not YZ__gr_exons AND YZ__gr_promoters AND YZ_gr_introns.
OR another idea:
a) It would be already helpful to know the order - so than I can extract the methylation matrix and just add/merge the membership matrix to it write a little loop to assign only one feature. like this
df = cbind(getAssociationWithTSS(methyl_filtered_annot), as.data.frame(getMembers(methyl_filtered_annot)))
and add that to a Methylkit-object.Can you help me reading you code about the order? Am I at the right position? Is it in both parts the order of the target?
geneparts: https://github.com/BIMSBbioinfo/genomation/blob/c049457c374ab2a37502232cafc8ad35ebf10cbf/R/readAnnotate.R#L379
annotateWithFeatureFlank: https://github.com/BIMSBbioinfo/genomation/blob/c049457c374ab2a37502232cafc8ad35ebf10cbf/R/readAnnotate.R#L641
b) can I extract the position (chromosome and START) for this membership matrix?
I am sorry for my loud thinking ;D, but maybe you can enlighten me a bit more. Kind regards, Thanks a lot, Britta Meyer