Entering edit mode
Kavitha Mukund
▴
50
@kavitha-mukund-5074
Last seen 10.2 years ago
Hello,
I am trying to import a gff file from ucsc genome browser using
rtracklayer's "import" function.
Although it imports the file into R without any error, it changes the
order of my chromosomes
That is to say it is reordering the chromosomes when it inputs into R
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"
This is giving me some problems when I compute overlaps using
countOverlaps ( IntervalTree-class {IRanges}) as my subject has the
order "chr1" "chr2" "chr3" "chr4" "chr5" "chr6" "chr7" "chr8" "chr9"
"chr10" "chr11" "chr12" "chr13" "chr14" "chr15" "chr16" "chr17"
"chr18" "chr19" "chrX" "chrY"
Any advice would be greatly appreciated.
Thanks!
Kavitha
[[alternative HTML version deleted]]