Locating enhancers that are mutated
1
0
Entering edit mode
addyS • 0
@addys-11305
Last seen 7.0 years ago

Hi,

I have a two dataframes,one containing the genomic co-ordinates of enhancers (column names :#chr,start,end ) and the other containing the SNV position (column names : chr,position).My objective is to obtain those enhancers that are mutated,resultant dataframe should have  the following columns : #chr,start,end,no of mutations.How do I achieve this using gRanges?Also please suggest other R packages if any,with which I can achieve this.

I did in the following way:

grEnhancer<-GRanges(seqnames=enhancer_data$chr,
                    ranges=IRanges(enhancer_data$start,end=enhancer_data$end))
grSNV<-GRanges(seqnames = snvData$X.CHROM,
               ranges = IRanges(snvData$POS,end=snvData$POS))

grSNVhits=intersect(grEnhancer,grSNV)

However this gives me the list of mutations that occur in the provided enhancers.

Please help.

Regards,

Addy

snv granges genomicranges variantannotation indel • 1.2k views
ADD COMMENT
1
Entering edit mode
@michael-lawrence-3846
Last seen 2.9 years ago
United States

Please see ?countOverlaps.

ADD COMMENT
0
Entering edit mode

Thanks a lot. countOverlaps did the job :)

ADD REPLY

Login before adding your answer.

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