Entering edit mode
Is there any Bioconductor tool for annotating CNVs? I could not find any.
Is there any Bioconductor tool for annotating CNVs? I could not find any.
How do you want to 'annotate' your CNVs? Maybe rtracklayer::import()
and GenomicRanges::findOverlaps()
are sufficient.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Thank you so much :)
so do you know how to do this now?
The goal is to make a GRanges object that contains your copy number regions, a a GRanges object that contains your annotations.
For the first, maybe you have a plain text file with chromosome, start, end, strand information. You could read that in to R as a data.frame, then use
For the second, the annotations may be available in a 'TxDb' package, or in a gtf (maybe from Ensembl and available through AnnotationHub, maybe from some other source). If from a gtf file, I'd suggest creating a TxDb object
For use of AnnotationHub, see it's vignette. For use of TxDb packages, the flow is to install the package via biocLite() then use it
For either txdb, I would then extract the GRanges corresponding to the features I wish to annotate, e.g.,
find the overlaps between the 'query' cnv ranges and the 'subject' genes
Create a 'long form' version of the data
Alternatively annotate each overlap with the gene id
and summarize the genes in each cnv
A function summarizing these steps is
If I had a couple of copy number regions, created 'by hand' rather than using makeGRangesFrom... or rtracklayer::import()
I could get
The gene_ids are Entrez gene identifiers, because that is the form of the annotation in the UCSC knownGene track.
Be careful that the coordinate system of the copy number variants are the same as the coordinate system of the annotation (e.g., 1-based, open intervals).
I have data from control-freec,foramt:chr start end num cnvtype(gain or loss),so how i annotate this ?