Hi, This is related to a the question found here (http://biostar.stackexchange.com/questions/3414?sort=newest#sort-top). I am trying to import a gff file using import("file.gff") which contains a set of chromosomal positions for all chrmosomes in mouse. When I use the rtracklayer command
genes = import("file.gff")
names(genes)= "chr1" "chr10" "chr11" "chr12" "chr13" "chr14" "chr15" "chr16" "chr17" "chr18" "chr19" "chr2" "chr3" "chr4" "chr5" "chr6" "chr7" "chr8" "chr9" "chrX" "chrY"
How do I make sure that the import doesn't cause the chromosomal order to change I want it to import it into teh dataRange genes in the order
"chr1" "chr2" "chr3" "chr4" "chr5" "chr6" "chr7" "chr8" "chr9" "chr10" "chr11" "chr12" "chr13" "chr14" "chr15" "chr16" "chr17" "chr18" "chr19" "chrX" "chrY"
Thanks in Advance
The names are sorted in lexical order, however the order of chromosome names is irrelevant for further analysis e.g. overlap computation in GenomicRanges/IRanges. The other way around that also makes sense, if the order of names appearing makes any difference to your analysis, then there is possibly something wrong with your analysis.