Entering edit mode
3.5 years ago
shivangi.agarwal800
▴
120
Hello Guys,
I am trying to convert window length into genomic coordinates using below mentioned commands, following a post Finding gene density from reference genome using R
library(Homo.sapiens)
human.genes = genes(TxDb.Hsapiens.UCSC.hg19.knownGene)
human.genes
GRanges object with 23056 ranges and 1 metadata column:
seqnames ranges strand | gene_id
<Rle> <IRanges> <Rle> | <character>
1 chr19 [ 58858172, 58874214] - | 1
10 chr8 [ 18248755, 18258723] + | 10
100 chr20 [ 43248163, 43280376] - | 100
1000 chr18 [ 25530930, 25757445] - | 1000
10000 chr1 [243651535, 244006886] - | 10000
... ... ... ... ... ...
9991 chr9 [114979995, 115095944] - | 9991
9992 chr21 [ 35736323, 35743440] + | 9992
9993 chr22 [ 19023795, 19109967] - | 9993
9994 chr6 [ 90539619, 90584155] + | 9994
9997 chr22 [ 50961997, 50964905] - | 9997
But I am not confirm how to integrate my data in .csv format containing fields as chr, start, end and copy number variations Please have a look below:
chr. start. end. logR_Copy_Number
Please suggest.
I'm unable to understand the connection between your requirements and the post you've linked to. Also, what do you mean by "window size"? What does your dataset look like? You're only showing us the header here.
Hi
My data look likes
Here, we can see copy number are computed with respect to segments like 1 to 1000000 and so on. But, I want to convert them to gene coordinates.
Do not add answers unless you're answering the top level question. Use
Add Comment
orAdd Reply
instead as appropriate. I've moved your post to the correct location this time, but please be more careful in the future.In my experience, segment level data output by most Copy Number tools (that use the Circular Binary Segmentation algorithm) can be fed as input to the GISTIC2.0 tool to generate gene level thresholded as well as log2 data. Why are you looking to use GenomicRanges to do this?