[med-svn] [Git][med-team/minimac4][master] 9 commits: New upstream version 4.0.3

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Sun Jun 26 12:21:46 BST 2022



Étienne Mollier pushed to branch master at Debian Med / minimac4


Commits:
0954910f by Étienne Mollier at 2022-06-25T20:37:41+02:00
New upstream version 4.0.3
- - - - -
fc13b038 by Étienne Mollier at 2022-06-25T20:37:41+02:00
routine-update: New upstream version

- - - - -
58dd1f7e by Étienne Mollier at 2022-06-25T20:37:42+02:00
Update upstream source from tag 'upstream/4.0.3'

Update to upstream version '4.0.3'
with Debian dir 9ea3a030d17dcfb0592ec9217a249406c3a2f752
- - - - -
7555aab1 by Étienne Mollier at 2022-06-25T20:37:42+02:00
routine-update: Standards-Version: 4.6.1

- - - - -
cf428f2d by Étienne Mollier at 2022-06-25T21:08:52+02:00
Refresh patches.

- - - - -
53088cd4 by Étienne Mollier at 2022-06-26T12:48:36+02:00
d/minimac4.1: bump version, no changes in available arguments.

- - - - -
c2b18567 by Étienne Mollier at 2022-06-26T13:09:04+02:00
d/copyright: bump copyright year to 2022.

- - - - -
45f53101 by Étienne Mollier at 2022-06-26T13:17:17+02:00
d/control: add myself to uploaders.

- - - - -
1ee3be72 by Étienne Mollier at 2022-06-26T13:17:34+02:00
ready for upload to unstable

- - - - -


12 changed files:

- CMakeLists.txt
- README.md
- debian/changelog
- debian/control
- debian/copyright
- debian/minimac4.1
- debian/patches/Fix_reproducible_builds.patch
- debian/patches/Use_shared_zlib.patch
- requirements.txt
- src/Analysis.cpp
- src/DosageData.cpp
- src/MarkovModel.cpp


Changes:

=====================================
CMakeLists.txt
=====================================
@@ -1,5 +1,9 @@
 cmake_minimum_required(VERSION 3.2)
-project(minimac4 VERSION 1.0.2)
+project(minimac4 VERSION 1.0.3)
+
+if(NOT CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose build type (Debug|Release|RelWithDebInfo|MinSizeRel)" FORCE)
+endif()
 
 set(CMAKE_CXX_STANDARD 11)
 execute_process(COMMAND date OUTPUT_VARIABLE DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -15,8 +19,6 @@ if (OPENMP_FOUND)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
 endif()
 
-
-
 find_package(ZLIB REQUIRED)
 find_library(STATGEN_LIBRARY StatGen)
 add_executable(minimac4


=====================================
README.md
=====================================
@@ -33,25 +33,19 @@ pip install --user cget --ignore-installed six
 ```
 
 ## Installation
-The easiest way to install Minimac4 and its dependencies is to use the install.sh file provided.
-
-```
-cd Minimac4
-bash install.sh
-```
-
-Alternatively, you can use cget as follows:
+The easiest way to install Minimac4 and its dependencies is to use cget as follows:
 ```bash
 cget install --prefix <install_prefix> statgen/Minimac4
 ```
 
-Alternatively, you can setup a dev environment cmake directly.
+Alternatively, you can install manually:
 ```bash
 cd Minimac4
 cget install -f ./requirements.txt                      # Install dependencies locally.
 mkdir build && cd build                                 # Create out of source build directory.
 cmake -DCMAKE_TOOLCHAIN_FILE=../cget/cget/cget.cmake .. # Configure project with dependency paths.
 make                                                    # Build.
+make install                                            # Install
 ```
 
 


=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+minimac4 (4.0.3-1) unstable; urgency=medium
+
+  * New upstream version
+  * Standards-Version: 4.6.1 (routine-update)
+  * Refresh patches.
+  * d/minimac4.1: bump version, no changes in available arguments.
+  * d/copyright: bump copyright year to 2022.
+  * d/control: add myself to uploaders.
+
+ -- Étienne Mollier <emollier at debian.org>  Sun, 26 Jun 2022 13:09:35 +0200
+
 minimac4 (1.0.2-4) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -1,13 +1,14 @@
 Source: minimac4
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Dylan Aïssi <daissi at debian.org>
+Uploaders: Dylan Aïssi <daissi at debian.org>,
+           Étienne Mollier <emollier at debian.org>
 Section: science
 Priority: optional
 Build-Depends: debhelper-compat (= 13),
                cmake,
                zlib1g-dev,
                libstatgen-dev
-Standards-Version: 4.6.0
+Standards-Version: 4.6.1
 Vcs-Browser: https://salsa.debian.org/med-team/minimac4
 Vcs-Git: https://salsa.debian.org/med-team/minimac4.git
 Homepage: https://genome.sph.umich.edu/wiki/Minimac4


=====================================
debian/copyright
=====================================
@@ -4,11 +4,12 @@ Upstream-Contact: Sayantan Das <sayantan at umich.edu>
 Source: https://genome.sph.umich.edu/wiki/Minimac4
 
 Files: *
-Copyright: 2016-2018 Sayantan Das, Christian Fuchsberger <cfuchsb at umich.edu>, David Hinds, Mary Kate Wing <mktrost at umich.edu> and Goncalo Abecasis <goncalo at umich.edu>
+Copyright: 2016-2022 Sayantan Das, Christian Fuchsberger <cfuchsb at umich.edu>, David Hinds, Mary Kate Wing <mktrost at umich.edu> and Goncalo Abecasis <goncalo at umich.edu>
 License: GPL-3
 
 Files: debian/*
 Copyright: 2018 Dylan Aïssi <bob.dybian at gmail.com>
+           2022 Étienne Mollier <emollier at debian.org>
 License: GPL-3
 
 License: GPL-3


=====================================
debian/minimac4.1
=====================================
@@ -1,10 +1,11 @@
 .\"
-.TH MINIMAC4 "1" "June 2018" "1.0.0"
+.TH MINIMAC4 "1" "June 2022" "1.0.3"
 .SH NAME
 minimac4 \- Fast Imputation Based on State Space Reduction HMM
 .SH DESCRIPTION
+.P
 Minimac4 is a lower memory and more computationally efficient implementation of "minimac2/3".
-
+.P
 It is an algorithm for genotypic imputation that works on phased genotypes (say from MaCH).
 Minimac4 is designed to handle very large reference panels in a more computationally efficient
 way with no loss of accuracy. This algorithm analyzes only the unique sets of haplotypes in


=====================================
debian/patches/Fix_reproducible_builds.patch
=====================================
@@ -3,10 +3,10 @@ Description: Fix reproducible builds.
 Last-Update: 2018-09-26
 Forwarded: TODO
 
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -2,8 +2,22 @@
- project(minimac4 VERSION 1.0.2)
+--- minimac4.orig/CMakeLists.txt
++++ minimac4/CMakeLists.txt
+@@ -6,8 +6,22 @@
+ endif()
  
  set(CMAKE_CXX_STANDARD 11)
 -execute_process(COMMAND date OUTPUT_VARIABLE DATE OUTPUT_STRIP_TRAILING_WHITESPACE)


=====================================
debian/patches/Use_shared_zlib.patch
=====================================
@@ -3,9 +3,9 @@ Description: Use shared zlib.
 Last-Update: 2019-10-14
 Forwarded: not-needed
 
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -21,7 +21,7 @@
+--- minimac4.orig/CMakeLists.txt
++++ minimac4/CMakeLists.txt
+@@ -25,7 +25,7 @@
  
  add_definitions(-DVERSION="${PROJECT_VERSION}" -DUSER="${USER}" -DDATE="${DATE}")
  


=====================================
requirements.txt
=====================================
@@ -1,2 +1,2 @@
-zlib,http://zlib.net/zlib-1.2.11.tar.gz
+zlib,https://zlib.net/fossils/zlib-1.2.11.tar.gz --hash md5:1c9f62f0778697a09d36121ead88e08e
 statgen/libStatGen --cmake dep/libstatgen.cmake


=====================================
src/Analysis.cpp
=====================================
@@ -57,11 +57,11 @@ bool Analysis::CreateRecombinationMap()
             denom += GeneticMapData[i][0] - GeneticMapData[i-1][0];
             num = referencePanel.VariantList[SecondIndex].bp - referencePanel.VariantList[SecondIndex-1].bp;
             Val += GeneticMapData[i][1];
-            referencePanel.Recom[SecondIndex-1]=(1-exp(-Val*num/denom/50))/2;
+//            referencePanel.Recom[SecondIndex-1]=(1-exp(-Val*num/denom/50))/2;
             if(num==0  || Val==0)
                 referencePanel.Recom[SecondIndex-1]=RECOM_MIN;
             else
-                referencePanel.Recom[SecondIndex-1]=max(RECOM_MIN,Val*num/denom);
+                referencePanel.Recom[SecondIndex-1]=max(RECOM_MIN, 0.01*Val*num/denom);
 
 //            cout<<" RECOM = "<<SecondIndex-1<<"\t"<<referencePanel.Recom[SecondIndex-1]<<"\t"<<num/denom<<"\t"<<Val*num/denom<<endl;
             SecondIndex++;
@@ -430,6 +430,11 @@ void Analysis::AppendtoMainVcfFaster(int ChunkNo, int MaxIndex)
         tempFileIndex+=(".chunk."+(string)(strs1.str())+".dose.part." +
                          (string)(strs.str())+".vcf.gz");
         vcfdosepartialList[i-1] = ifopen(tempFileIndex.c_str(), "r");
+        if (!vcfdosepartialList[i-1])
+        {
+            std::cout << "Error: Could not open temporary file. Ensure that `ulimit -n` is at least greater than " << (MaxIndex + 5) << "." << std::endl;
+            exit(-1);
+        }
     }
     string line;
     int i=0;
@@ -953,7 +958,7 @@ bool Analysis::OpenStreamOutputFiles()
         ifprintf(vcfLoodosepartial,"##contig=<ID=%s>\n",referencePanel.finChromosome.c_str());
         ifprintf(vcfLoodosepartial,"##INFO=<ID=TYPED,Number=0,Type=Flag,Description=\"Marker was genotyped AND imputed\">\n");
         ifprintf(vcfLoodosepartial,"##FORMAT=<ID=GT,Number=1,Type=String,Description=\"Genotyped alleles from Array\">\n");
-        ifprintf(vcfLoodosepartial,"##FORMAT=<ID=LDS,Number=1,Type=String,Description=\"Leave-one-out Imputed Dosage : Estimated Haploid Alternate Allele Dosage assuming site was NOT genotyped \">\n");
+        ifprintf(vcfLoodosepartial,"##FORMAT=<ID=LDS,Number=2,Type=Float,Description=\"Leave-one-out Imputed Dosage : Estimated Haploid Alternate Allele Dosage assuming site was NOT genotyped \">\n");
         ifprintf(vcfLoodosepartial,"##minimac4_Command=%s\n",MyAllVariables->myOutFormat.CommandLine.c_str());
         ifprintf(vcfLoodosepartial,"#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT");
 


=====================================
src/DosageData.cpp
=====================================
@@ -297,7 +297,7 @@ void DosageData::PrintDiploidLooDosage(float &x, float &y, AlleleType a, AlleleT
     PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"\t");
     PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"%c|%c",a,b);
     PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,":");
-    PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"%.3f|%.3f",x , y);
+    PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"%.3f,%.3f",x , y);
 }
 
 
@@ -342,7 +342,7 @@ void DosageData::PrintDosageForVcfOutputForID(int MarkerIndex)
                  if( tHapFull->MissingSampleUnscaffolded[gwasHapIndex][TypedMarkerIndex] =='1'
                      || tHapFull->MissingSampleUnscaffolded[gwasHapIndex+1][TypedMarkerIndex]=='1')
                  {
-                     PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"\t.|.:.|.");
+                     PrintEmpStringLength+=sprintf(PrintEmpStringPointer+PrintEmpStringLength,"\t.|.:.,.");
                  }
                  else
                  {


=====================================
src/MarkovModel.cpp
=====================================
@@ -661,11 +661,11 @@ void MarkovModel::unfoldProbabilitiesWithThreshold(int bridgeIndex,
         tempInvCardinality=thisInfo.InvuniqueCardinality[i];
 
         temp=LeftNoRecomProb[i];
-        LeftAdj_Rec[i] = (LeftTotalProb[i] - temp ) * tempInvCardinality;
+        LeftAdj_Rec[i] = std::max(LeftTotalProb[i] - temp, 0.) * tempInvCardinality;
         LeftAdj_NoRrec[i] = temp / (PrevLeftFoldedProb[i]+1e-30);
 
         temp=RightNoRecomProb[i];
-        RightAdj_Rec[i] = (RightTotalProb[i] - temp )  * tempInvCardinality;
+        RightAdj_Rec[i] = std::max(RightTotalProb[i] - temp, 0.)  * tempInvCardinality;
         RightAdj_NoRec[i] = RightNoRecomProb[i] / (PrevRightFoldedProb[i]+1e-30);
     }
 
@@ -682,6 +682,7 @@ void MarkovModel::unfoldProbabilitiesWithThreshold(int bridgeIndex,
             UnMappedIndex=thisInfo.uniqueIndexReverseMaps[i][K];
             probHapFullAverage[UnMappedIndex]=(LeftAdj_Rec[i] + LeftAdj_NoRrec[i]*LeftPrev[UnMappedIndex])
                                                * (RightAdj_Rec[i] + RightAdj_NoRec[i]*RightPrev[UnMappedIndex]);
+            assert(probHapFullAverage[UnMappedIndex] >= 0.);
             BestMatchFullRefHaps[NoBestMatchFullRefHaps++]=UnMappedIndex;
         }
     }
@@ -704,6 +705,7 @@ void MarkovModel::FoldBackProbabilitiesWithThreshold(ReducedHaplotypeInfo &Info)
         MappedIndex=Info.uniqueIndexMap[UnMappedIndex];
         FinalBestMatchfHapsIndicator[MappedIndex]=1;
         FoldedProbValue[MappedIndex]+=probHapFullAverage[UnMappedIndex];
+        assert(FoldedProbValue[MappedIndex] >= 0.);
     }
 
     for (int i=0; i<rHapFull->maxRepSize; i++)



View it on GitLab: https://salsa.debian.org/med-team/minimac4/-/compare/1763456e18fa2d5325e3ae887fa441f8cb92dd25...1ee3be7253c36ad2e01d5bc692cc4443a8a0c21a

-- 
View it on GitLab: https://salsa.debian.org/med-team/minimac4/-/compare/1763456e18fa2d5325e3ae887fa441f8cb92dd25...1ee3be7253c36ad2e01d5bc692cc4443a8a0c21a
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220626/e0845fdf/attachment-0001.htm>


More information about the debian-med-commit mailing list