Add alleles to the primary key

This commit is contained in:
Joel Thibault 2012-04-17 16:21:46 -04:00
parent 3198ce5471
commit 221ce9c3d6
2 changed files with 2 additions and 5 deletions

View File

@ -62,8 +62,7 @@ public class InsertRODsWalker extends RodWalker<Integer, Integer> {
mongoCollection.ensureIndex("stop");
// set up primary key
mongoCollection.ensureIndex(new BasicDBObject("location", 1).append("sample", 1).append("sourceROD", 1), new BasicDBObject("unique", 1));
mongoCollection.ensureIndex(new BasicDBObject("location", 1).append("sample", 1).append("sourceROD", 1).append("alleles", 1), new BasicDBObject("unique", 1));
}
catch (MongoException e) {}
catch (java.net.UnknownHostException e) {}

View File

@ -562,9 +562,7 @@ public class SelectVariants extends RodWalker<Integer, Integer> implements TreeR
BasicDBObject query = new BasicDBObject();
query.put("contig", contig);
query.put("start", start);
query.put("stop", stop);
//query.put("sample", "NA12878"); // TODO: remove kluge
query.put("sample", new BasicDBObject("$ne", "NA12878")); // TODO: remove kluge
// can't know stop location for deletions from reference
DBCursor cursor = mongoCollection.find(query);
Map<String,DBObject> results = new HashMap<String,DBObject>();