Remember that R is 1-indexed, so you are probably ordering them by chromosome_name and start_position.
Biomart, Sort Genes After Their Location On The Genome
Hi,
I am trying to retrive for a list of genes with their location on the chromosomes:
gene_locations<-getBM(attributes = c("ensembl_gene_id","chromosome_name", "start_position", "end_position"), filters='ensembl_gene_id', values = combined_cells_genes, mart = ens)
Now I would like to sort this list after their location on the genome (sort after chromosome + start position). Is there any straightforward way to do that within biomart, without having me to sort them with my own R code?
Thanks in advance, T
• 4,069 views
•
link
1 answer
Okay this was not a very smart questions.
Basically I have used gene_locations [order(gene_locations[, 2], gene_locations[, 3]),] to order them, the only thing is they are order lexically rather than numerically, so will have to circumvent this somehow.
• 0 views
•
link
Log in to answer this question.