I want to store some genomic positions (chromosome,position) using MongoDB.
something like:
{
chrom:"chr2",
position:100,
name:"rs25"
}
I want to be able to quickly find all the records in a given segment (chrom , [posStart - posEnd]). What would be the best key/_id to be used ?
a chrom , position object ?
db.snps.save({_id:{chrom:"chr2",position:100},name:"rs25"})
a padded string ?
db.snps.save({_id:"chr02:00000000100",chrom:"chr2",position:100,name:"rs25"})
an auto-generated id with an index on chrom and position ?
db.snps.save({chrom:"chr2",position:100,name:"rs25"})
other ?
???
thanks for your suggestion(s)
Pierre
PS: (this question was cross posted on biostar: http://biostar.stackexchange.com/questions/2519 )