brentp / mosdepth

fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing
MIT License
670 stars 99 forks source link

Mac OSX #103

Open ksarathbabu opened 4 years ago

ksarathbabu commented 4 years ago

Is there a way to install this tool on a mac osx?

brew install brewsci/bio/mosdepth ==> Installing mosdepth from brewsci/bio mosdepth: Linux is required. Error: An unsatisfied requirement failed this build.

conda install mosdepth Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

Current channels:

To search for alternate channels that may provide the conda package you're looking for, navigate to

https://anaconda.org

Both conda and brew failed.

brentp commented 4 years ago

did you try:

conda install -c bioconda mosdepth

?

ksarathbabu commented 4 years ago

conda install -c bioconda mosdepth Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

Current channels:

To search for alternate channels that may provide the conda package you're looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

brentp commented 4 years ago

hmm. looks like the recipe skips OSX: https://github.com/bioconda/bioconda-recipes/blob/master/recipes/mosdepth/meta.yaml not sure why. you can build yourself by installing nim (just get choosenim and then nimble install -y mosdepth)

ksarathbabu commented 4 years ago

nimble install -y mosdepth --verbose Reading official package list Prompt: mosdepth not found in any local packages.json, check internet for updated packages? -> [forced yes] Downloading Official package list Trying https://github.com/nim-lang/packages/raw/master/packages.json Success Package list downloaded. Reading official package list Error: Package not found.

brentp commented 4 years ago

ah right. please try this:

git clone https://github.com/brentp/mosdepth
cd mosdepth
nimble install -y
nim c -d:danger -d:release mosdepth.nim
./mosdepth -h
ksarathbabu commented 4 years ago

Verifying dependencies for mosdepth@0.2.8 Info: Dependency on hts@>= 0.3.1 already satisfied Verifying dependencies for hts@0.3.2 Info: Dependency on docopt@>= 0.6.8 already satisfied Verifying dependencies for docopt@0.6.8 Info: Dependency on regex@>= 0.7.4 already satisfied Verifying dependencies for regex@0.13.0 Info: Dependency on unicodedb@>= 0.7.2 already satisfied Verifying dependencies for unicodedb@0.7.2 Info: Dependency on unicodeplus@>= 0.5.0 already satisfied Verifying dependencies for unicodeplus@0.5.1 Info: Dependency on unicodedb@>= 0.7 already satisfied Verifying dependencies for unicodedb@0.7.2 Installing mosdepth@0.2.8 Building mosdepth/mosdepth using c backend Tip: 17 messages have been suppressed, use --verbose to show them. Error: Build failed for package: mosdepth ... Details: ... Execution failed with exit code 1 ... Command: "/usr/local/Cellar/nim/1.0.4/nim/bin/nim" c --noNimblePath -d:NimblePkgVersion=0.2.8 -d:release --path:"/Users/ksarathbabu/.nimble/pkgs/hts-0.3.2" --path:"/Users/ksarathbabu/.nimble/pkgs/docopt-0.6.8" --path:"/Users/ksarathbabu/.nimble/pkgs/regex-0.13.0" --path:"/Users/ksarathbabu/.nimble/pkgs/unicodedb-0.7.2" --path:"/Users/ksarathbabu/.nimble/pkgs/unicodeplus-0.5.1" --path:"/Users/ksarathbabu/.nimble/pkgs/unicodedb-0.7.2" -o:"/Users/ksarathbabu/Desktop/Tools/mosdepth/mosdepth" "/Users/ksarathbabu/Desktop/Tools/mosdepth/mosdepth.nim" ... Output: Hint: used config file '/usr/local/Cellar/nim/1.0.4/nim/config/nim.cfg' [Conf] ... Hint: used config file '/Users/ksarathbabu/Desktop/Tools/mosdepth/nim.cfg' [Conf] ... Hint: system [Processing] ... Hint: widestrs [Processing] ... Hint: io [Processing] ... Hint: mosdepth [Processing] ... Hint: hts [Processing] ... Hint: utils [Processing] ... Hint: hts_concat [Processing] ... Hint: bam [Processing] ... Hint: strformat [Processing] ... Hint: macros [Processing] ... Hint: parseutils [Processing] ... Hint: unicode [Processing] ... Hint: strutils [Processing] ... Hint: math [Processing] ... Hint: bitops [Processing] ... Hint: algorithm [Processing] ... Hint: simpleoption [Processing] ... Hint: typetraits [Processing] ... Hint: vcf [Processing] ... Hint: sequtils [Processing] ... Hint: fai [Processing] ... Hint: bgzf [Processing] ... Hint: bgzi [Processing] ... Hint: csi [Processing] ... Hint: stats [Processing] ... Hint: tables [Processing] ... Hint: hashes [Processing] ... Hint: os [Processing] ... Hint: pathnorm [Processing] ... Hint: osseps [Processing] ... Hint: posix [Processing] ... Hint: times [Processing] ... Hint: options [Processing] ... Hint: docopt [Processing] ... Hint: regex [Processing] ... Hint: sets [Processing] ... Hint: properties [Processing] ... Hint: properties_data [Processing] ... Hint: types [Processing] ... Hint: types_data [Processing] ... Hint: unicodeplus [Processing] ... Hint: util [Processing] ... Hint: depthstat [Processing] ... /Users/ksarathbabu/Desktop/Tools/mosdepth/mosdepth.nim(9, 8) Warning: imported and not used: 'times' [UnusedImport] ... CC: ../../../.nimble/pkgs/hts-0.3.2/hts/private/hts_concat.nim ... CC: ../../../.nimble/pkgs/hts-0.3.2/hts/bam.nim ... CC: ../../../.nimble/pkgs/hts-0.3.2/hts/vcf.nim ... CC: ../../../.nimble/pkgs/hts-0.3.2/hts/bgzf.nim ... CC: ../../../.nimble/pkgs/hts-0.3.2/hts/csi.nim ... CC: ../../../.nimble/pkgs/hts-0.3.2/hts/bgzf/bgzi.nim ... CC: ../../../.nimble/pkgs/hts-0.3.2/hts.nim ... CC: ../../../.nimble/pkgs/unicodeplus-0.5.1/unicodeplus.nim ... CC: ../../../.nimble/pkgs/regex-0.13.0/regex.nim ... CC: ../../../.nimble/pkgs/docopt-0.6.8/docopt/util.nim ... CC: ../../../.nimble/pkgs/docopt-0.6.8/docopt.nim ... Hint: [Link] ... ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libm.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libm.tbd ... ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libdl.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libdl.tbd ... ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd ... Undefined symbols for architecture x86_64: ... "NSGetEnviron", referenced from: ... _getEnvVarsC580467zYn32AEdYj9cD4LLA in stdlibos.nim.c.o ... "bzero", referenced from: ... _llAllocovw3NMWXeZ0Qi9cGYq1E2Tg in stdlib_system.nim.c.o ... _addHeapLinkLIRFHBfc9aX3C5dmMmLnpwA in stdlib_system.nim.c.o ... _alloc0UxtcZ3QOXKsB7mMchxUf9cg in stdlib_system.nim.c.o ... _alloc0WrVG9abV9chlTLqkiXYLKwUg in stdlib_system.nim.c.o ... _initwKM37ZoL6WtPOU9bn6Ug18A in stdlib_system.nim.c.o ... _initY9c9cQhDWRSgYkHfKWcqFlsQ in stdlib_system.nim.c.o ... _cellSetEnlarge9bhPFIGFYIneoHljx8OXvqA in stdlib_system.nim.c.o ... ... ... "_error", referenced from: ... _checkErrfU6ZlJAtQ9bre04EDZLdGsA in stdlib_io.nim.c.o ... _open9aPjGS9a9a5nGpS0viBU29aJXQ in @m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@sbam.nim.c.o ... "_memcpy_chk", referenced from: ... _raiseExceptionAuxna8C8pUZ9cLQWVwk35l5vfw in stdlib_system.nim.c.o ... "_sprintf_chk", referenced from: ... _nsuformatBiggestFloat in stdlibstrutils.nim.c.o ... "stack_chk_fail", referenced from: ... _markStackAndRegistersU6T7JWtDLrWhtmhXSoy9a6g in stdlib_system.nim.c.o ... _raiseExceptionAuxna8C8pUZ9cLQWVwk35l5vfw in stdlib_system.nim.c.o ... _nsuReplaceStr in stdlib_strutils.nim.c.o ... _nsuFindStr in stdlib_strutils.nim.c.o ... _nsuformatBiggestFloat in stdlib_strutils.nim.c.o ... _dollar___SnhqCM7DrEz2CWkWdVIcXg in @m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@sbam.nim.c.o ... _idx_set_metayvSvcCZ3AjP312uJak0ypA in @m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@scsi.nim.c.o ... ... ... "_stack_chk_guard", referenced from: ... _markStackAndRegistersU6T7JWtDLrWhtmhXSoy9a6g in stdlib_system.nim.c.o ... _raiseExceptionAuxna8C8pUZ9cLQWVwk35l5vfw in stdlib_system.nim.c.o ... _nsuReplaceStr in stdlib_strutils.nim.c.o ... _nsuFindStr in stdlib_strutils.nim.c.o ... _nsuformatBiggestFloat in stdlib_strutils.nim.c.o ... _dollar___SnhqCM7DrEz2CWkWdVIcXg in @m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@sbam.nim.c.o ... _idx_set_metayvSvcCZ3AjP312uJak0ypA in @m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@scsi.nim.c.o ... ... ... "_stderrp", referenced from: ... _raiseOutOfMemmMRdr4sgmnykA9aWeM9aDZlw in stdlib_system.nim.c.o ... _writeToStdErra2kDfqdSc1eYf0ZCWOGinQ in stdlib_system.nim.c.o ... _showErrorMessagezsORN9crdKxsL9cHrQcdHSMw in stdlib_system.nim.c.o ... _nimRegisterThreadLocalMarker in stdlib_system.nim.c.o ... _nimRegisterGlobalMarker in stdlib_system.nim.c.o ... _nimLoadLibraryError in stdlib_system.nim.c.o ... _procAddrError in stdlib_system.nim.c.o ... ... ... "_stdoutp", referenced from: ... _echoBinSafe in stdlib_io.nim.c.o ... "__longjmp", referenced from: ... _raiseExceptionAuxna8C8pUZ9cLQWVwk35l5vfw in stdlib_system.nim.c.o ... "setjmp", referenced from: ... _markStackAndRegistersU6T7JWtDLrWhtmhXSoy9a6g in stdlib_system.nim.c.o ... _matchmElywvmHW9csPAv8cNiHClg in @m..@s..@s..@s.nimble@spkgs@sdocopt-0.6.8@sdocopt.nim.c.o ... _docopt1Ouo477jH9cQS4owbam42Ww in @m..@s..@s..@s.nimble@spkgs@sdocopt-0.6.8@sdocopt.nim.c.o ... _get_quantize_args9cbDihDBsDMr1ZwNMjGgWfw in @mmosdepth.nim.c.o ... _NimMainModule in @mmosdepth.nim.c.o ... "_clearerr", referenced from: ... _checkErr__fU6ZlJAtQ9bre04EDZLdGsA in stdlib_io.nim.c.o ... "_dlopen", referenced from: ... _nimLoadLibrary in stdlib_system.nim.c.o ... "_dlsym", referenced from: ... _nimGetProcAddr in stdlib_system.nim.c.o ... "_exit", referenced from: ... _raiseOutOfMemmMRdr4sgmnykA9aWeM9aDZlw in stdlib_system.nim.c.o ... _raiseExceptionAuxna8C8pUZ9cLQWVwk35l5vfw in stdlib_system.nim.c.o ... _nimRegisterThreadLocalMarker in stdlib_system.nim.c.o ... _signalHandler in stdlib_system.nim.c.o ... _nimRegisterGlobalMarker in stdlib_system.nim.c.o ... _nimLoadLibraryError in stdlib_system.nim.c.o ... _procAddrError in stdlib_system.nim.c.o ... ... ... "_fclose", referenced from: ... _close__fU6ZlJAtQ9bre04EDZLdGsA_2 in stdlib_io.nim.c.o ... _opengq12VLhVO0NBzUTnGgz4nw in stdlib_io.nim.c.o ... "_ferror", referenced from: ... _checkErrfU6ZlJAtQ9bre04EDZLdGsA in stdlib_io.nim.c.o ... "_fflush", referenced from: ... _echoBinSafe in stdlib_io.nim.c.o ... "_fileno", referenced from: ... _getFileHandlehOwLbM7eXaZgEJrHWLeiNg in stdlib_io.nim.c.o ... _opengq12VLhVO0NBzUTnGgz4nw in stdlib_io.nim.c.o ... "_flockfile", referenced from: ... _echoBinSafe in stdlib_io.nim.c.o ... "_fopen", referenced from: ... _opengq12VLhVO0NBzUTnGgz4nw in stdlib_io.nim.c.o ... "_free", referenced from: ... _bed_to_tablekYJ7WK9a20hsAj39cJfRlU9cA in @mmosdepth.nim.c.o ... (maybe you meant: _freeBigChunk__IPvsryqksLyNxxag3IQr2g, _freeCyclicCellSOJE9bROCOc8iabVsKM64Sg_2 , _freeHugeChunkIPvsryqksLyNxxag3IQr2g_2 ) ... "_fstat$INODE64", referenced from: ... _opengq12VLhVO0NBzUTnGgz4nw in stdlib_io.nim.c.o ... "_funlockfile", referenced from: ... _echoBinSafe in stdlib_io.nim.c.o ... "_fwrite", referenced from: ... _echoBinSafe in stdlib_io.nim.c.o ... _writeBufferY9atVWUcVyKHG9aBP4D0P9czA in stdlib_io.nim.c.o ... _writePArlm09bKklm2BLsCg6YtaA in stdlib_io.nim.c.o ... _rawWrite in stdlib_system.nim.c.o ... _writeToStdErra2kDfqdSc1eYf0ZCWOGinQ in stdlib_system.nim.c.o ... _showErrorMessage__zsORN9crdKxsL9cHrQcdHSMw in stdlib_system.nim.c.o ... _nimLoadLibraryError in stdlib_system.nim.c.o ... ... ... "_getenv", referenced from: ... _getEnvhhED57tMl0Iaa5bOg9cJaig in stdlib_os.nim.c.o ... "_memchr", referenced from: ... _nsuFindChar in stdlib_strutils.nim.c.o ... "_memcmp", referenced from: ... _X5BX5Deq_78Q4dxBweRhgjG7B9cI9cApw in stdlib_tables.nim.c.o ... _rawGetmNTOeh9adJNQYWgUiiILTSgtables in stdlib_tables.nim.c.o ... _hasKeyOrPut3KDoYrjxY3k3NFOBdG4HeA in stdlib_tables.nim.c.o ... _rawGetQcwT358CAl4HKrtxytUebAtables in stdlib_tables.nim.c.o ... _rawGetfuQlYMkPYoYe9bnsumTP8vQtables in stdlib_tables.nim.c.o ... X5BX5DeqrNiqEa3vCNvEGATZR9cTNEg in stdlib_tables.nim.c.o ... _is_upperrhwqFXsVV4qtCGtLPYyqBQ in @m..@s..@s..@s.nimble@spkgs@sdocopt-0.6.8@sdocopt@sutil.nim.c.o ... ... ... "_memcpy", referenced from: ... _appendString in stdlib_io.nim.c.o ... _addZCTY66tOYFjgwJ0k4aLz4bc0Q in stdlib_system.nim.c.o ... _doOperationsl6eqhLncFedgwzv6TlMVw in stdlib_system.nim.c.o ... _markStackAndRegistersU6T7JWtDLrWhtmhXSoy9a6g in stdlib_system.nim.c.o ... _sweepXHio9cMpnLoH7GyCj1Z9besg_5 in stdlib_system.nim.c.o ... _rawNewObj__ehkAaLROrd0Hc9aLROWt1nQ in stdlib_system.nim.c.o ... _copyStringRC1 in stdlib_system.nim.c.o ... ... ... "_mmap", referenced from: ... _llAllocovw3NMWXeZ0Qi9cGYq1E2Tg in stdlib_system.nim.c.o ... _addHeapLinkLIRFHBfc9aX3C5dmMmLnpwA in stdlib_system.nim.c.o ... _requestOsChunksstlXHMKRKFIGOvq8t4ynRQ_2 in stdlib_system.nim.c.o ... _intSetPutCw86Sj6YgVACdT20AkWjcA in stdlib_system.nim.c.o ... _getHugeChunkstlXHMKRKFIGOvq8t4ynRQ_3 in stdlib_system.nim.c.o ... _allocAvlNodeDu8pyfSfDLyN9aoS2IcBsHg in stdlib_system.nim.c.o ... _rawAllocmE4QEVyMvGRVliDWDngZCQ in stdlib_system.nim.c.o ... ... ... "_munmap", referenced from: ... _freeHugeChunkIPvsryqksLyNxxag3IQr2g_2 in stdlib_system.nim.c.o ... _rawDealloc__K7uQ6aTKvW6OnOV8EMoNNQ in stdlib_system.nim.c.o ... "_setvbuf", referenced from: ... _opengq12VLhVO0NBzUTnGgz4nw in stdlib_io.nim.c.o ... "_signal", referenced from: ... _registerSignalHandleramVlU9ajqZ06ujoesRBHcDg_2 in stdlib_system.nim.c.o ... _systemInit000 in stdlib_system.nim.c.o ... (maybe you meant: _signalHandler) ... "_stat$INODE64", referenced from: ... _nosexistsFile in stdlib_os.nim.c.o ... "_strcmp", referenced from: ... _coverageXiKKDqFArqrfTLMadktcEg in @mmosdepth.nim.c.o ... "_strerror", referenced from: ... _checkErrfU6ZlJAtQ9bre04EDZLdGsA in stdlib_io.nim.c.o ... _open9aPjGS9a9a5nGpS0viBU29aJXQ in @m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@sbam.nim.c.o ... "_strlen", referenced from: ... _rawWrite in stdlib_system.nim.c.o ... _cstrToNimstr in stdlib_system.nim.c.o ... _writeToStdErra2kDfqdSc1eYf0ZCWOGinQ in stdlib_system.nim.c.o ... _showErrorMessagezsORN9crdKxsL9cHrQcdHSMw in stdlib_system.nim.c.o ... _raiseExceptionAux__na8C8pUZ9cLQWVwk35l5vfw in stdlib_system.nim.c.o ... "_tzset", referenced from: ... _stdlib_timesInit000 in stdlib_times.nim.c.o ... ld: symbol(s) not found for architecture x86_64 ... clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation) ... Error: execution of an external program failed: 'clang -o /Users/ksarathbabu/Desktop/Tools/mosdepth/mosdepth /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_assertions.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_io.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_system.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@sprivate@shts_concat.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_parseutils.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_unicode.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_math.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_algorithm.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_strutils.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_strformat.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@sbam.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_sequtils.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@svcf.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@sbgzf.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@scsi.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts@sbgzf@sbgzi.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@shts-0.3.2@shts.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_hashes.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_tables.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_posix.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_times.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_os.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/stdlib_sets.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@sunicodedb-0.7.2@sunicodedb@sproperties_data.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@sunicodedb-0.7.2@sunicodedb@sproperties.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@sunicodedb-0.7.2@sunicodedb@stypes_data.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@sunicodedb-0.7.2@sunicodedb@stypes.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@sunicodeplus-0.5.1@sunicodeplus.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@sregex-0.13.0@sregex.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@sdocopt-0.6.8@sdocopt@sutil.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@m..@s..@s..@s.nimble@spkgs@sdocopt-0.6.8@sdocopt.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@mdepthstat.nim.c.o /Users/ksarathbabu/.cache/nim/mosdepth_r/@mmosdepth.nim.c.o -lm -ldl'

brentp commented 4 years ago

I will try to look into this and getting the OSX bioconda build working (I don't use OSX), thanks for reporting the output. I think in short term your best bet is to use docker or run mosdepth on linux.

sachanelson commented 4 years ago

Thanks for looking into this, just adding another voice to the request, since it looks like such an awesome tool.

ATpoint commented 4 years ago

If anyone cares: For me (macOS 10.14.6) the following steps allowed to build mosdepth from scratch:

  1. get Nim via https://github.com/dom96/choosenim and follow instructions. Put into PATH (as instructed during the installation).
  2. get htslib, e.g. via conda and then put the lib folder into your LD_LIBRARY_PATH, e.g.: (export LD_LIBRARY_PATH=~/path/to/conda/lib). It is the folder that contains htslib.dylib which has to be in that path. Must be htslib >= 1.10
  3. get hts-nim (https://github.com/brentp/hts-nim) and build with nimble install -y Edit: I did step 3 manually, but actually just realized that skipping it and running 4) directly will automatically pull hts-nim if step 2 was done properly and htslib.dylib is available via the LD_LIBRARY_PATH.
  4. get mosdepth source package and install via nimble install -y. After this I was able to successfully run mosdepth.

A bit cleaner version: https://www.biostars.org/p/437365/

brentp commented 4 years ago

can't you just do brew install brewsci/bio/mosdepth ?

ATpoint commented 4 years ago

No, this always returns:

$ brew install brewsci/bio/mosdepth
==> Tapping brewsci/bio
Cloning into '/usr/local/Homebrew/Library/Taps/brewsci/homebrew-bio'...
remote: Enumerating objects: 94, done.
remote: Counting objects: 100% (94/94), done.
remote: Compressing objects: 100% (68/68), done.
remote: Total 9059 (delta 42), reused 50 (delta 23), pack-reused 8965
Receiving objects: 100% (9059/9059), 1.80 MiB | 2.44 MiB/s, done.
Resolving deltas: 100% (6114/6114), done.
Tapped 298 formulae (335 files, 2.5MB).
==> Installing mosdepth from brewsci/bio
mosdepth: Linux is required.
Error: An unsatisfied requirement failed this build.

I remember trying to build it from source in the past multiple times on Mac and it never worked (cannot recall exact error messages). I remember I always installed Nim itself manually, maybe using choosenim here took care of any dependencies that were necessary, but this is just guessing.

brentp commented 4 years ago

I see. I'll try to get an OSX build going in the next few weeks.

brentp commented 4 years ago

hi, I have a build here: https://github.com/brentp/mosdepth/actions/runs/101966135 you can download the artifact (it's a zip file) then extract and chmod +x themosdepth_macos-10.15` binary. if i hear that this is generally working, i'll incorporate these binaries into the next release.

note that these are not static and so still require htslib (brew install htslib).

ATpoint commented 4 years ago

Seems to be working fine. Thanks!

dpryan79 commented 4 years ago

Xref: https://github.com/bioconda/bioconda-recipes/pull/22220

brentp commented 4 years ago

thanks Devon!