diff --git a/pom.xml b/pom.xml index 05ece32..e36d367 100644 --- a/pom.xml +++ b/pom.xml @@ -3,12 +3,12 @@ fr.cirad Mgdb2BrapiV2Impl jar - 2.0-RELEASE + 2.0.1-RELEASE 1.8 ${java.version} ${java.version} - 2.4-RELEASE + 2.4.1-RELEASE src/main/java @@ -17,7 +17,7 @@ fr.cirad Mgdb2BrapiImpl - 1.1-RELEASE + 1.1.1-RELEASE fr.cirad diff --git a/src/main/java/org/brapi/v2/api/VariantsetsApiController.java b/src/main/java/org/brapi/v2/api/VariantsetsApiController.java index 39d3aed..722216d 100644 --- a/src/main/java/org/brapi/v2/api/VariantsetsApiController.java +++ b/src/main/java/org/brapi/v2/api/VariantsetsApiController.java @@ -703,14 +703,14 @@ public void run() { VariantContextWriter writer = null; List distinctSequenceNames = new ArrayList(); - for (Object chr : mongoTemplate.getCollection(mongoTemplate.getCollectionName(VariantData.class)).distinct(VariantData.FIELDNAME_REFERENCE_POSITION + "." + ReferencePosition.FIELDNAME_SEQUENCE, varQuery, String.class)) // find out distinctSequenceNames by looking at exported variant list + for (Object chr : mongoTemplate.getCollection(mongoTemplate.getCollectionName(VariantRunData.class)).distinct(VariantData.FIELDNAME_REFERENCE_POSITION + "." + ReferencePosition.FIELDNAME_SEQUENCE, varQuery, String.class)) // find out distinctSequenceNames by looking at exported variant list if (chr != null) distinctSequenceNames.add(chr.toString()); Collections.sort(distinctSequenceNames, new AlphaNumericComparator()); SAMSequenceDictionary dict = exportHandler.createSAMSequenceDictionary(module, distinctSequenceNames); writer = new CustomVCFWriter(null, os, dict, false, false, true); - exportHandler.writeGenotypeFile(module, new ArrayList<>(), new ArrayList<>(), progress, varColl.getNamespace().getCollectionName(), varQuery, (long) variantSet.getVariantCount(), null, null, null, samplesToExport, samplesToExport.stream().map(gs -> gs.getIndividual()).distinct().sorted(new AlphaNumericComparator()).collect(Collectors.toList()), distinctSequenceNames, null, writer); + exportHandler.writeGenotypeFile(module, new ArrayList<>(), new ArrayList<>(), progress, varColl.getNamespace().getCollectionName(), varQuery, (long) variantSet.getVariantCount(), null, null, null, samplesToExport, samplesToExport.stream().map(gs -> gs.getIndividual()).distinct().sorted(new AlphaNumericComparator()).collect(Collectors.toList()), distinctSequenceNames, dict, null, writer); exportThreads.remove(exportId); } catch (Exception ex) {