private void addChunkId ( Document dbObject ) { List < String > chunkIds = new ArrayList <> ( ) ; int chunkStart = ( Integer ) dbObject . get ( "start" ) / MongoDBCollectionConfiguration . VARIATION_CHUNK_SIZE ; int chunkEnd = ( Integer ) dbObject . get ( "end" ) / MongoDBCollectionConfiguration . VARIATION_CHUNK_SIZE ; String chunkIdSuffix = MongoDBCollectionConfiguration . VARIATION_CHUNK_SIZE / 1000 + "k" ; for ( int i = chunkStart ; i <= chunkEnd ; i ++ ) { if ( dbObject . containsKey ( "chromosome" ) ) { chunkIds . add ( dbObject . get ( "chromosome" ) + "_" + i + "_" + chunkIdSuffix ) ; } else { chunkIds . add ( dbObject . get ( "sequenceName" ) + "_" + i + "_" + chunkIdSuffix ) ; } } dbObject . put ( "_chunkIds" , chunkIds ) ; }
by MongoDBCellbaseLoader must be replaced by an appropriate method in this adaptor