├── .clang-format
├── .cmakelintrc
├── .drone.yml
├── .drone.yml.sig
├── .drone
├── build.sh
├── copy_build.sh
└── test_quant.sh
├── .github
└── ISSUE_TEMPLATE
│ └── bug_report.md
├── .gitignore
├── .lgtm.yml
├── .travis.yml
├── CMakeLists.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── cmake
├── Modules
│ ├── FindJellyfish.cmake
│ ├── FindJemalloc.cmake
│ ├── FindTBB.cmake
│ ├── FindTcmalloc.cmake
│ ├── Findcereal.cmake
│ ├── Findlibdivsufsort.cmake
│ ├── Findlibgff.cmake
│ └── Findlibstadenio.cmake
├── PostInstall.cmake
├── SimpleTest.cmake
├── TestSalmonFMD.cmake
├── TestSalmonQuasi.cmake
└── UnitTests.cmake
├── current_version.txt
├── doc
├── FileFormats.md
├── Makefile
├── license-header.txt
├── logo.png
├── requirements.txt
├── salmon_logo.png
├── source
│ ├── ReadLibraryIllustration.png
│ ├── alevin.rst
│ ├── building.rst
│ ├── conf.py
│ ├── file_formats.rst
│ ├── index.rst
│ ├── library_type.rst
│ ├── license.rst
│ └── salmon.rst
└── steps_to_prepare_release.md
├── docker
├── Dockerfile
└── build_test.sh
├── include
├── AlevinHash.hpp
├── AlevinOpts.hpp
├── AlevinTypes.hpp
├── AlevinUtils.hpp
├── AlignmentCommon.hpp
├── AlignmentGroup.hpp
├── AlignmentLibrary.hpp
├── AlignmentModel.hpp
├── AtomicMatrix.hpp
├── BAMQueue.hpp
├── BAMQueue.tpp
├── BAMUtils.hpp
├── BarcodeGroup.hpp
├── BarcodeModel.hpp
├── BiasParams.hpp
├── BinaryLiteral.hpp
├── BootstrapWriter.hpp
├── ClusterForest.hpp
├── CollapsedCellOptimizer.hpp
├── CollapsedEMOptimizer.hpp
├── CollapsedGibbsSampler.hpp
├── CommonTypes.hpp
├── DedupUMI.hpp
├── DistributionUtils.hpp
├── EMUtils.hpp
├── EffectiveLengthStats.hpp
├── EquivalenceClassBuilder.hpp
├── FASTAParser.hpp
├── FastxParser.hpp
├── FastxParserThreadUtils.hpp
├── ForgettingMassCalculator.hpp
├── FragmentLengthDistribution.hpp
├── FragmentList.hpp
├── FragmentStartPositionDistribution.hpp
├── GCFragModel.hpp
├── GZipWriter.hpp
├── GenomicFeature.hpp
├── Graph.hpp
├── IOUtils.hpp
├── IndexVersionInfo.hpp
├── KmerContext.hpp
├── LibraryFormat.hpp
├── LibraryTypeDetector.hpp
├── MappingStatistics.hpp
├── MicroOpts.hpp
├── MiniBatchInfo.hpp
├── MultinomialSampler.hpp
├── NullFragmentFilter.hpp
├── ONTAlignmentModel.hpp
├── OutputUnmappedFilter.hpp
├── PCA.hpp
├── ProgramOptionsGenerator.hpp
├── ReadExperiment.hpp
├── ReadKmerDist.hpp
├── ReadLibrary.hpp
├── ReadPair.hpp
├── ReadProducer.hpp
├── SBModel.hpp
├── SGSmooth.hpp
├── SalmonConfig.hpp
├── SalmonDefaults.hpp
├── SalmonExceptions.hpp
├── SalmonIndex.hpp
├── SalmonIndexVersionInfo.hpp
├── SalmonMappingUtils.hpp
├── SalmonMath.hpp
├── SalmonOpts.hpp
├── SalmonSpinLock.hpp
├── SalmonStringUtils.hpp
├── SalmonUtils.hpp
├── Sampler.hpp
├── SequenceBiasModel.hpp
├── SimplePosBias.hpp
├── SingleCellProtocols.hpp
├── StadenUtils.hpp
├── SufficientStatisticsQueue.hpp
├── TextBootstrapWriter.hpp
├── Transcript.hpp
├── TranscriptCluster.hpp
├── TranscriptGeneMap.hpp
├── TranscriptGroup.hpp
├── TryableSpinLock.hpp
├── UnpairedRead.hpp
├── UtilityFunctions.hpp
├── VersionChecker.hpp
├── WhiteList.hpp
├── atomicops.h
├── backtrace.hpp
├── blockingconcurrentqueue.h
├── bucket_container.hh
├── concurrentqueue.h
├── core
│ ├── algorithm.hpp
│ ├── any.hpp
│ ├── array.hpp
│ ├── deque.hpp
│ ├── forward_list.hpp
│ ├── functional.hpp
│ ├── internal.hpp
│ ├── iterator.hpp
│ ├── list.hpp
│ ├── map.hpp
│ ├── memory.hpp
│ ├── memory_resource.hpp
│ ├── meta.hpp
│ ├── numeric.hpp
│ ├── optional.hpp
│ ├── propagate_const.hpp
│ ├── range.hpp
│ ├── regex.hpp
│ ├── set.hpp
│ ├── string.hpp
│ ├── string_view.hpp
│ ├── type_traits.hpp
│ ├── typeinfo.hpp
│ ├── unordered_map.hpp
│ ├── unordered_set.hpp
│ ├── utility.hpp
│ ├── variant.hpp
│ └── vector.hpp
├── cuckoohash_config.hh
├── cuckoohash_map.hh
├── cuckoohash_util.hh
├── dbg.hpp
├── default_hasher.hh
├── edlib.h
├── eigen3
│ ├── Eigen
│ │ ├── Cholesky
│ │ ├── CholmodSupport
│ │ ├── Core
│ │ ├── Dense
│ │ ├── Eigen
│ │ ├── Eigenvalues
│ │ ├── Geometry
│ │ ├── Householder
│ │ ├── IterativeLinearSolvers
│ │ ├── Jacobi
│ │ ├── LU
│ │ ├── MetisSupport
│ │ ├── OrderingMethods
│ │ ├── PaStiXSupport
│ │ ├── PardisoSupport
│ │ ├── QR
│ │ ├── QtAlignedMalloc
│ │ ├── SPQRSupport
│ │ ├── SVD
│ │ ├── Sparse
│ │ ├── SparseCholesky
│ │ ├── SparseCore
│ │ ├── SparseLU
│ │ ├── SparseQR
│ │ ├── StdDeque
│ │ ├── StdList
│ │ ├── StdVector
│ │ ├── SuperLUSupport
│ │ ├── UmfPackSupport
│ │ └── src
│ │ │ ├── Cholesky
│ │ │ ├── LDLT.h
│ │ │ ├── LLT.h
│ │ │ └── LLT_LAPACKE.h
│ │ │ ├── CholmodSupport
│ │ │ └── CholmodSupport.h
│ │ │ ├── Core
│ │ │ ├── Array.h
│ │ │ ├── ArrayBase.h
│ │ │ ├── ArrayWrapper.h
│ │ │ ├── Assign.h
│ │ │ ├── AssignEvaluator.h
│ │ │ ├── Assign_MKL.h
│ │ │ ├── BandMatrix.h
│ │ │ ├── Block.h
│ │ │ ├── BooleanRedux.h
│ │ │ ├── CommaInitializer.h
│ │ │ ├── ConditionEstimator.h
│ │ │ ├── CoreEvaluators.h
│ │ │ ├── CoreIterators.h
│ │ │ ├── CwiseBinaryOp.h
│ │ │ ├── CwiseNullaryOp.h
│ │ │ ├── CwiseTernaryOp.h
│ │ │ ├── CwiseUnaryOp.h
│ │ │ ├── CwiseUnaryView.h
│ │ │ ├── DenseBase.h
│ │ │ ├── DenseCoeffsBase.h
│ │ │ ├── DenseStorage.h
│ │ │ ├── Diagonal.h
│ │ │ ├── DiagonalMatrix.h
│ │ │ ├── DiagonalProduct.h
│ │ │ ├── Dot.h
│ │ │ ├── EigenBase.h
│ │ │ ├── ForceAlignedAccess.h
│ │ │ ├── Fuzzy.h
│ │ │ ├── GeneralProduct.h
│ │ │ ├── GenericPacketMath.h
│ │ │ ├── GlobalFunctions.h
│ │ │ ├── IO.h
│ │ │ ├── Inverse.h
│ │ │ ├── Map.h
│ │ │ ├── MapBase.h
│ │ │ ├── MathFunctions.h
│ │ │ ├── MathFunctionsImpl.h
│ │ │ ├── Matrix.h
│ │ │ ├── MatrixBase.h
│ │ │ ├── NestByValue.h
│ │ │ ├── NoAlias.h
│ │ │ ├── NumTraits.h
│ │ │ ├── PermutationMatrix.h
│ │ │ ├── PlainObjectBase.h
│ │ │ ├── Product.h
│ │ │ ├── ProductEvaluators.h
│ │ │ ├── Random.h
│ │ │ ├── Redux.h
│ │ │ ├── Ref.h
│ │ │ ├── Replicate.h
│ │ │ ├── ReturnByValue.h
│ │ │ ├── Reverse.h
│ │ │ ├── Select.h
│ │ │ ├── SelfAdjointView.h
│ │ │ ├── SelfCwiseBinaryOp.h
│ │ │ ├── Solve.h
│ │ │ ├── SolveTriangular.h
│ │ │ ├── SolverBase.h
│ │ │ ├── StableNorm.h
│ │ │ ├── Stride.h
│ │ │ ├── Swap.h
│ │ │ ├── Transpose.h
│ │ │ ├── Transpositions.h
│ │ │ ├── TriangularMatrix.h
│ │ │ ├── VectorBlock.h
│ │ │ ├── VectorwiseOp.h
│ │ │ ├── Visitor.h
│ │ │ ├── arch
│ │ │ │ ├── AVX
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ ├── PacketMath.h
│ │ │ │ │ └── TypeCasting.h
│ │ │ │ ├── AVX512
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ └── PacketMath.h
│ │ │ │ ├── AltiVec
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ └── PacketMath.h
│ │ │ │ ├── CUDA
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── Half.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ ├── PacketMath.h
│ │ │ │ │ ├── PacketMathHalf.h
│ │ │ │ │ └── TypeCasting.h
│ │ │ │ ├── Default
│ │ │ │ │ └── Settings.h
│ │ │ │ ├── NEON
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ └── PacketMath.h
│ │ │ │ ├── SSE
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ ├── PacketMath.h
│ │ │ │ │ └── TypeCasting.h
│ │ │ │ └── ZVector
│ │ │ │ │ ├── Complex.h
│ │ │ │ │ ├── MathFunctions.h
│ │ │ │ │ └── PacketMath.h
│ │ │ ├── functors
│ │ │ │ ├── AssignmentFunctors.h
│ │ │ │ ├── BinaryFunctors.h
│ │ │ │ ├── NullaryFunctors.h
│ │ │ │ ├── StlFunctors.h
│ │ │ │ ├── TernaryFunctors.h
│ │ │ │ └── UnaryFunctors.h
│ │ │ ├── products
│ │ │ │ ├── GeneralBlockPanelKernel.h
│ │ │ │ ├── GeneralMatrixMatrix.h
│ │ │ │ ├── GeneralMatrixMatrixTriangular.h
│ │ │ │ ├── GeneralMatrixMatrixTriangular_BLAS.h
│ │ │ │ ├── GeneralMatrixMatrix_BLAS.h
│ │ │ │ ├── GeneralMatrixVector.h
│ │ │ │ ├── GeneralMatrixVector_BLAS.h
│ │ │ │ ├── Parallelizer.h
│ │ │ │ ├── SelfadjointMatrixMatrix.h
│ │ │ │ ├── SelfadjointMatrixMatrix_BLAS.h
│ │ │ │ ├── SelfadjointMatrixVector.h
│ │ │ │ ├── SelfadjointMatrixVector_BLAS.h
│ │ │ │ ├── SelfadjointProduct.h
│ │ │ │ ├── SelfadjointRank2Update.h
│ │ │ │ ├── TriangularMatrixMatrix.h
│ │ │ │ ├── TriangularMatrixMatrix_BLAS.h
│ │ │ │ ├── TriangularMatrixVector.h
│ │ │ │ ├── TriangularMatrixVector_BLAS.h
│ │ │ │ ├── TriangularSolverMatrix.h
│ │ │ │ ├── TriangularSolverMatrix_BLAS.h
│ │ │ │ └── TriangularSolverVector.h
│ │ │ └── util
│ │ │ │ ├── BlasUtil.h
│ │ │ │ ├── Constants.h
│ │ │ │ ├── DisableStupidWarnings.h
│ │ │ │ ├── ForwardDeclarations.h
│ │ │ │ ├── MKL_support.h
│ │ │ │ ├── Macros.h
│ │ │ │ ├── Memory.h
│ │ │ │ ├── Meta.h
│ │ │ │ ├── NonMPL2.h
│ │ │ │ ├── ReenableStupidWarnings.h
│ │ │ │ ├── StaticAssert.h
│ │ │ │ └── XprHelper.h
│ │ │ ├── Eigenvalues
│ │ │ ├── ComplexEigenSolver.h
│ │ │ ├── ComplexSchur.h
│ │ │ ├── ComplexSchur_LAPACKE.h
│ │ │ ├── EigenSolver.h
│ │ │ ├── GeneralizedEigenSolver.h
│ │ │ ├── GeneralizedSelfAdjointEigenSolver.h
│ │ │ ├── HessenbergDecomposition.h
│ │ │ ├── MatrixBaseEigenvalues.h
│ │ │ ├── RealQZ.h
│ │ │ ├── RealSchur.h
│ │ │ ├── RealSchur_LAPACKE.h
│ │ │ ├── SelfAdjointEigenSolver.h
│ │ │ ├── SelfAdjointEigenSolver_LAPACKE.h
│ │ │ └── Tridiagonalization.h
│ │ │ ├── Geometry
│ │ │ ├── AlignedBox.h
│ │ │ ├── AngleAxis.h
│ │ │ ├── EulerAngles.h
│ │ │ ├── Homogeneous.h
│ │ │ ├── Hyperplane.h
│ │ │ ├── OrthoMethods.h
│ │ │ ├── ParametrizedLine.h
│ │ │ ├── Quaternion.h
│ │ │ ├── Rotation2D.h
│ │ │ ├── RotationBase.h
│ │ │ ├── Scaling.h
│ │ │ ├── Transform.h
│ │ │ ├── Translation.h
│ │ │ ├── Umeyama.h
│ │ │ └── arch
│ │ │ │ └── Geometry_SSE.h
│ │ │ ├── Householder
│ │ │ ├── BlockHouseholder.h
│ │ │ ├── Householder.h
│ │ │ └── HouseholderSequence.h
│ │ │ ├── IterativeLinearSolvers
│ │ │ ├── BasicPreconditioners.h
│ │ │ ├── BiCGSTAB.h
│ │ │ ├── ConjugateGradient.h
│ │ │ ├── IncompleteCholesky.h
│ │ │ ├── IncompleteLUT.h
│ │ │ ├── IterativeSolverBase.h
│ │ │ ├── LeastSquareConjugateGradient.h
│ │ │ └── SolveWithGuess.h
│ │ │ ├── Jacobi
│ │ │ └── Jacobi.h
│ │ │ ├── LU
│ │ │ ├── Determinant.h
│ │ │ ├── FullPivLU.h
│ │ │ ├── InverseImpl.h
│ │ │ ├── PartialPivLU.h
│ │ │ ├── PartialPivLU_LAPACKE.h
│ │ │ └── arch
│ │ │ │ └── Inverse_SSE.h
│ │ │ ├── MetisSupport
│ │ │ └── MetisSupport.h
│ │ │ ├── OrderingMethods
│ │ │ ├── Amd.h
│ │ │ ├── Eigen_Colamd.h
│ │ │ └── Ordering.h
│ │ │ ├── PaStiXSupport
│ │ │ └── PaStiXSupport.h
│ │ │ ├── PardisoSupport
│ │ │ └── PardisoSupport.h
│ │ │ ├── QR
│ │ │ ├── ColPivHouseholderQR.h
│ │ │ ├── ColPivHouseholderQR_LAPACKE.h
│ │ │ ├── CompleteOrthogonalDecomposition.h
│ │ │ ├── FullPivHouseholderQR.h
│ │ │ ├── HouseholderQR.h
│ │ │ └── HouseholderQR_LAPACKE.h
│ │ │ ├── SPQRSupport
│ │ │ └── SuiteSparseQRSupport.h
│ │ │ ├── SVD
│ │ │ ├── BDCSVD.h
│ │ │ ├── JacobiSVD.h
│ │ │ ├── JacobiSVD_LAPACKE.h
│ │ │ ├── SVDBase.h
│ │ │ └── UpperBidiagonalization.h
│ │ │ ├── SparseCholesky
│ │ │ ├── SimplicialCholesky.h
│ │ │ └── SimplicialCholesky_impl.h
│ │ │ ├── SparseCore
│ │ │ ├── AmbiVector.h
│ │ │ ├── CompressedStorage.h
│ │ │ ├── ConservativeSparseSparseProduct.h
│ │ │ ├── MappedSparseMatrix.h
│ │ │ ├── SparseAssign.h
│ │ │ ├── SparseBlock.h
│ │ │ ├── SparseColEtree.h
│ │ │ ├── SparseCompressedBase.h
│ │ │ ├── SparseCwiseBinaryOp.h
│ │ │ ├── SparseCwiseUnaryOp.h
│ │ │ ├── SparseDenseProduct.h
│ │ │ ├── SparseDiagonalProduct.h
│ │ │ ├── SparseDot.h
│ │ │ ├── SparseFuzzy.h
│ │ │ ├── SparseMap.h
│ │ │ ├── SparseMatrix.h
│ │ │ ├── SparseMatrixBase.h
│ │ │ ├── SparsePermutation.h
│ │ │ ├── SparseProduct.h
│ │ │ ├── SparseRedux.h
│ │ │ ├── SparseRef.h
│ │ │ ├── SparseSelfAdjointView.h
│ │ │ ├── SparseSolverBase.h
│ │ │ ├── SparseSparseProductWithPruning.h
│ │ │ ├── SparseTranspose.h
│ │ │ ├── SparseTriangularView.h
│ │ │ ├── SparseUtil.h
│ │ │ ├── SparseVector.h
│ │ │ ├── SparseView.h
│ │ │ └── TriangularSolver.h
│ │ │ ├── SparseLU
│ │ │ ├── SparseLU.h
│ │ │ ├── SparseLUImpl.h
│ │ │ ├── SparseLU_Memory.h
│ │ │ ├── SparseLU_Structs.h
│ │ │ ├── SparseLU_SupernodalMatrix.h
│ │ │ ├── SparseLU_Utils.h
│ │ │ ├── SparseLU_column_bmod.h
│ │ │ ├── SparseLU_column_dfs.h
│ │ │ ├── SparseLU_copy_to_ucol.h
│ │ │ ├── SparseLU_gemm_kernel.h
│ │ │ ├── SparseLU_heap_relax_snode.h
│ │ │ ├── SparseLU_kernel_bmod.h
│ │ │ ├── SparseLU_panel_bmod.h
│ │ │ ├── SparseLU_panel_dfs.h
│ │ │ ├── SparseLU_pivotL.h
│ │ │ ├── SparseLU_pruneL.h
│ │ │ └── SparseLU_relax_snode.h
│ │ │ ├── SparseQR
│ │ │ └── SparseQR.h
│ │ │ ├── StlSupport
│ │ │ ├── StdDeque.h
│ │ │ ├── StdList.h
│ │ │ ├── StdVector.h
│ │ │ └── details.h
│ │ │ ├── SuperLUSupport
│ │ │ └── SuperLUSupport.h
│ │ │ ├── UmfPackSupport
│ │ │ └── UmfPackSupport.h
│ │ │ ├── misc
│ │ │ ├── Image.h
│ │ │ ├── Kernel.h
│ │ │ ├── RealSvd2x2.h
│ │ │ ├── blas.h
│ │ │ ├── lapack.h
│ │ │ ├── lapacke.h
│ │ │ └── lapacke_mangling.h
│ │ │ └── plugins
│ │ │ ├── ArrayCwiseBinaryOps.h
│ │ │ ├── ArrayCwiseUnaryOps.h
│ │ │ ├── BlockMethods.h
│ │ │ ├── CommonCwiseBinaryOps.h
│ │ │ ├── CommonCwiseUnaryOps.h
│ │ │ ├── MatrixCwiseBinaryOps.h
│ │ │ └── MatrixCwiseUnaryOps.h
│ ├── signature_of_eigen3_matrix_library
│ └── unsupported
│ │ └── Eigen
│ │ ├── AdolcForward
│ │ ├── AlignedVector3
│ │ ├── ArpackSupport
│ │ ├── AutoDiff
│ │ ├── BVH
│ │ ├── CXX11
│ │ ├── Tensor
│ │ ├── TensorSymmetry
│ │ ├── ThreadPool
│ │ └── src
│ │ │ ├── Tensor
│ │ │ ├── Tensor.h
│ │ │ ├── TensorArgMax.h
│ │ │ ├── TensorAssign.h
│ │ │ ├── TensorBase.h
│ │ │ ├── TensorBroadcasting.h
│ │ │ ├── TensorChipping.h
│ │ │ ├── TensorConcatenation.h
│ │ │ ├── TensorContraction.h
│ │ │ ├── TensorContractionBlocking.h
│ │ │ ├── TensorContractionCuda.h
│ │ │ ├── TensorContractionMapper.h
│ │ │ ├── TensorContractionThreadPool.h
│ │ │ ├── TensorConversion.h
│ │ │ ├── TensorConvolution.h
│ │ │ ├── TensorCostModel.h
│ │ │ ├── TensorCustomOp.h
│ │ │ ├── TensorDevice.h
│ │ │ ├── TensorDeviceCuda.h
│ │ │ ├── TensorDeviceDefault.h
│ │ │ ├── TensorDeviceSycl.h
│ │ │ ├── TensorDeviceThreadPool.h
│ │ │ ├── TensorDimensionList.h
│ │ │ ├── TensorDimensions.h
│ │ │ ├── TensorEvalTo.h
│ │ │ ├── TensorEvaluator.h
│ │ │ ├── TensorExecutor.h
│ │ │ ├── TensorExpr.h
│ │ │ ├── TensorFFT.h
│ │ │ ├── TensorFixedSize.h
│ │ │ ├── TensorForcedEval.h
│ │ │ ├── TensorForwardDeclarations.h
│ │ │ ├── TensorFunctors.h
│ │ │ ├── TensorGenerator.h
│ │ │ ├── TensorGlobalFunctions.h
│ │ │ ├── TensorIO.h
│ │ │ ├── TensorImagePatch.h
│ │ │ ├── TensorIndexList.h
│ │ │ ├── TensorInflation.h
│ │ │ ├── TensorInitializer.h
│ │ │ ├── TensorIntDiv.h
│ │ │ ├── TensorLayoutSwap.h
│ │ │ ├── TensorMacros.h
│ │ │ ├── TensorMap.h
│ │ │ ├── TensorMeta.h
│ │ │ ├── TensorMorphing.h
│ │ │ ├── TensorPadding.h
│ │ │ ├── TensorPatch.h
│ │ │ ├── TensorRandom.h
│ │ │ ├── TensorReduction.h
│ │ │ ├── TensorReductionCuda.h
│ │ │ ├── TensorReductionSycl.h
│ │ │ ├── TensorRef.h
│ │ │ ├── TensorReverse.h
│ │ │ ├── TensorScan.h
│ │ │ ├── TensorShuffling.h
│ │ │ ├── TensorStorage.h
│ │ │ ├── TensorStriding.h
│ │ │ ├── TensorSycl.h
│ │ │ ├── TensorSyclConvertToDeviceExpression.h
│ │ │ ├── TensorSyclExprConstructor.h
│ │ │ ├── TensorSyclExtractAccessor.h
│ │ │ ├── TensorSyclExtractFunctors.h
│ │ │ ├── TensorSyclLeafCount.h
│ │ │ ├── TensorSyclPlaceHolderExpr.h
│ │ │ ├── TensorSyclRun.h
│ │ │ ├── TensorSyclTuple.h
│ │ │ ├── TensorTraits.h
│ │ │ ├── TensorUInt128.h
│ │ │ └── TensorVolumePatch.h
│ │ │ ├── TensorSymmetry
│ │ │ ├── DynamicSymmetry.h
│ │ │ ├── StaticSymmetry.h
│ │ │ ├── Symmetry.h
│ │ │ └── util
│ │ │ │ └── TemplateGroupTheory.h
│ │ │ ├── ThreadPool
│ │ │ ├── EventCount.h
│ │ │ ├── NonBlockingThreadPool.h
│ │ │ ├── RunQueue.h
│ │ │ ├── SimpleThreadPool.h
│ │ │ ├── ThreadEnvironment.h
│ │ │ ├── ThreadLocal.h
│ │ │ ├── ThreadPoolInterface.h
│ │ │ └── ThreadYield.h
│ │ │ └── util
│ │ │ ├── CXX11Meta.h
│ │ │ ├── CXX11Workarounds.h
│ │ │ ├── EmulateArray.h
│ │ │ ├── EmulateCXX11Meta.h
│ │ │ └── MaxSizeVector.h
│ │ ├── EulerAngles
│ │ ├── FFT
│ │ ├── IterativeSolvers
│ │ ├── KroneckerProduct
│ │ ├── LevenbergMarquardt
│ │ ├── MPRealSupport
│ │ ├── MatrixFunctions
│ │ ├── MoreVectorization
│ │ ├── NonLinearOptimization
│ │ ├── NumericalDiff
│ │ ├── OpenGLSupport
│ │ ├── Polynomials
│ │ ├── Skyline
│ │ ├── SparseExtra
│ │ ├── SpecialFunctions
│ │ ├── Splines
│ │ └── src
│ │ ├── AutoDiff
│ │ ├── AutoDiffJacobian.h
│ │ ├── AutoDiffScalar.h
│ │ └── AutoDiffVector.h
│ │ ├── BVH
│ │ ├── BVAlgorithms.h
│ │ └── KdBVH.h
│ │ ├── Eigenvalues
│ │ └── ArpackSelfAdjointEigenSolver.h
│ │ ├── EulerAngles
│ │ ├── EulerAngles.h
│ │ └── EulerSystem.h
│ │ ├── FFT
│ │ ├── ei_fftw_impl.h
│ │ └── ei_kissfft_impl.h
│ │ ├── IterativeSolvers
│ │ ├── ConstrainedConjGrad.h
│ │ ├── DGMRES.h
│ │ ├── GMRES.h
│ │ ├── IncompleteLU.h
│ │ ├── IterationController.h
│ │ ├── MINRES.h
│ │ └── Scaling.h
│ │ ├── KroneckerProduct
│ │ └── KroneckerTensorProduct.h
│ │ ├── LevenbergMarquardt
│ │ ├── LMcovar.h
│ │ ├── LMonestep.h
│ │ ├── LMpar.h
│ │ ├── LMqrsolv.h
│ │ └── LevenbergMarquardt.h
│ │ ├── MatrixFunctions
│ │ ├── MatrixExponential.h
│ │ ├── MatrixFunction.h
│ │ ├── MatrixLogarithm.h
│ │ ├── MatrixPower.h
│ │ ├── MatrixSquareRoot.h
│ │ └── StemFunction.h
│ │ ├── MoreVectorization
│ │ └── MathFunctions.h
│ │ ├── NonLinearOptimization
│ │ ├── HybridNonLinearSolver.h
│ │ ├── LevenbergMarquardt.h
│ │ ├── chkder.h
│ │ ├── covar.h
│ │ ├── dogleg.h
│ │ ├── fdjac1.h
│ │ ├── lmpar.h
│ │ ├── qrsolv.h
│ │ ├── r1mpyq.h
│ │ ├── r1updt.h
│ │ └── rwupdt.h
│ │ ├── NumericalDiff
│ │ └── NumericalDiff.h
│ │ ├── Polynomials
│ │ ├── Companion.h
│ │ ├── PolynomialSolver.h
│ │ └── PolynomialUtils.h
│ │ ├── Skyline
│ │ ├── SkylineInplaceLU.h
│ │ ├── SkylineMatrix.h
│ │ ├── SkylineMatrixBase.h
│ │ ├── SkylineProduct.h
│ │ ├── SkylineStorage.h
│ │ └── SkylineUtil.h
│ │ ├── SparseExtra
│ │ ├── BlockOfDynamicSparseMatrix.h
│ │ ├── BlockSparseMatrix.h
│ │ ├── DynamicSparseMatrix.h
│ │ ├── MarketIO.h
│ │ ├── MatrixMarketIterator.h
│ │ └── RandomSetter.h
│ │ ├── SpecialFunctions
│ │ ├── SpecialFunctionsArrayAPI.h
│ │ ├── SpecialFunctionsFunctors.h
│ │ ├── SpecialFunctionsHalf.h
│ │ ├── SpecialFunctionsImpl.h
│ │ ├── SpecialFunctionsPacketMath.h
│ │ └── arch
│ │ │ └── CUDA
│ │ │ └── CudaSpecialFunctions.h
│ │ └── Splines
│ │ ├── Spline.h
│ │ ├── SplineFitting.h
│ │ └── SplineFwd.h
├── ezETAProgressBar.hpp
├── fastapprox.h
├── format.h
├── httplib.hpp
├── jellyfish
│ ├── int128.hpp
│ ├── mer_dna.hpp
│ └── misc.hpp
├── json.hpp
├── kseq++.hpp
├── kseq.h
├── lightweightsemaphore.h
├── make_unique.hpp
├── nonstd
│ ├── optional.hpp
│ └── string_view.hpp
├── parallel_hashmap
│ ├── btree.h
│ ├── conanfile.py
│ ├── meminfo.h
│ ├── phmap.h
│ ├── phmap_base.h
│ ├── phmap_bits.h
│ ├── phmap_config.h
│ ├── phmap_dump.h
│ ├── phmap_fwd_decl.h
│ └── phmap_utils.h
├── pcg_extras.hpp
├── pcg_random.hpp
├── peglib.h
├── posix.h
├── radicl
│ ├── BasicBinWriter.hpp
│ └── RADHeader.hpp
├── readerwriterqueue.h
├── spdlog
│ ├── async_logger.h
│ ├── common.h
│ ├── details
│ │ ├── async_log_helper.h
│ │ ├── async_logger_impl.h
│ │ ├── file_helper.h
│ │ ├── log_msg.h
│ │ ├── logger_impl.h
│ │ ├── mpmc_bounded_q.h
│ │ ├── null_mutex.h
│ │ ├── os.h
│ │ ├── pattern_formatter_impl.h
│ │ ├── registry.h
│ │ └── spdlog_impl.h
│ ├── fmt
│ │ ├── bundled
│ │ │ ├── container.h
│ │ │ ├── format.cc
│ │ │ ├── format.h
│ │ │ ├── ostream.cc
│ │ │ ├── ostream.h
│ │ │ ├── posix.cc
│ │ │ ├── posix.h
│ │ │ ├── printf.cc
│ │ │ ├── printf.h
│ │ │ ├── string.h
│ │ │ └── time.h
│ │ ├── fmt.h
│ │ └── ostr.h
│ ├── formatter.h
│ ├── logger.h
│ ├── sinks
│ │ ├── android_sink.h
│ │ ├── ansicolor_sink.h
│ │ ├── base_sink.h
│ │ ├── dist_sink.h
│ │ ├── file_sinks.h
│ │ ├── msvc_sink.h
│ │ ├── null_sink.h
│ │ ├── ostream_sink.h
│ │ ├── sink.h
│ │ ├── stdout_sinks.h
│ │ ├── syslog_sink.h
│ │ ├── wincolor_sink.h
│ │ └── windebug_sink.h
│ ├── spdlog.h
│ └── tweakme.h
├── spline.h
├── strict_fstream.hpp
├── stx
│ ├── any.hpp
│ ├── optional.hpp
│ ├── string_view.hpp
│ └── variant.hpp
├── xxhash.h
└── zstr.hpp
├── sample_data.tgz
├── scripts
├── AddHeaders.sh
├── ComputeMutationRate.py
├── ConvertBootstrapsToTSV.py
├── Dockerfile
├── MutateReference.py
├── build_docker_binary.sh
├── bump_version.sh
├── check_shasum.sh
├── compile.sh
├── cpld.bash
├── fetchPufferfish.sh
├── fetchRapMap.sh
├── lint.sh
├── make-release.sh
├── merge_into_develop.sh
├── merge_into_master.sh
├── push-binary.sh
├── runner.sh
├── test_sim_corr.py
└── v1_10x
│ ├── run.sh
│ └── wrapper.cpp
├── src
├── Alevin.cpp
├── AlevinHash.cpp
├── AlevinUtils.cpp
├── AlignmentCommon.cpp
├── AlignmentModel.cpp
├── BAMUtils.cpp
├── BuildSalmonIndex.cpp
├── CMakeLists.txt
├── CollapsedCellOptimizer.cpp
├── CollapsedEMOptimizer.cpp
├── CollapsedGibbsSampler.cpp
├── DedupUMI.cpp
├── DistributionUtils.cpp
├── EMUtils.cpp
├── EffectiveLengthStats.cpp
├── FASTAParser.cpp
├── FastxParser.cpp
├── FragmentLengthDistribution.cpp
├── FragmentList.cpp
├── FragmentStartPositionDistribution.cpp
├── GZipWriter.cpp
├── GenomicFeature.cpp
├── Graph.cpp
├── LibraryFormat.cpp
├── ONTAlignmentModel.cpp
├── PCA.cpp
├── PCAUtils.cpp
├── ProgramOptionsGenerator.cpp
├── SBModel.cpp
├── SGSmooth.cpp
├── Salmon.cpp
├── SalmonAlevin.cpp
├── SalmonExceptions.cpp
├── SalmonQuantMerge.cpp
├── SalmonQuantify.cpp
├── SalmonQuantifyAlignments.cpp
├── SalmonStringUtils.cpp
├── SalmonUtils.cpp
├── SequenceBiasModel.cpp
├── SimplePosBias.cpp
├── SingleCellProtocols.cpp
├── StadenUtils.cpp
├── TestUtils.cpp
├── TranscriptGroup.cpp
├── VersionChecker.cpp
├── WhiteList.cpp
├── backtrace.cc
├── edlib.cpp
├── jellyfish
│ └── mer_dna.cc
├── posix.cc
└── xxhash.c
└── tests
├── GCSampleTests.cpp
├── KmerHistTests.cpp
├── LibraryTypeTests.cpp
├── README.md
├── UnitTests.cpp
├── alevin_test_data.tar.gz
├── basic_alevin_test.sh
├── catch.hpp
├── compile_tests
└── int128_numeric_limits.cpp
└── test_quant.nf
/.cmakelintrc:
--------------------------------------------------------------------------------
1 | filter=-linelength
2 |
--------------------------------------------------------------------------------
/.drone.yml:
--------------------------------------------------------------------------------
1 | pipeline:
2 | setup:
3 | image: combinelab/hbb_salmon_build:latest
4 | commands:
5 | - echo "Starting build"
6 | - ./.drone/build.sh
7 | test_indexing:
8 | image: combinelab/hbb_salmon_build:latest
9 | commands:
10 | - echo "[Testing quant]"
11 | - ./.drone/test_quant.sh
12 | volumes:
13 | - /mnt/scratch6/avi/data:/mnt/data
14 | - /mnt/scratch6/salmon_ci:/mnt/ci_res
15 | copy_build:
16 | image: combinelab/hbb_salmon_build:latest
17 | commands:
18 | - echo "[Packaging binary]"
19 | - ./.drone/copy_build.sh
20 | volumes:
21 | - /mnt/scratch6/avi/data:/mnt/data
22 | - /mnt/scratch6/salmon_ci:/mnt/ci_res
23 |
--------------------------------------------------------------------------------
/.drone.yml.sig:
--------------------------------------------------------------------------------
1 | eyJhbGciOiJIUzI1NiJ9.IHBpcGVsaW5lOgogIHNldHVwOgogICBpbWFnZTogaGJiOnNhbG1vbl9idWlsZAogICBjb21tYW5kczoKICAgIC0gZWNobyAiU3RhcnRpbmcgYnVpbGQiCiAgICAtIC4vLmRyb25lL2J1aWxkLnNoCiAgdGVzdF9pbmRleGluZzoKICAgaW1hZ2U6IGhiYjpzYWxtb25fYnVpbGQKICAgY29tbWFuZHM6CiAgICAtIGVjaG8gIltUZXN0aW5nIHF1YW50XSIKICAgIC0gLi8uZHJvbmUvdGVzdF9xdWFudC5zaCAKICAgdm9sdW1lczoKICAgIC0gL21udC9zY3JhdGNoNi9hdmkvZGF0YTovbW50L2RhdGEKICAgIC0gL21udC9zY3JhdGNoNi9zYWxtb25fY2k6L21udC9jaV9yZXMKICBjb3B5X2J1aWxkOgogICAgaW1hZ2U6IGhiYjpzYWxtb25fYnVpbGQKICAgIGNvbW1hbmRzOgogICAgIC0gZWNobyAiW1BhY2thZ2luZyBiaW5hcnldIgogICAgIC0gLi8uZHJvbmUvY29weV9idWlsZC5zaAogICAgdm9sdW1lczoKICAgICAtIC9tbnQvc2NyYXRjaDYvYXZpL2RhdGE6L21udC9kYXRhCiAgICAgLSAvbW50L3NjcmF0Y2g2L3NhbG1vbl9jaTovbW50L2NpX3JlcwogIG5vdGlmeV9naXR0ZXI6CiAgICBpbWFnZTogcGx1Z2lucy9naXR0ZXIKICAgIGNvbW1hbmRzOgogICAgIC0gZWNobyAiW05vdGlmeWluZyBnaXR0ZXJdIgo.kChHrx65f5Zt-QSX0Rb7idcN7cnZaQS9mmMDPBi3RPE
--------------------------------------------------------------------------------
/.drone/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | source /hbb_shlib/activate
3 |
4 | set -e
5 |
6 | export CFLAGS="-g -O2 -I/hbb_shlib/include"
7 | export CXXFLAGS="-g -O2 -I/hbb_shlib/include"
8 |
9 | CPATH=`pwd`
10 | echo "[Drone build] current path : ${CPATH}"
11 | echo "[Drone build] making build directory"
12 |
13 | mkdir build
14 | cd build
15 |
16 | echo "[Drone build] cmake configuration"
17 |
18 | cmake -DDO_QUIET_MAKE=TRUE -DBOOST_ROOT=/usr -DNO_IPO=TRUE -DCMAKE_BUILD_TYPE=RELEASE ..
19 |
20 | echo "[Drone build] making salmon and installing locally (this could take a while)"
21 |
22 | make -j8 -s install
23 |
--------------------------------------------------------------------------------
/.drone/copy_build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | source /hbb_exe/activate
3 |
4 | set -e
5 |
6 | cd scripts
7 | bash make-release.sh -v latest -n linux_x86_64
8 | cd ../RELEASES
9 | mkdir -p "/mnt/ci_res/${DRONE_REPO}/${DRONE_COMMIT_BRANCH}/build"
10 | cp *.tar.gz "/mnt/ci_res/${DRONE_REPO}/${DRONE_COMMIT_BRANCH}/build/"
11 |
--------------------------------------------------------------------------------
/.drone/test_quant.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | source /hbb_exe/activate
3 |
4 | set -e
5 |
6 | CPATH=`pwd`
7 | echo "[Drone test] current path : ${CPATH}"
8 | SD=`ls -la ${CPATH}`
9 | echo "[subdirs] : ${SD}"
10 | echo "[Drone test] making quant test directory"
11 |
12 | export PATH=/root/miniconda2/bin:$PATH
13 | export PYTHONPATH=/root/miniconda2/lib/python2.7/site-packages
14 |
15 | echo "[Drone test] run nextflow pipeline"
16 |
17 | nextflow tests/test_quant.nf
18 | # store the nextflow return value
19 | nextflowret=$?
20 | if [ $nextflowret -ne 0 ]; then
21 | echo "[Drone test]: nextflow pipeline test_quant.nf failed!"
22 | exit 1
23 | fi
24 |
25 | echo "[Drone test] echoing quants here"
26 | grep "spearman" sim/*.json
27 |
28 | mkdir -p "/mnt/ci_res/${DRONE_REPO}/${DRONE_COMMIT_BRANCH}/${DRONE_COMMIT_SHA}/sim"
29 | cp sim/*.json "/mnt/ci_res/${DRONE_REPO}/${DRONE_COMMIT_BRANCH}/${DRONE_COMMIT_SHA}/sim/"
30 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 |
5 | ---
6 |
7 | **Is the bug primarily related to salmon (bulk mode) or alevin (single-cell mode)?**
8 |
9 | **Describe the bug**
10 | A clear and concise description of what the bug is.
11 |
12 | **To Reproduce**
13 | Steps and data to reproduce the behavior:
14 |
15 | Specifically, please provide at least the following information:
16 |
17 | * Which version of salmon was used?
18 | * How was salmon installed (compiled, downloaded executable, through bioconda)?
19 | * Which reference (e.g. transcriptome) was used?
20 | * Which read files were used?
21 | * Which which program options were used?
22 |
23 |
24 | **Expected behavior**
25 | A clear and concise description of what you expected to happen.
26 |
27 | **Screenshots**
28 | If applicable, add screenshots or terminal output to help explain your problem.
29 |
30 | **Desktop (please complete the following information):**
31 | - OS: [e.g. Ubuntu Linux, OSX]
32 | - Version [ If you are on OSX, the output of `sw_vers`. If you are on linux the output of `uname -a` and `lsb_release -a`]
33 |
34 | **Additional context**
35 | Add any other context about the problem here.
36 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 |
7 | # Precompiled Headers
8 | *.gch
9 | *.pch
10 |
11 | # Compiled Dynamic libraries
12 | *.so
13 | *.dylib
14 | *.dll
15 |
16 | # Fortran module files
17 | *.mod
18 |
19 | # Compiled Static libraries
20 | *.lai
21 | *.la
22 | *.a
23 | *.lib
24 |
25 | # Executables
26 | *.exe
27 | *.out
28 | *.app
29 |
30 | # Emacs save files
31 | *~
32 |
--------------------------------------------------------------------------------
/.lgtm.yml:
--------------------------------------------------------------------------------
1 | path_classifiers:
2 | docs:
3 | # Identify the top-level file called `generate_javadoc.py` as documentation-related.
4 | - doc
5 | # The default behavior is to tag library code as `library`. Results are hidden
6 | # for library code. You can tag further files as being library code by adding them
7 | # to the `library` section. Test if we can have a list.
8 | library:
9 | - external
10 | - include/core
11 | - include/eigen3
12 | - include/jellyfish
13 | - include/nonstd
14 | - include/parallel_hashmap
15 | - include/spdlog
16 | - include/stx
17 |
18 | extraction:
19 | cpp:
20 | configure:
21 | command:
22 | - mkdir build
23 | - cd build
24 | - cmake -DFETCH_STADEN=TRUE ..
25 | index:
26 | build_command:
27 | - cd build
28 | - make
29 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | dist: trusty
2 | sudo: false
3 | git:
4 | depth: 1
5 | language: generic
6 | matrix:
7 | include:
8 | - env: CC=gcc-7 CXX=g++-7 AR=gcc-ar-7 NM=gcc-nm-7 RANLIB=gcc-ranlib-7
9 | - env: CC=gcc-5 CXX=g++-5 AR=gcc-ar-5 NM=gcc-nm-5 RANLIB=gcc-ranlib-5
10 | - language: python
11 | python: "3.6"
12 | name: Lint cmake files.
13 | install: pip3 install cmakelint
14 | script: scripts/lint.sh
15 | allow_failures:
16 | - name: Lint cmake files.
17 | fast_finish: true
18 |
19 | install:
20 | # https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
21 | - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
22 | - sudo apt-get update -qq
23 | - sudo apt-get install -qq zlib1g-dev libbz2-dev cmake
24 | - |
25 | if [[ "${CC}" =~ gcc- ]]; then
26 | echo "Installing ${CC}."
27 | sudo apt-get install -qq "${CC}"
28 | fi
29 | - |
30 | if [[ "${CXX}" =~ g\+\+- ]]; then
31 | echo "Installing ${CXX}."
32 | sudo apt-get install -qq "${CXX}"
33 | fi
34 |
35 | before_script:
36 | - wget https://cmake.org/files/v3.15/cmake-3.15.2-Linux-x86_64.sh
37 | - sudo sh cmake-3.15.2-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir
38 |
39 | script:
40 | - PATH=/usr/local/bin:$PATH
41 | - LD_LIBRARY_PATH=${TRAVIS_BUILD_DIR}/lib:$LD_LIBRARY_PATH
42 | - mkdir build
43 | - pushd build
44 | # Set make -j N considering Travis providing 2 cores.
45 | # VERBOSE=1 to show the input commands in generatd Makefile for debug.
46 | - |
47 | cmake \
48 | -DCMAKE_BUILD_TYPE=RELEASE \
49 | -DFETCH_BOOST=TRUE \
50 | -DNO_RTM=TRUE \
51 | .. && \
52 | make -j 4 VERBOSE=1 && \
53 | make install && \
54 | ./src/salmon -h
55 | - |
56 | make CTEST_OUTPUT_ON_FAILURE=1 VERBOSE=1 test
57 | - popd
58 |
59 | after_success:
60 | - ./scripts/push-binary.sh
61 |
62 | after_failure:
63 | - echo "Failure"
64 | - ls -laR $TRAVIS_BUILD_DIR/build/Testing/
65 | - cat $TRAVIS_BUILD_DIR/build/Testing/Temporary/*
66 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing code
2 |
3 | Any code that you contribute will be licensed under the GPLv3-license adopted by salmon. However, by contributing
4 | code to this project, you also extend permission for your contribution to be re-licensed under the BSD 3-clause
5 | license (under which we anticipate Salmon will be released once existing GPL code can be removed).
6 |
7 | Code contributions should be made via pull requests. Please make all PRs to the _develop_ branch
8 | of the repository. PRs made to the _master_ branch may be rejected if they cannot be cleanly rebased
9 | on _develop_. Before you make a PR, please check that:
10 |
11 | * Your PR describes the purpose of your commit. Is it fixing a bug, adding functionality, etc.?
12 | * Commit messages have been made using [*conventional commits*](https://www.conventionalcommits.org/en/v1.0.0/) — please format all of your commit messages as such.
13 | * Any non-obvious code is documented (we don't yet have formal documentation guidelines yet, so use common sense)
14 |
--------------------------------------------------------------------------------
/cmake/Modules/FindJellyfish.cmake:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Find Jellyfish
3 | #
4 | # This sets the following variables:
5 | # JELLYFISH_FOUND - True if Jellyfish was found.
6 | # JELLYFISH_INCLUDE_DIRS - Directories containing the Jellyfish include files.
7 | # JELLYFISH_DEFINITIONS - Compiler flags for Jellyfish.
8 |
9 | find_path(JELLYFISH_INCLUDE_DIR jellyfish
10 | HINTS "${JELLYFISH_ROOT}/include" "$ENV{JELLYFISH_ROOT}/include" "/usr/include" "$ENV{PROGRAMFILES}/jellyfish/include")
11 |
12 | set(JELLYFISH_INCLUDE_DIRS ${JELLYFISH_INCLUDE_DIR})
13 |
14 | include(FindPackageHandleStandardArgs)
15 | #message("Required Jellyfish version ${Jellyfish_FIND_VERSION}")
16 | find_package_handle_standard_args(Jellyfish
17 | DEFAULT_MSG
18 | FOUND_VAR JELLYFISH_FOUND
19 | REQUIRED_VARS JELLYFISH_INCLUDE_DIR
20 | VERSION_VAR Jellyfish_FOUND_VERSION)
21 |
22 | mark_as_advanced(JELLYFISH_INCLUDE_DIR)
23 |
24 | if(JELLYFISH_FOUND)
25 | message(STATUS "Jellyfish found (include: ${JELLYFISH_INCLUDE_DIRS})")
26 | endif(JELLYFISH_FOUND)
27 |
--------------------------------------------------------------------------------
/cmake/Modules/FindJemalloc.cmake:
--------------------------------------------------------------------------------
1 | # From: https://raw.githubusercontent.com/STEllAR-GROUP/hpx/master/cmake/FindJemalloc.cmake
2 | # Copyright (c) 2014 Thomas Heller
3 | # Copyright (c) 2007-2012 Hartmut Kaiser
4 | # Copyright (c) 2010-2011 Matt Anderson
5 | # Copyright (c) 2011 Bryce Lelbach
6 | #
7 | # Distributed under the Boost Software License, Version 1.0. (See accompanying
8 | # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 |
10 | find_package(PkgConfig)
11 | pkg_check_modules(PC_JEMALLOC QUIET libjemalloc)
12 |
13 | find_path(JEMALLOC_INCLUDE_DIR jemalloc/jemalloc.h
14 | HINTS
15 | ${JEMALLOC_ROOT} ENV JEMALLOC_ROOT
16 | ${PC_JEMALLOC_MINIMAL_INCLUDEDIR}
17 | ${PC_JEMALLOC_MINIMAL_INCLUDE_DIRS}
18 | ${PC_JEMALLOC_INCLUDEDIR}
19 | ${PC_JEMALLOC_INCLUDE_DIRS}
20 | PATH_SUFFIXES include)
21 |
22 | find_library(JEMALLOC_LIBRARY NAMES jemalloc libjemalloc
23 | HINTS
24 | ${JEMALLOC_ROOT} ENV JEMALLOC_ROOT
25 | ${PC_JEMALLOC_MINIMAL_LIBDIR}
26 | ${PC_JEMALLOC_MINIMAL_LIBRARY_DIRS}
27 | ${PC_JEMALLOC_LIBDIR}
28 | ${PC_JEMALLOC_LIBRARY_DIRS}
29 | PATH_SUFFIXES lib lib64)
30 |
31 | if(JEMALLOC_INCLUDE_DIR)
32 | set(_version_regex "^#define[ \t]+JEMALLOC_VERSION[ \t]+\"([^\"]+)\".*")
33 | file(STRINGS "${JEMALLOC_INCLUDE_DIR}/jemalloc/jemalloc.h"
34 | JEMALLOC_VERSION REGEX "${_version_regex}")
35 | string(REGEX REPLACE "${_version_regex}" "\\1"
36 | JEMALLOC_VERSION "${JEMALLOC_VERSION}")
37 | unset(_version_regex)
38 | endif()
39 |
40 | include(FindPackageHandleStandardArgs)
41 | # handle the QUIETLY and REQUIRED arguments and set JEMALLOC_FOUND to TRUE
42 | # if all listed variables are TRUE and the requested version matches.
43 | find_package_handle_standard_args(Jemalloc REQUIRED_VARS
44 | JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR
45 | VERSION_VAR JEMALLOC_VERSION)
46 |
47 |
48 | if(JEMALLOC_FOUND)
49 | set(JEMALLOC_LIBRARIES ${JEMALLOC_LIBRARY})
50 | set(JEMALLOC_INCLUDE_DIRS ${JEMALLOC_INCLUDE_DIR})
51 | endif()
52 |
53 | mark_as_advanced(JEMALLOC_INCLUDE_DIR JEMALLOC_LIBRARY)
54 |
--------------------------------------------------------------------------------
/cmake/Modules/FindTcmalloc.cmake:
--------------------------------------------------------------------------------
1 | # - Find Tcmalloc
2 | # Find the native Tcmalloc includes and library
3 | #
4 | # Tcmalloc_INCLUDE_DIR - where to find Tcmalloc.h, etc.
5 | # Tcmalloc_LIBRARIES - List of libraries when using Tcmalloc.
6 | # Tcmalloc_FOUND - True if Tcmalloc found.
7 |
8 | find_path(Tcmalloc_INCLUDE_DIR google/tcmalloc.h NO_DEFAULT_PATH PATHS
9 | ${HT_DEPENDENCY_INCLUDE_DIR}
10 | /usr/include
11 | /opt/local/include
12 | /usr/local/include
13 | )
14 |
15 | if (USE_TCMALLOC)
16 | set(Tcmalloc_NAMES tcmalloc)
17 | else ()
18 | set(Tcmalloc_NAMES tcmalloc_minimal tcmalloc)
19 | endif ()
20 |
21 | find_library(Tcmalloc_LIBRARY NO_DEFAULT_PATH
22 | NAMES ${Tcmalloc_NAMES}
23 | PATHS ${HT_DEPENDENCY_LIB_DIR} /lib /usr/lib /usr/local/lib /opt/local/lib
24 | )
25 |
26 | if (Tcmalloc_INCLUDE_DIR AND Tcmalloc_LIBRARY)
27 | set(Tcmalloc_FOUND TRUE)
28 | set( Tcmalloc_LIBRARIES ${Tcmalloc_LIBRARY} )
29 | else ()
30 | set(Tcmalloc_FOUND FALSE)
31 | set( Tcmalloc_LIBRARIES )
32 | endif ()
33 |
34 | if (Tcmalloc_FOUND)
35 | message(STATUS "Found Tcmalloc: ${Tcmalloc_LIBRARY}")
36 | else ()
37 | message(STATUS "Not Found Tcmalloc: ${Tcmalloc_LIBRARY}")
38 | if (Tcmalloc_FIND_REQUIRED)
39 | message(STATUS "Looked for Tcmalloc libraries named ${Tcmalloc_NAMES}.")
40 | message(FATAL_ERROR "Could NOT find Tcmalloc library")
41 | endif ()
42 | endif ()
43 |
44 | mark_as_advanced(
45 | Tcmalloc_LIBRARY
46 | Tcmalloc_INCLUDE_DIR
47 | )
48 |
--------------------------------------------------------------------------------
/cmake/Modules/Findcereal.cmake:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Find Cereal
3 | #
4 | # This sets the following variables:
5 | # CEREAL_FOUND - True if Cereal was found.
6 | # CEREAL_INCLUDE_DIRS - Directories containing the Cereal include files.
7 | # CEREAL_DEFINITIONS - Compiler flags for Cereal.
8 |
9 | find_path(CEREAL_INCLUDE_DIR cereal
10 | HINTS "${CEREAL_ROOT}/include" "$ENV{CEREAL_ROOT}/include" "/usr/include" "$ENV{PROGRAMFILES}/cereal/include")
11 |
12 | set(CEREAL_INCLUDE_DIRS ${CEREAL_INCLUDE_DIR})
13 |
14 | if(CEREAL_INCLUDE_DIR)
15 | set(CEREAL_FOUND YES)
16 | set(CEREAL_VERSION_MAJOR 0)
17 | set(CEREAL_VERSION_MINOR 0)
18 | set(CEREAL_VERSION_PATCH 0)
19 | if(EXISTS "${CEREAL_INCLUDE_DIR}/cereal/version.hpp")
20 | # Read and parse cereal version header file for version number
21 | file(READ "${CEREAL_INCLUDE_DIR}/cereal/version.hpp"
22 | _CEREAL_HEADER_CONTENTS)
23 | string(REGEX REPLACE ".*#define CEREAL_VERSION_MAJOR ([0-9]+).*" "\\1"
24 | CEREAL_VERSION_MAJOR "${_CEREAL_HEADER_CONTENTS}")
25 | string(REGEX REPLACE ".*#define CEREAL_VERSION_MINOR ([0-9]+).*" "\\1"
26 | CEREAL_VERSION_MINOR "${_CEREAL_HEADER_CONTENTS}")
27 | string(REGEX REPLACE ".*#define CEREAL_VERSION_PATCH ([0-9]+).*" "\\1"
28 | CEREAL_VERSION_PATCH "${_CEREAL_HEADER_CONTENTS}")
29 | set(CEREAL_VERSION_STRING "${CEREAL_VERSION_MAJOR}.${CEREAL_VERSION_MINOR}.${CEREAL_VERSION_PATCH}")
30 | else()
31 | set(CEREAL_FOUND NO)
32 | endif()
33 | endif()
34 |
35 | include(FindPackageHandleStandardArgs)
36 | find_package_handle_standard_args(cereal
37 | REQUIRED_VARS CEREAL_INCLUDE_DIR
38 | VERSION_VAR CEREAL_VERSION_STRING)
39 |
40 | mark_as_advanced(CEREAL_INCLUDE_DIR)
41 |
42 | if(CEREAL_FOUND)
43 | message(STATUS "cereal found (include: ${CEREAL_INCLUDE_DIRS})")
44 | endif(CEREAL_FOUND)
45 |
--------------------------------------------------------------------------------
/cmake/Modules/Findlibdivsufsort.cmake:
--------------------------------------------------------------------------------
1 |
2 | find_path(SUFFARRAY_INCLUDE_DIR divsufsort64.h
3 | HINTS ${SUFFARRAY_ROOT} ENV SUFFARRAY_ROOT
4 | PATH_SUFFIXES include)
5 |
6 | find_library(SUFFARRAY_LIBRARY NAMES divsufsort divsufsort64 libdivsufsort libdivsufsort64
7 | HINTS ${SUFFARRAY_ROOT} ENV SUFFARRAY_ROOT PATH_SUFFIXES lib lib64)
8 |
9 | find_library(SUFFARRAY_LIBRARY64 NAMES divsufsort64 libdivsufsort64
10 | HINTS ${SUFFARRAY_ROOT} ENV SUFFARRAY_ROOT PATH_SUFFIXES lib lib64)
11 |
12 | include(FindPackageHandleStandardArgs)
13 | find_package_handle_standard_args(libdivsufsort DEFAULT_MSG
14 | SUFFARRAY_LIBRARY
15 | SUFFARRAY_LIBRARY64
16 | SUFFARRAY_INCLUDE_DIR)
17 |
18 | mark_as_advanced(SUFFARRAY_INCLUDE_DIR SUFFARRAY_LIBRARY)
19 |
--------------------------------------------------------------------------------
/cmake/Modules/Findlibgff.cmake:
--------------------------------------------------------------------------------
1 |
2 | find_path(GFF_INCLUDE_DIR gff.h
3 | HINTS ${GFF_ROOT} ENV GFF_ROOT
4 | PATH_SUFFIXES include)
5 |
6 | find_library(GFF_LIBRARY NAMES gff libgff
7 | HINTS ${GFF_ROOT} ENV GFF_ROOT PATH_SUFFIXES lib lib64)
8 |
9 | include(FindPackageHandleStandardArgs)
10 | find_package_handle_standard_args(libgff DEFAULT_MSG
11 | GFF_INCLUDE_DIR GFF_LIBRARY)
12 |
13 | mark_as_advanced(GFF_INCLUDE_DIR GFF_LIBRARY)
14 |
--------------------------------------------------------------------------------
/cmake/Modules/Findlibstadenio.cmake:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Find Staden IOLib
3 | #
4 | # This sets the following variables:
5 | # STADEN_FOUND - True if Staden IOLib was found.
6 | # STADEN_INCLUDE_DIR - Header files.
7 | # STADEN_LIBRARIES - Staden IOLib library.
8 |
9 | find_path(STADEN_INCLUDE_DIR io_lib
10 | HINTS ${STADEN_ROOT} ENV STADEN_ROOT
11 | PATH_SUFFIXES include)
12 |
13 | find_library(STADEN_LIBRARY NAMES staden-read libstaden-read
14 | HINTS ${STADEN_ROOT} ENV STADEN_ROOT PATH_SUFFIXES lib lib64)
15 |
16 | find_library(HTSCODEC_LIBRARY NAMES htscodecs libhtscodecs
17 | HINTS ${STADEN_ROOT} ENV STADEN_ROOT PATH_SUFFIXES lib lib64)
18 |
19 | if(STADEN_INCLUDE_DIR)
20 | set(_version_regex "^#define[ \t]+PACKAGE_VERSION[ \t]+\"([^\"]+)\".*")
21 | file(STRINGS "${STADEN_INCLUDE_DIR}/io_lib/io_lib_config.h"
22 | STADEN_VERSION REGEX "${_version_regex}")
23 | string(REGEX REPLACE "${_version_regex}" "\\1"
24 | STADEN_VERSION "${STADEN_VERSION}")
25 | unset(_version_regex)
26 | endif()
27 |
28 | include(FindPackageHandleStandardArgs)
29 | find_package_handle_standard_args(libstadenio DEFAULT_MSG
30 | STADEN_LIBRARY
31 | STADEN_INCLUDE_DIR
32 | STADEN_VERSION)
33 |
34 | if (LIBSTADENIO_FOUND)
35 | message(STATUS "Staden IOLib found (include: ${STADEN_INCLUDE_DIR})")
36 | set(STADEN_LIBRARIES "${STADEN_LIBRARY};${HTSCODEC_LIBRARY}")
37 | endif()
38 |
39 | mark_as_advanced(STADEN_INCLUDE_DIR STADEN_LIBRARY)
40 |
--------------------------------------------------------------------------------
/cmake/PostInstall.cmake:
--------------------------------------------------------------------------------
1 | ##
2 | # Print some post install messages for the user
3 | ##
4 | message("\n\n")
5 | message("Installation complete. Please ensure the following paths are set properly.")
6 | message("==========================================================================")
7 | #if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
8 | # message("Fixing library names with install_name_tool")
9 | # execute_process(COMMAND install_name_tool -add_rpath ${CMAKE_INSTALL_PREFIX}/bin ${CMAKE_INSTALL_PREFIX}/bin/salmon)
10 | # execute_process(COMMAND install_name_tool -add_rpath ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/bin/salmon)
11 | # execute_process(COMMAND install_name_tool -add_rpath @executable_path ${CMAKE_INSTALL_PREFIX}/bin/salmon)
12 | #endif()
13 | message("Please add ${CMAKE_INSTALL_PREFIX}/bin to your PATH")
14 | if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
15 | message("Please add ${CMAKE_INSTALL_PREFIX}/lib to your DYLD_FALLBACK_LIBRARY_PATH")
16 | else()
17 | message("Please add ${CMAKE_INSTALL_PREFIX}/lib to your LD_LIBRARY_PATH")
18 | endif()
19 | message("==========================================================================")
20 |
--------------------------------------------------------------------------------
/cmake/SimpleTest.cmake:
--------------------------------------------------------------------------------
1 | execute_process(COMMAND tar xzvf sample_data.tgz
2 | WORKING_DIRECTORY ${TOPLEVEL_DIR}
3 | RESULT_VARIABLE TAR_RESULT
4 | )
5 |
6 | if (TAR_RESULT)
7 | message(FATAL_ERROR "Error untarring sample_data.tgz")
8 | endif()
9 |
10 | set(INDEX_CMD ${TOPLEVEL_DIR}/build/src/sailfish --no-version-check index -t transcripts.fasta -k 20 -o sample_index --force)
11 | execute_process(COMMAND ${INDEX_CMD}
12 | WORKING_DIRECTORY ${TOPLEVEL_DIR}/sample_data
13 | RESULT_VARIABLE INDEX_RESULT
14 | )
15 |
16 | if (INDEX_RESULT)
17 | message(FATAL_ERROR "Error running ${INDEX_COMMAND}")
18 | endif()
19 |
20 | set(QUANT_COMMAND ${TOPLEVEL_DIR}/build/src/sailfish --no-version-check quant -i sample_index --noBiasCorrect -l IU -1 reads_1.fastq -2 reads_2.fastq -o sample_quant)
21 | execute_process(COMMAND ${QUANT_COMMAND}
22 | WORKING_DIRECTORY ${TOPLEVEL_DIR}/sample_data
23 | RESULT_VARIABLE QUANT_RESULT
24 | )
25 | if (QUANT_RESULT)
26 | message(FATAL_ERROR "Error running ${QUANT_RESULT}")
27 | endif()
28 |
29 | if (EXISTS ${TOPLEVEL_DIR}/sample_data/sample_quant/quant.sf)
30 | message("Sailfish ran successfully")
31 | else()
32 | message(FATAL_ERROR "Sailfish failed to produce output")
33 | endif()
34 |
35 |
36 |
--------------------------------------------------------------------------------
/cmake/TestSalmonFMD.cmake:
--------------------------------------------------------------------------------
1 | execute_process(COMMAND tar xzvf sample_data.tgz
2 | WORKING_DIRECTORY ${TOPLEVEL_DIR}
3 | RESULT_VARIABLE TAR_RESULT
4 | )
5 |
6 | if (TAR_RESULT)
7 | message(FATAL_ERROR "Error untarring sample_data.tgz")
8 | endif()
9 |
10 | set(SALMON_FMD_INDEX_CMD ${CMAKE_BINARY_DIR}/salmon index -t transcripts.fasta -i sample_salmon_fmd_index --type fmd)
11 | execute_process(COMMAND ${SALMON_FMD_INDEX_CMD}
12 | WORKING_DIRECTORY ${TOPLEVEL_DIR}/sample_data
13 | RESULT_VARIABLE SALMON_FMD_INDEX_RESULT
14 | )
15 |
16 | if (SALMON_FMD_INDEX_RESULT)
17 | message(FATAL_ERROR "Error running ${SALMON_FMD_INDEX_COMMAND}")
18 | endif()
19 |
20 | set(SALMON_QUANT_COMMAND ${CMAKE_BINARY_DIR}/salmon quant -i sample_salmon_fmd_index -l IU -1 reads_1.fastq -2 reads_2.fastq -o sample_salmon_fmd_quant)
21 | execute_process(COMMAND ${SALMON_QUANT_COMMAND}
22 | WORKING_DIRECTORY ${TOPLEVEL_DIR}/sample_data
23 | RESULT_VARIABLE SALMON_FMD_QUANT_RESULT
24 | )
25 | if (SALMON_FMD_QUANT_RESULT)
26 | message(FATAL_ERROR "Error running ${SALMON_FMD_QUANT_RESULT}")
27 | endif()
28 |
29 | if (EXISTS ${TOPLEVEL_DIR}/sample_data/sample_salmon_fmd_quant/quant.sf)
30 | message("Salmon (read) ran successfully")
31 | else()
32 | message(FATAL_ERROR "Salmon (read --- fmd-index) failed to produce output")
33 | endif()
34 |
--------------------------------------------------------------------------------
/cmake/TestSalmonQuasi.cmake:
--------------------------------------------------------------------------------
1 | execute_process(COMMAND tar xzvf sample_data.tgz
2 | WORKING_DIRECTORY ${TOPLEVEL_DIR}
3 | RESULT_VARIABLE TAR_RESULT
4 | )
5 |
6 | if (TAR_RESULT)
7 | message(FATAL_ERROR "Error untarring sample_data.tgz")
8 | endif()
9 |
10 | set(SALMON_QUASI_INDEX_CMD ${CMAKE_BINARY_DIR}/salmon index -t transcripts.fasta -i sample_salmon_quasi_index)
11 | execute_process(COMMAND ${SALMON_QUASI_INDEX_CMD}
12 | WORKING_DIRECTORY ${TOPLEVEL_DIR}/sample_data
13 | RESULT_VARIABLE SALMON_QUASI_INDEX_RESULT
14 | )
15 |
16 | if (SALMON_QUASI_INDEX_RESULT)
17 | message(FATAL_ERROR
18 | "While running: ${SALMON_QUASI_INDEX_CMD}\n"
19 | "error: ${SALMON_QUASI_INDEX_RESULT}"
20 | )
21 | endif()
22 |
23 | set(SALMON_QUANT_COMMAND ${CMAKE_BINARY_DIR}/salmon quant -i sample_salmon_quasi_index -l IU -1 reads_1.fastq -2 reads_2.fastq -o sample_salmon_quasi_quant)
24 | execute_process(COMMAND ${SALMON_QUANT_COMMAND}
25 | WORKING_DIRECTORY ${TOPLEVEL_DIR}/sample_data
26 | RESULT_VARIABLE SALMON_QUASI_QUANT_RESULT
27 | )
28 | if (SALMON_QUASI_QUANT_RESULT)
29 | message(FATAL_ERROR
30 | "While running: ${SALMON_QUANT_COMMAND}\n"
31 | "error: ${SALMON_QUASI_QUANT_RESULT}"
32 | )
33 | endif()
34 |
35 | if (EXISTS ${TOPLEVEL_DIR}/sample_data/sample_salmon_quasi_quant/quant.sf)
36 | message("Salmon (read) ran successfully")
37 | else()
38 | message(FATAL_ERROR "Salmon (read --- quasi-index) failed to produce output")
39 | endif()
40 |
--------------------------------------------------------------------------------
/cmake/UnitTests.cmake:
--------------------------------------------------------------------------------
1 | set(TEST_COMMAND ./unitTests)
2 | message(STATUS "For unit tests, will set working directory to ${TOPLEVEL_DIR}/tests")
3 | execute_process(COMMAND ${TEST_COMMAND}
4 | WORKING_DIRECTORY ${TOPLEVEL_DIR}/tests
5 | RESULT_VARIABLE UNIT_TEST_RESULT
6 | )
7 | if (UNIT_TEST_RESULT)
8 | message(FATAL_ERROR "Error running ${UNIT_TEST_RESULT}")
9 | endif()
10 |
11 |
12 |
--------------------------------------------------------------------------------
/current_version.txt:
--------------------------------------------------------------------------------
1 | VERSION_MAJOR 1
2 | VERSION_MINOR 10
3 | VERSION_PATCH 3
4 |
--------------------------------------------------------------------------------
/doc/FileFormats.md:
--------------------------------------------------------------------------------
1 | Transcript Index Format
2 | =======================
3 |
4 | The sorted list (array) is the structure used by our program
5 | to count the k-mers from the reads and it relies on a transcript
6 | index. The index is (currently) simply a sorted array containing
7 | all of the kmers, in encoded (uint64_t) numeric order, that were
8 | seen in the trancsripts. The file format is as follows
9 |
10 | ````
11 | kmer_len[uint32_t]
12 | num_kmers[uint32_t]
13 | k_1[uint_64t] . . . k_{num_kmers}[uint64_t]
14 | ````
--------------------------------------------------------------------------------
/doc/license-header.txt:
--------------------------------------------------------------------------------
1 | /**
2 | >HEADER
3 | Copyright (c) 2013/2014 Rob Patro robp@cs.cmu.edu
4 |
5 | This file is part of the Sailfish suite.
6 |
7 | Sailfish is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | Sailfish is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Sailfish. If not, see .
19 | .
15 |
16 |
17 |
--------------------------------------------------------------------------------
/doc/steps_to_prepare_release.md:
--------------------------------------------------------------------------------
1 | # Steps to prepare a release of salmon
2 | -----
3 |
4 | 1. Tag corresponding commit of pufferfish so that it can be stably pulled in for source builds.
5 | 2. Alter `fetchPufferfish.sh` to fetch the corresponding tagged version (and update the sha256 sum).
6 | 3. Bump salmon version in `include/SalmonConfig.hpp`, then rebuild and run the `bump_version.sh` script.
7 | 4. Ensure that everything builds cleanly on Linux (taken care of by CI) and OSX.
8 | 5. Merge the develop branch changes into master.
9 | 6. Tag the salmon release with a new version number.
10 | 7. Update the docker tag and build an image for docker hub.
11 | 8. Bump the Bioconda version and build a new Bioconda release.
12 | 9. Add release notes for the tagged master version.
13 | 10. Upload the pre-compiled linux binary (from the CI server) to GitHub.
14 | 11. Place a new version file on the website and update the old one.
15 | 12. (not technically part of release) Reset the relevant changes (steps 1,2) on the develop branch so they now point to a non-tagged pufferfish.
16 |
--------------------------------------------------------------------------------
/docker/build_test.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | SALMON_VERSION=1.10.3
3 | TMPDIR=/mnt/scratch7/DELETE_ME_TEMP docker build --no-cache -t combinelab/salmon:${SALMON_VERSION} -t combinelab/salmon:latest .
4 |
--------------------------------------------------------------------------------
/include/AlevinHash.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __ALEVIN_HASH_HPP__
2 | #define __ALEVIN_HASH_HPP__
3 |
4 | #include
5 | #include
6 |
7 | #include "spdlog/spdlog.h"
8 |
9 | #include "AlevinOpts.hpp"
10 | #include "AlevinUtils.hpp"
11 | #include "SingleCellProtocols.hpp"
12 | #include "GZipWriter.hpp"
13 | #include "TranscriptGroup.hpp"
14 | #include "CollapsedCellOptimizer.hpp"
15 | #include "BarcodeGroup.hpp"
16 | #include "SalmonIndex.hpp"
17 |
18 | namespace apt = alevin::protocols;
19 | namespace bfs = boost::filesystem;
20 |
21 | template
22 | void alevinOptimize( std::vector& trueBarcodesVec,
23 | spp::sparse_hash_map& txpToGeneMap,
24 | spp::sparse_hash_map& geneIdxMap,
25 | EqMapT& fullEqMap,
26 | AlevinOpts& aopt,
27 | GZipWriter& gzw,
28 | CFreqMapT& freqCounter,
29 | size_t numLowConfidentBarcode);
30 |
31 | template
32 | int salmonHashQuantify(AlevinOpts& aopt,
33 | bfs::path& outputDirectory,
34 | CFreqMapT& freqCounter);
35 | #endif // __ALEVIN_HASH_HPP__
36 |
--------------------------------------------------------------------------------
/include/AlevinTypes.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __ALEVIN_TYPES_HPP__
2 | #define __ALEVIN_TYPES_HPP__
3 |
4 | #include "pufferfish/Kmer.hpp"
5 |
6 | namespace alevin {
7 | namespace types {
8 |
9 | using AlevinUMIKmer = combinelib::kmers::Kmer<32,2>;
10 | // Can only hold the barcode if it's <= 32 nucleotides
11 | using AlevinCellBarcodeKmer = combinelib::kmers::Kmer<32,5>;
12 |
13 | }
14 | }
15 |
16 | #endif//__ALEVIN_TYPES_HPP__
17 |
18 |
--------------------------------------------------------------------------------
/include/BAMUtils.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __SALMON_BAM_UTILS__
2 | #define __SALMON_BAM_UTILS__
3 |
4 | extern "C" {
5 | #include "io_lib/os.h"
6 | #include "io_lib/scram.h"
7 | #undef max
8 | #undef min
9 | }
10 |
11 | #include
12 | #include
13 |
14 | namespace salmon {
15 | namespace bam_utils {
16 |
17 | enum class AlignerDetails : uint8_t
18 | {
19 | BOWTIE2=1, // a standard bowtie 2 configuration
20 | BOWTIE2_LOCAL, // using --local flag
21 | STAR, // STAR aligner
22 | BWA_MEM, // BWA-MEM aligner
23 | MINIMAP2, // minimap2 aligner
24 | RAPMAP, // rapmap aligner/mapper
25 | PUFFERFISH, // pufferfish / puffalign aligner
26 | UNKNOWN
27 | };
28 |
29 | std::string to_string(AlignerDetails a);
30 | AlignerDetails inferAlignerFromHeader(SAM_hdr* header);
31 | }
32 | }
33 |
34 | #endif // __SALMON_BAM_UTILS__
35 |
--------------------------------------------------------------------------------
/include/BarcodeGroup.hpp:
--------------------------------------------------------------------------------
1 | #ifndef BARCODE_GROUP_HPP
2 | #define BARCODE_GROUP_HPP
3 |
4 | #include
5 | #include "xxhash.h"
6 | #include "metro/metrohash.h"
7 | #include "tsl/array_map.h"
8 |
9 | struct BarcodeGroupStringHasher {
10 | std::size_t operator()(const std::string& k) const {
11 | char* pt = const_cast(k.data());
12 | return XXH64(static_cast(pt), k.size() * sizeof(char), 0);
13 | }
14 | };
15 |
16 | struct BarcodeGroupStringHasherMetro {
17 | std::size_t operator()(const char* key, std::size_t key_size) const {
18 | std::size_t r;
19 | MetroHash64::Hash(reinterpret_cast(key), key_size, reinterpret_cast(&r), 0);
20 | return r;
21 | }
22 | };
23 |
24 | //using CFreqMapT = libcuckoo::cuckoohash_map;
25 | using CFreqMapT = tsl::array_map;
26 |
27 | using MapT = std::vector>;
28 | using TrueBcsT = std::unordered_set;
29 | using TrueMapT = std::unordered_map;
30 | using SoftMapT = std::unordered_map;
31 |
32 | #endif // BARCODE_GROUP_HPP
33 |
--------------------------------------------------------------------------------
/include/BiasParams.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __BIAS_PARAMS__
2 | #define __BIAS_PARAMS__
3 |
4 | #include "DistributionUtils.hpp"
5 | #include "GCFragModel.hpp"
6 | #include "ReadKmerDist.hpp"
7 | #include "SBModel.hpp"
8 | #include "SalmonMath.hpp"
9 | #include "SimplePosBias.hpp"
10 | #include
11 |
12 | struct BiasParams {
13 | double massFwd{salmon::math::LOG_0};
14 | double massRC{salmon::math::LOG_0};
15 |
16 | /**
17 | * Positional bias
18 | **/
19 | std::vector posBiasFW;
20 | std::vector posBiasRC;
21 |
22 | /**
23 | * fragment-GC bias counts
24 | **/
25 | // std::vector observedGCMass = std::vector(101,
26 | // salmon::math::LOG_0);
27 | GCFragModel observedGCMass;
28 |
29 | ReadKmerDist<8, uint32_t> seqBiasFW;
30 | ReadKmerDist<8, uint32_t> seqBiasRC;
31 |
32 | /**
33 | * Sequence-specific bias models
34 | **/
35 | SBModel seqBiasModelFW;
36 | SBModel seqBiasModelRC;
37 |
38 | BiasParams(size_t numCondBins = 3, size_t numGCBins = 101,
39 | bool seqBiasPseudocount = false)
40 | : seqBiasFW(seqBiasPseudocount), seqBiasRC(seqBiasPseudocount),
41 | posBiasFW(5), posBiasRC(5), observedGCMass(numCondBins, numGCBins) {}
42 | };
43 |
44 | #endif //__GC_BIAS_PARAMS__
45 |
--------------------------------------------------------------------------------
/include/BootstrapWriter.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __BOOTSTRAP_WRITER_HPP__
2 | #define __BOOTSTRAP_WRITER_HPP__
3 |
4 | #include
5 | #include
6 |
7 | class BootstrapWriter {
8 | public:
9 | virtual ~BootstrapWriter() {}
10 | virtual bool writeHeader(std::string& comments,
11 | std::vector& transcripts) = 0;
12 | virtual bool writeBootstrap(std::vector& abund) = 0;
13 | };
14 |
15 | #endif // __BOOTSTRAP_WRITER_HPP__
16 |
--------------------------------------------------------------------------------
/include/CollapsedEMOptimizer.hpp:
--------------------------------------------------------------------------------
1 | #ifndef COLLAPSED_EM_OPTIMIZER_HPP
2 | #define COLLAPSED_EM_OPTIMIZER_HPP
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | #include "ReadExperiment.hpp"
9 | #include "SalmonOpts.hpp"
10 |
11 | #include "Eigen/Dense"
12 | #include "cuckoohash_map.hh"
13 |
14 | class BootstrapWriter;
15 |
16 | class CollapsedEMOptimizer {
17 | public:
18 | using VecType = std::vector>;
19 | using SerialVecType = std::vector;
20 | CollapsedEMOptimizer();
21 |
22 | template
23 | bool optimize(
24 | ExpT& readExp, SalmonOpts& sopt,
25 | double tolerance =
26 | 0.01, // A EM termination criteria, adopted from Bray et al. 2016
27 | uint32_t maxIter =
28 | 1000); // A EM termination criteria, adopted from Bray et al. 2016
29 |
30 | template
31 | bool gatherBootstraps(
32 | ExpT& readExp, SalmonOpts& sopt,
33 | std::function&)>& writeBootstrap,
34 | double relDiffTolerance, uint32_t maxIter);
35 | };
36 |
37 | #endif // COLLAPSED_EM_OPTIMIZER_HPP
38 |
--------------------------------------------------------------------------------
/include/CollapsedGibbsSampler.hpp:
--------------------------------------------------------------------------------
1 | #ifndef COLLAPSED_GIBBS_SAMPLER_HPP
2 | #define COLLAPSED_GIBBS_SAMPLER_HPP
3 |
4 | #include
5 | #include
6 | #include "SalmonOpts.hpp"
7 |
8 | #include "Eigen/Dense"
9 | #include "cuckoohash_map.hh"
10 |
11 | class BootstrapWriter;
12 |
13 | class CollapsedGibbsSampler {
14 | public:
15 | using VecType = std::vector;
16 | CollapsedGibbsSampler();
17 |
18 | template
19 | bool sample(ExpT& readExp, SalmonOpts& sopt,
20 | std::function&)>& writeBootstrap,
21 | uint32_t numSamples = 500);
22 |
23 | /*
24 | template
25 | bool sampleMultipleChains(ExpT& readExp,
26 | SalmonOpts& sopt,
27 | std::function&)>& writeBootstrap,
28 | uint32_t numSamples = 500);
29 | */
30 | };
31 |
32 | #endif // COLLAPSED_EM_OPTIMIZER_HPP
33 |
--------------------------------------------------------------------------------
/include/CommonTypes.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | >HEADER
3 | Copyright (c) 2013 Rob Patro robp@cs.cmu.edu
4 |
5 | This file is part of Sailfish.
6 |
7 | Sailfish is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | Sailfish is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Sailfish. If not, see .
19 |
26 | #include
27 |
28 | namespace Sailfish {
29 | /*
30 | struct Kmer {
31 | uint64_t kmer;
32 | };
33 |
34 | struct Index {
35 | uint64_t index;
36 | };
37 | */
38 | struct TranscriptFeatures {
39 | std::string name;
40 | size_t length;
41 | double gcContent;
42 | std::array diNucleotides;
43 | };
44 | } // namespace Sailfish
45 |
46 | #endif // COMMON_TYPES_HPP
47 |
--------------------------------------------------------------------------------
/include/DedupUMI.hpp:
--------------------------------------------------------------------------------
1 | #ifndef DEDUP_UMI_HPP
2 | #define DEDUP_UMI_HPP
3 |
4 | #include "Graph.hpp"
5 | #include "GZipWriter.hpp"
6 | #include "AlevinUtils.hpp"
7 |
8 | struct SalmonEqClass {
9 | std::vector labels;
10 | uint32_t count;
11 | };
12 |
13 | using UGroupT = spp::sparse_hash_map;
14 | using TGroupT = std::vector;
15 |
16 | // takem from https://stackoverflow.com/questions/896155/tr1unordered-set-union-and-intersection/896440
17 | template
18 | OutIt unordered_set_intersection(InIt1 b1, InIt1 e1, InIt2 b2, InIt2 e2, OutIt out) {
19 | while (!(b1 == e1)) {
20 | if (!(std::find(b2, e2, *b1) == e2)) {
21 | *out = *b1;
22 | ++out;
23 | }
24 |
25 | ++b1;
26 | }
27 |
28 | return out;
29 | }
30 |
31 | bool dedupClasses(std::vector& geneAlphas,
32 | double& totalUMICount,
33 | std::vector& txpGroups,
34 | std::vector& umiGroups,
35 | std::vector& salmonEqclasses,
36 | uint32_t umiLength,
37 | spp::sparse_hash_map& txpToGeneMap,
38 | std::vector& tiers,
39 | GZipWriter& gzw, uint32_t umiEditDistance,
40 | bool dumpUmiGraph, std::string& trueBarcodeStr,
41 | std::vector>& arboEqClassCount,
42 | bool dumpArborescences,
43 | std::atomic& totalUniEdgesCounts,
44 | std::atomic& totalBiEdgesCounts);
45 |
46 | #endif // DEDUP_UMI_HPP
47 |
--------------------------------------------------------------------------------
/include/EMUtils.hpp:
--------------------------------------------------------------------------------
1 | #ifndef EM_UTILS_HPP
2 | #define EM_UTILS_HPP
3 |
4 | #include
5 | #include
6 | #include "Transcript.hpp"
7 |
8 | template
9 | void EMUpdate_(std::vector>& txpGroupLabels,
10 | std::vector>& txpGroupCombinedWeights,
11 | const std::vector& txpGroupCounts,
12 | const VecT& alphaIn,
13 | VecT& alphaOut);
14 |
15 | /**
16 | * set entries with values <= cutoff to 0.
17 | **/
18 | template
19 | double truncateCountVector(VecT& alphas, double cutoff);
20 |
21 | #endif // EM_UTILS_HPP
22 |
--------------------------------------------------------------------------------
/include/EffectiveLengthStats.hpp:
--------------------------------------------------------------------------------
1 | #ifndef EFFECTIVE_LENGTH_STATS_HPP
2 | #define EFFECTIVE_LENGTH_STATS_HPP
3 |
4 | #include
5 | #include "Eigen/Dense"
6 |
7 | /**
8 | * Record a weighted average of per-transcript observed effective lengths.
9 | * These can then be combined to compute an "expected" effective length.
10 | **/
11 | class EffectiveLengthStats {
12 | using VectorXu = Eigen::Matrix;
13 |
14 | public:
15 | EffectiveLengthStats(size_t numTxps);
16 | void addFragment(uint32_t txID, uint32_t len, double logMass);
17 | uint32_t getObservedCount(uint32_t txID);
18 | double getExpectedEffectiveLength(uint32_t txID);
19 | Eigen::VectorXd getExpectedEffectiveLengths();
20 | void merge(const EffectiveLengthStats& other);
21 |
22 | private:
23 | size_t numTxps_;
24 | Eigen::VectorXd lengths_;
25 | Eigen::VectorXd weights_;
26 | VectorXu counts_;
27 | };
28 |
29 | #endif // EFFECTIVE_LENGTH_STATS_HPP
30 |
--------------------------------------------------------------------------------
/include/FASTAParser.hpp:
--------------------------------------------------------------------------------
1 | #ifndef FASTA_PARSER
2 | #define FASTA_PARSER
3 |
4 | #include
5 |
6 | class Transcript;
7 | struct SalmonOpts;
8 |
9 | class FASTAParser {
10 | public:
11 | FASTAParser(const std::string& fname);
12 | void populateTargets(std::vector& transcripts, SalmonOpts& sopt);
13 |
14 | private:
15 | std::string fname_;
16 | };
17 |
18 | #endif // FASTA_PARSER
19 |
--------------------------------------------------------------------------------
/include/FragmentList.hpp:
--------------------------------------------------------------------------------
1 | #ifndef FRAGMENT_LIST_HPP
2 | #define FRAGMENT_LIST_HPP
3 |
4 | extern "C" {
5 | #include "container.h"
6 | }
7 |
8 | class FragmentList {
9 | public:
10 | FragmentList();
11 |
12 | // Free all of the structures allocated for this fragment list
13 | ~FragmentList();
14 |
15 | void freeFragList(Container* frags);
16 |
17 | bool computeBestChain_(Container* frags, double& maxScore, uint32_t& bestPos);
18 |
19 | void computeBestChain();
20 |
21 | void addFragMatch(uint32_t refStart, uint32_t queryStart, uint32_t len);
22 |
23 | void addFragMatch(uint32_t refStart, uint32_t refEnd, uint32_t queryStart,
24 | uint32_t queryEnd);
25 |
26 | void addFragMatchRC(uint32_t refStart, uint32_t queryStart, uint32_t len);
27 |
28 | void addFragMatchRC(uint32_t refStart, uint32_t refEnd, uint32_t queryStart,
29 | uint32_t queryEnd);
30 |
31 | bool isForward();
32 |
33 | Container* fragments;
34 | Container* fragmentsRC;
35 | size_t numFrag;
36 | double bestHitScore;
37 | uint32_t bestHitPos;
38 | bool isForward_{true};
39 | };
40 |
41 | #endif // FRAGMENT_LIST_HPP
42 |
--------------------------------------------------------------------------------
/include/IOUtils.hpp:
--------------------------------------------------------------------------------
1 | #ifndef IO_UTILS
2 | #define IO_UTILS
3 |
4 | #include
5 | #include
6 |
7 | namespace ioutils {
8 |
9 | const char RESET_COLOR[] = "\x1b[0;0m";
10 | const char SET_GREEN[] = "\x1b[0;32m";
11 | const char SET_RED[] = "\x1b[0;31m";
12 |
13 | } // namespace ioutils
14 |
15 | #endif // IO_UTILS
16 |
--------------------------------------------------------------------------------
/include/IndexVersionInfo.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __INDEX_VERSION_INFO_HPP__
2 | #define __INDEX_VERSION_INFO_HPP__
3 |
4 | #include "cereal/archives/json.hpp"
5 | #include "cereal/types/vector.hpp"
6 |
7 | class IndexVersionInfo {};
8 |
9 | #endif //__INDEX_VERSION_INFO_HPP__
10 |
--------------------------------------------------------------------------------
/include/KmerContext.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __KMER_CONTEXT_HPP__
2 | #define __KMER_CONTEXT_HPP__
3 |
4 | #include "SalmonUtils.hpp"
5 | #include "UtilityFunctions.hpp"
6 | #include
7 | #include
8 |
9 | class KmerContext {
10 | private:
11 | uint32_t _invalidIdx{std::numeric_limits::max()};
12 | public:
13 | KmerContext(uint32_t K, salmon::utils::Direction dir)
14 | : _valid(false), _length(K), _dir(dir), _repr(_invalidIdx) {
15 | if (K == 0) {
16 | std::cerr << "Cannot create a k-mer context of size 0!\n";
17 | std::exit(1);
18 | }
19 | }
20 | bool valid() const { return _valid; }
21 | uint32_t index() const { return _repr; }
22 | std::string str() const {
23 | return (valid() ? kmerForIndex(_repr, _length) : std::string(_length, 'X'));
24 | }
25 |
26 | void operator()(const char* s) {
27 | if (valid()) {
28 | _repr = nextKmerIndex(_repr, s[_length - 1], _length, _dir);
29 | } else {
30 | _repr = 0;
31 | _repr = indexForKmer(s, _length, _dir);
32 | _valid = true;
33 | }
34 | }
35 |
36 | private:
37 | bool _valid;
38 | uint32_t _length;
39 | salmon::utils::Direction _dir;
40 | uint32_t _repr;
41 | };
42 |
43 | #endif //__KMER_CONTEXT_HPP__
44 |
--------------------------------------------------------------------------------
/include/MappingStatistics.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __SALMON_MAPPING_STATISTICS__
2 | #define __SALMON_MAPPING_STATISTICS__
3 |
4 | #include
5 |
6 | // class to collect statistics we may want about mapping / alignment
7 | class MappingStatistics {
8 | public:
9 | std::atomic numOrphansRescued{0};
10 | // The number of mappings that were filtered due to alignment score
11 | std::atomic numMappingsFiltered{0};
12 | std::atomic numFragmentsFiltered{0};
13 | std::atomic numDecoyFragments{0};
14 | std::atomic numDovetails{0};
15 | };
16 |
17 | #endif // __SALMON_MAPPING_STATISTICS__
18 |
--------------------------------------------------------------------------------
/include/MicroOpts.hpp:
--------------------------------------------------------------------------------
1 | #ifndef MICROOPTS_HPP
2 | #define MICROOPTS_HPP
3 |
4 | /** Based on Likely.h from FB's Folly library **/
5 |
6 | #undef LIKELY
7 | #undef UNLIKELY
8 |
9 | #if defined(__GUNC__) && __GNUC__ >= 4
10 | #define LIKELY(X) (__builtin_expect((x), 1))
11 | #define UNLIKELY(X) (__builtin_expect((x), 0))
12 | #elif defined(__clang__)
13 |
14 | #endif // MICROOPTS_HPP
15 |
--------------------------------------------------------------------------------
/include/MultinomialSampler.hpp:
--------------------------------------------------------------------------------
1 | #ifndef _MULTINOMIAL_SAMPLER_HPP_
2 | #define _MULTINOMIAL_SAMPLER_HPP_
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | class MultinomialSampler {
9 | public:
10 | MultinomialSampler(std::random_device& rd) : gen_(rd()), u01_(0.0, 1.0) {}
11 |
12 | void operator()(std::vector::iterator sampleBegin, uint32_t n,
13 | uint32_t k, std::vector::iterator probsBegin,
14 | bool clearCounts = true) {
15 | uint32_t i, j;
16 | double u, sum;
17 | std::vector z(k + 1, 0.0);
18 |
19 | if (clearCounts) {
20 | for (i = 0; i < k; i++) {
21 | *(sampleBegin + i) = 0;
22 | }
23 | }
24 |
25 | z[0] = 0;
26 | for (i = 1; i <= k; i++) {
27 | sum = 0;
28 | for (j = 0; j < i; j++)
29 | sum += *(probsBegin + j);
30 | z[i] = sum;
31 | }
32 |
33 | // If k is small (<= 100), linear search is usually faster
34 | if (k <= 100) {
35 | for (j = 0; j < n; j++) {
36 | u = u01_(gen_);
37 |
38 | for (i = 0; i < k; i++) {
39 | if ((z[i] < u) && (u <= z[i + 1])) {
40 | (*(sampleBegin + i))++;
41 | break;
42 | }
43 | }
44 | }
45 | } else { // k is large enough to warrant binary search
46 | for (j = 0; j < n; j++) {
47 | u = u01_(gen_);
48 |
49 | // Find the offset of the element to increment
50 | auto it = std::lower_bound(z.begin(), z.end() - 1, u);
51 | size_t offset = static_cast(std::distance(z.begin(), it));
52 |
53 | if (*it > u and offset > 0) {
54 | offset -= 1;
55 | }
56 |
57 | (*(sampleBegin + offset))++;
58 | }
59 | }
60 | }
61 |
62 | private:
63 | std::mt19937 gen_;
64 | std::uniform_real_distribution<> u01_;
65 | };
66 |
67 | #endif //_MULTINOMIAL_SAMPLER_HPP_
68 |
--------------------------------------------------------------------------------
/include/NullFragmentFilter.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __NULL_FRAGMENT_FILTER_HPP__
2 | #define __NULL_FRAGMENT_FILTER_HPP__
3 |
4 | template class NullFragmentFilter {
5 | public:
6 | inline void processFrag(FragT* /*f*/) {}
7 | };
8 |
9 | #endif // __NULL_FRAGMENT_FILTER_HPP__
10 |
--------------------------------------------------------------------------------
/include/OutputUnmappedFilter.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __OUTPUT_UNMAPPED_FILTER_HPP__
2 | #define __OUTPUT_UNMAPPED_FILTER_HPP__
3 |
4 | #include "ReadPair.hpp"
5 | #include "UnpairedRead.hpp"
6 | #include
7 | #include
8 |
9 | template class OutputUnmappedFilter {
10 | public:
11 | OutputUnmappedFilter(oneapi::tbb::concurrent_bounded_queue* outQueue)
12 | : outQueue_(outQueue), qlen_(0) {
13 | memset(&qname_[0], 0, 255);
14 | }
15 |
16 | inline void processFrag(FragT* f) {
17 | bool distinctRead{true};
18 |
19 | // Check if the new read name is distinct from
20 | // the previous one.
21 | auto newLen = f->getNameLength();
22 | if (qlen_ == newLen) {
23 | distinctRead = (memcmp(&qname_[0], f->getName(), qlen_) != 0);
24 | }
25 |
26 | // If this doesn't have the same name as the last read we saw,
27 | // than pass it to the output queue and update the name of the
28 | // most recently observed read.
29 | if (distinctRead) {
30 | auto* alnCpy = f->clone();
31 | outQueue_->push(alnCpy);
32 | qlen_ = newLen;
33 | memcpy(&qname_[0], f->getName(), qlen_);
34 | }
35 | // If it does have the same name as the last read, no need
36 | // to update.
37 | }
38 |
39 | private:
40 | oneapi::tbb::concurrent_bounded_queue* outQueue_ = nullptr;
41 | char qname_[255];
42 | uint32_t qlen_;
43 | };
44 |
45 | #endif // __OUTPUT_UNMAPPED_FILTER_HPP__
46 |
--------------------------------------------------------------------------------
/include/ProgramOptionsGenerator.hpp:
--------------------------------------------------------------------------------
1 | #ifndef PROGRAM_OPTIONS_GENERATOR_HPP
2 | #define PROGRAM_OPTIONS_GENERATOR_HPP
3 |
4 | #include
5 | #include "SalmonOpts.hpp"
6 |
7 | namespace salmon {
8 | namespace po = boost::program_options;
9 | class ProgramOptionsGenerator{
10 | public:
11 | po::options_description getMappingInputOptions(SalmonOpts& sopt);
12 | po::options_description getAlignmentInputOptions(SalmonOpts& sopt);
13 |
14 | po::options_description getBasicOptions(SalmonOpts& sopt);
15 |
16 | po::options_description getMappingSpecificOptions(SalmonOpts& sopt);
17 | po::options_description getAlignmentSpecificOptions(SalmonOpts& sopt);
18 | po::options_description getAlevinBasicOptions(SalmonOpts& sopt);
19 | po::options_description getAlevinDevsOptions();
20 | po::options_description getAdvancedOptions(int32_t& numBiasSamples, SalmonOpts& sopt);
21 | po::options_description getHiddenOptions(SalmonOpts& sopt);
22 | po::options_description getTestingOptions(SalmonOpts& sopt);
23 | po::options_description getDeprecatedOptions(SalmonOpts& /*sopt*/);
24 | };
25 |
26 | }
27 |
28 | #endif // PROGRAM_OPTIONS_GENERATOR_HPP
29 |
--------------------------------------------------------------------------------
/include/SGSmooth.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __SGSMOOTH_HPP__
2 | #define __SGSMOOTH_HPP__
3 |
4 | #include
5 |
6 | // savitzky golay smoothing.
7 | std::vector sg_smooth(const std::vector& v, const int w,
8 | const int deg);
9 | //! numerical derivative based on savitzky golay smoothing.
10 | std::vector sg_derivative(const std::vector& v, const int w,
11 | const int deg, const double h = 1.0);
12 |
13 | #endif // __SGSMOOTH_HPP__
14 |
--------------------------------------------------------------------------------
/include/SalmonConfig.hpp:
--------------------------------------------------------------------------------
1 | /**
2 | >HEADER
3 | Copyright (c) 2014-2024 Rob Patro rob@cs.umd.edu
4 |
5 | This file is part of Salmon.
6 |
7 | Salmon is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | Salmon is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Salmon. If not, see .
19 |
26 | #include
27 |
28 | namespace salmon {
29 | constexpr char majorVersion[] = "1";
30 | constexpr char minorVersion[] = "10";
31 | constexpr char patchVersion[] = "3";
32 | constexpr char version[] = "1.10.3";
33 | constexpr uint32_t indexVersion = 5;
34 | constexpr char requiredQuasiIndexVersion[] = "p7";
35 | } // namespace salmon
36 |
37 | #endif // SALMON_CONFIG_HPP
38 |
--------------------------------------------------------------------------------
/include/SalmonExceptions.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __SALMON_EXCEPTIONS_HPP__
2 | #define __SALMON_EXCEPTIONS_HPP__
3 |
4 | #include
5 | #include
6 | #include
7 |
8 | class InsufficientAssignedFragments : public std::runtime_error {
9 | public:
10 | InsufficientAssignedFragments(uint64_t numAssigned,
11 | uint64_t numRequired) noexcept;
12 | InsufficientAssignedFragments(InsufficientAssignedFragments&& other);
13 | virtual const char* what() const throw();
14 |
15 | private:
16 | uint64_t numAssigned_;
17 | uint64_t numRequired_;
18 | std::ostringstream cnvt;
19 | std::string msg_;
20 | };
21 |
22 | #endif //__SALMON_EXCEPTIONS_HPP__
23 |
--------------------------------------------------------------------------------
/include/SalmonSpinLock.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __SALMON_SPIN_LOCK_HPP__
2 | #define __SALMON_SPIN_LOCK_HPP__
3 |
4 | #include
5 |
6 | /**
7 | * since std::mutex is *VERY SLOW* on OSX, we use
8 | * this there instead.
9 | * Taken from
10 | * (http://stackoverflow.com/questions/22899053/why-is-stdmutex-so-slow-on-osx)
11 | */
12 | class spin_lock {
13 | std::atomic _lock;
14 |
15 | public:
16 | spin_lock(const spin_lock&) = delete;
17 | spin_lock& operator=(const spin_lock&) = delete;
18 |
19 | spin_lock() : _lock(false) {}
20 |
21 | class scoped_lock {
22 | spin_lock& _lock;
23 |
24 | public:
25 | scoped_lock(const scoped_lock&) = delete;
26 | scoped_lock& operator=(const scoped_lock&) = delete;
27 |
28 | scoped_lock(spin_lock& lock) : _lock(lock) {
29 | bool expect = false;
30 | while (!_lock._lock.compare_exchange_weak(expect, true)) {
31 | expect = false;
32 | }
33 | }
34 | ~scoped_lock() { _lock._lock = false; }
35 | };
36 | };
37 |
38 | #endif // __SALMON_SPIN_LOCK_HPP__
39 |
--------------------------------------------------------------------------------
/include/SimplePosBias.hpp:
--------------------------------------------------------------------------------
1 | #ifndef SIMPLE_POS_BIAS_HPP
2 | #define SIMPLE_POS_BIAS_HPP
3 |
4 | #include "spdlog/spdlog.h"
5 | #include "spline.h"
6 | #include
7 | #include
8 | #include
9 |
10 | class SimplePosBias {
11 | public:
12 | SimplePosBias(int32_t numBins = 20, bool logSpace = true);
13 |
14 | // Add a mass of @mass to bin @bin
15 | void addMass(int32_t bin, double mass);
16 |
17 | // Compute the bin for @pos on a transcript of length @length,
18 | // and add @mass to the appropriate bin
19 | void addMass(int32_t pos, int32_t length, double mass);
20 |
21 | // Project, via linear interpolation, the weights contained in "bins"
22 | // into the vector @out.
23 | void projectWeights(std::vector& out);
24 |
25 | // Combine the distribution @other
26 | // with this distribution
27 | void combine(const SimplePosBias& other);
28 |
29 | // We're finished updating this distribution, so
30 | // compute the cdf etc.
31 | void finalize();
32 |
33 | // Seralize this model.
34 | bool writeBinary(boost::iostreams::filtering_ostream& out) const;
35 |
36 | private:
37 | int32_t numBins_;
38 | std::vector masses_;
39 | bool isLogged_{true};
40 | bool isFinalized_{false};
41 | ::tk::spline s_;
42 | // position bins taken from Cufflinks:
43 | // https://github.com/cole-trapnell-lab/cufflinks/blob/master/src/biascorrection.cpp
44 | const std::vector positionBins_{{.02, .04, .06, .08, .10, .15, .2,
45 | .3, .4, .5, .6, .7, .8, .85,
46 | .9, .92, .94, .96, .98, 1.0}};
47 | };
48 |
49 | #endif // SIMPLE_POS_BIAS_HPP
50 |
--------------------------------------------------------------------------------
/include/StadenUtils.hpp:
--------------------------------------------------------------------------------
1 | #ifndef STADEN_UTILS
2 | #define STADEN_UTILS
3 |
4 | extern "C" {
5 | #include "io_lib/os.h"
6 | #include "io_lib/scram.h"
7 | #undef max
8 | #undef min
9 | }
10 |
11 | #include
12 |
13 | namespace staden {
14 | namespace utils {
15 | bam_seq_t* bam_init();
16 | void bam_destroy(bam_seq_t* b);
17 | } // namespace utils
18 | } // namespace staden
19 |
20 | #endif // STADEN_UTILS
21 |
--------------------------------------------------------------------------------
/include/TranscriptGroup.hpp:
--------------------------------------------------------------------------------
1 | #ifndef TRANSCRIPT_GROUP_HPP
2 | #define TRANSCRIPT_GROUP_HPP
3 |
4 | #include
5 |
6 | #include
7 | #include
8 | #include "xxhash.h"
9 |
10 | class TranscriptGroup {
11 | public:
12 | TranscriptGroup();
13 | TranscriptGroup(std::vector txpsIn);
14 |
15 | TranscriptGroup(std::vector txpsIn, size_t hashIn);
16 |
17 | TranscriptGroup(TranscriptGroup&& other);
18 | TranscriptGroup(const TranscriptGroup& other);
19 |
20 | TranscriptGroup& operator=(const TranscriptGroup& other);
21 | TranscriptGroup& operator=(TranscriptGroup&& other);
22 |
23 | friend bool operator==(const TranscriptGroup& lhs,
24 | const TranscriptGroup& rhs);
25 |
26 | void setValid(bool v) const;
27 |
28 | std::vector txps;
29 | size_t hash;
30 | double totalMass;
31 | mutable bool valid;
32 | };
33 |
34 | bool operator==(const TranscriptGroup& lhs, const TranscriptGroup& rhs);
35 |
36 | struct TranscriptGroupHasher {
37 | std::size_t operator()(const TranscriptGroup& k) const {
38 | return k.hash;
39 | /*
40 | std::size_t seed{0};
41 | for (auto e : k.txps) {
42 | boost::hash_combine(seed, e);
43 | }
44 | return seed;
45 | */
46 | }
47 | };
48 |
49 | #endif // TRANSCRIPT_GROUP_HPP
50 |
--------------------------------------------------------------------------------
/include/TryableSpinLock.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __TRYABLE_SPIN_LOCK_HPP__
2 | #define __TRYABLE_SPIN_LOCK_HPP__
3 |
4 | #include
5 |
6 | // Taken from
7 | // http://stackoverflow.com/questions/26583433/c11-implementation-of-spinlock-using-atomic
8 | class TryableSpinLock {
9 | std::atomic_flag locked = ATOMIC_FLAG_INIT;
10 |
11 | public:
12 | void lock() {
13 | while (locked.test_and_set(std::memory_order_acquire)) {
14 | ;
15 | }
16 | }
17 |
18 | // from
19 | // http://stackoverflow.com/questions/19742993/implementing-a-spinlock-in-boost-example-neededhttp://stackoverflow.com/questions/19742993/implementing-a-spinlock-in-boost-example-needed
20 | // is this legit?
21 | bool try_lock() { return !locked.test_and_set(std::memory_order_acquire); }
22 |
23 | void unlock() { locked.clear(std::memory_order_release); }
24 | };
25 |
26 | #endif //__TRYABLE_SPIN_LOCK_HPP__
27 |
--------------------------------------------------------------------------------
/include/VersionChecker.hpp:
--------------------------------------------------------------------------------
1 | // based off of
2 | // async_client.cpp
3 | // ~~~~~~~~~~~~~~~~
4 | //
5 | // Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 | //
7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 | //
10 |
11 | #ifndef VERSION_CHECKER_HPP
12 | #define VERSION_CHECKER_HPP
13 |
14 | #include
15 | #include
16 | #include
17 |
18 | std::string getVersionMessage();
19 |
20 | #endif // VERSION_CHECKER_HPP
--------------------------------------------------------------------------------
/include/WhiteList.hpp:
--------------------------------------------------------------------------------
1 | #ifndef __WHITE_LIST_HPP__
2 | #define __WHITE_LIST_HPP__
3 |
4 |
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | #include "SingleCellProtocols.hpp"
15 | #include "BarcodeGroup.hpp"
16 | //#include "RapMapUtils.hpp"
17 | #include "SingleCellProtocols.hpp"
18 |
19 | #include "oneapi/tbb/parallel_for.h"
20 | #include "oneapi/tbb/blocked_range.h"
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | namespace alevin {
28 | namespace whitelist {
29 |
30 | using BlockedIndexRange = oneapi::tbb::blocked_range;
31 | using DoubleMatrixT = std::vector> ;
32 | using DoubleVectorT = std::vector ;
33 |
34 | uint32_t populate_count_matrix(boost::filesystem::path& outDir,
35 | size_t numElem,
36 | DoubleMatrixT& countMatrix);
37 |
38 | template
39 | bool performWhitelisting(AlevinOpts& aopt,
40 | std::vector& trueBarcodes,
41 | bool useRibo, bool useMito,
42 | size_t numLowConfidentBarcode);
43 | }
44 | }
45 |
46 | #endif // __WHITE_LIST_HPP__
47 |
--------------------------------------------------------------------------------
/include/backtrace.hpp:
--------------------------------------------------------------------------------
1 | /* This file is part of Jellyfish.
2 |
3 | This work is dual-licensed under 3-Clause BSD License or GPL 3.0.
4 | You can choose between one of them if you use this work.
5 |
6 | `SPDX-License-Identifier: BSD-3-Clause OR GPL-3.0`
7 | */
8 |
9 | void print_backtrace();
10 | void show_backtrace();
11 |
--------------------------------------------------------------------------------
/include/core/array.hpp:
--------------------------------------------------------------------------------
1 | #ifndef CORE_ARRAY_HPP
2 | #define CORE_ARRAY_HPP
3 |
4 | #include
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 | namespace core {
12 | inline namespace v2 {
13 |
14 | template
15 | constexpr auto make_array (Args&&... args) -> ::std::array<
16 | meta::either<
17 | meta::all<
18 | ::std::is_void::value,
19 | meta::none_of, is_reference_wrapper>()
20 | >(),
21 | common_type_t,
22 | V
23 | >,
24 | sizeof...(Args)
25 | > { return {{ core::forward(args)... }}; }
26 |
27 | template
28 | constexpr auto to_array (T (&array)[N], index_sequence) -> ::std::array<
29 | remove_cv_t, N
30 | > { return {{ array[Is]... }}; }
31 |
32 | template
33 | constexpr auto to_array (T (&array)[N]) -> ::std::array, N> {
34 | return (to_array)(array, make_index_sequence { });
35 | }
36 |
37 | }} /* namespace core::v2 */
38 |
39 | #endif /* CORE_ARRAY_HPP */
40 |
--------------------------------------------------------------------------------
/include/core/deque.hpp:
--------------------------------------------------------------------------------
1 | #ifndef CORE_DEQUE_HPP
2 | #define CORE_DEQUE_HPP
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | namespace core {
10 | inline namespace v2 {
11 |
12 | template
13 | void erase_if (::std::deque& deq, Predicate pred) {
14 | deq.erase(::core::remove_if(deq, pred), end(deq));
15 | }
16 |
17 | template
18 | void erase (::std::deque& deq, U const& value) {
19 | deq.erase(::core::remove(deq, value), end(deq));
20 | }
21 |
22 | }} /* namespace core::v2 */
23 |
24 | namespace core {
25 | inline namespace v2 {
26 | namespace pmr {
27 |
28 | template using deque = ::std::deque>;
29 |
30 | }}} /* namespace core::v2::pmr */
31 |
32 | #endif /* CORE_DEQUE_HPP */
33 |
--------------------------------------------------------------------------------
/include/core/forward_list.hpp:
--------------------------------------------------------------------------------
1 | #ifndef CORE_FORWARD_LIST_HPP
2 | #define CORE_FORWARD_LIST_HPP
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | namespace core {
10 | inline namespace v2 {
11 |
12 | template
13 | void erase_if (::std::forward_list& f, Predicate pred) {
14 | f.remove_if(pred);
15 | }
16 |
17 | template
18 | void erase (::std::forward_list& f, U const& value) {
19 | using ::std::placeholders::_1;
20 | f.remove_if(::std::bind(equal<>, _1, ::std::cref(value)));
21 | }
22 |
23 | }} /* namespace core::v2 */
24 |
25 | namespace core {
26 | inline namespace v2 {
27 | namespace pmr {
28 |
29 | template
30 | using forward_list = ::std::forward_list>;
31 |
32 | }}} /* namespace core::v2::pmr */
33 |
34 | #endif /* CORE_FORWARD_LIST_HPP */
35 |
--------------------------------------------------------------------------------
/include/core/list.hpp:
--------------------------------------------------------------------------------
1 | #ifndef CORE_LIST_HPP
2 | #define CORE_LIST_HPP
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | namespace core {
10 | inline namespace v2 {
11 |
12 | template
13 | void erase_if (::std::list& l, Predicate pred) { l.remove_if(pred); }
14 |
15 | template
16 | void erase (::std::list& l, U const& value) {
17 | using ::std::placeholders::_1;
18 | l.remove_if(::std::bind(equal<>, _1, ::std::cref(value)));
19 | }
20 |
21 | }} /* namespace core::v2 */
22 |
23 | namespace core {
24 | inline namespace v2 {
25 | namespace pmr {
26 |
27 | template using list = ::std::list>;
28 |
29 | }}} /* namespace core::v2::pmr */
30 |
31 | #endif /* CORE_LIST_HPP */
32 |
--------------------------------------------------------------------------------
/include/core/map.hpp:
--------------------------------------------------------------------------------
1 | #ifndef CORE_MAP_HPP
2 | #define CORE_MAP_HPP
3 |
4 | #include
5 | #include
6 |
7 | #include