MongoDB: the most efficient way to store a chromosome / position

I want to save some genomic positions (chromosome, position) using MongoDB.

sort of:

{
chrom:"chr2",
position:100,
name:"rs25"
}

I want to be able to quickly find all the records in this segment (chrom, [posStart - posEnd]). What will be the best key / _id to be used?

chrome object position?

db.snps.save({_id:{chrom:"chr2",position:100},name:"rs25"})

padded line?

db.snps.save({_id:"chr02:00000000100",chrom:"chr2",position:100,name:"rs25"})

automatically generated id with chrome index and position?

db.snps.save({chrom:"chr2",position:100,name:"rs25"})

another?

???

Thanks for your suggestions (suggestions)

Pierre

PS: (this question was posed by biostar: http://biostar.stackexchange.com/questions/2519 )

+3
source share
1

, , .

( _id, ), , .

, , , , . , / . , ( ), (c p).

, ( "" id) . ( ), , , .

+2

Source: https://habr.com/ru/post/1765388/


All Articles