{"id":13709985,"url":"https://github.com/mateidavid/nanocall","last_synced_at":"2025-05-06T18:33:37.625Z","repository":{"id":73246490,"uuid":"54924971","full_name":"mateidavid/nanocall","owner":"mateidavid","description":"An Oxford Nanopore Basecaller","archived":false,"fork":false,"pushed_at":"2021-09-04T10:36:54.000Z","size":5729,"stargazers_count":71,"open_issues_count":5,"forks_count":19,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-13T20:40:26.574Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mateidavid.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-03-28T21:28:43.000Z","updated_at":"2024-02-27T13:07:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"fbd32945-a87f-4a15-891d-88084db5a674","html_url":"https://github.com/mateidavid/nanocall","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateidavid%2Fnanocall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateidavid%2Fnanocall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateidavid%2Fnanocall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateidavid%2Fnanocall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mateidavid","download_url":"https://codeload.github.com/mateidavid/nanocall/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252744860,"owners_count":21797693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T23:00:49.910Z","updated_at":"2025-05-06T18:33:36.811Z","avatar_url":"https://github.com/mateidavid.png","language":"C++","funding_links":[],"categories":["Software packages"],"sub_categories":["Basecalling"],"readme":"# -*- mode:org; mode:visual-line; coding:utf-8; -*-\n\n** Nanocall: An Oxford Nanopore Basecaller\n\n[[http://travis-ci.org/mateidavid/nanocall][http://travis-ci.org/mateidavid/nanocall.svg?branch=master]] [[https://tldrlegal.com/license/mit-license][http://img.shields.io/:license-mit-blue.svg]]\n\n*** Introduction\n\nNanocall is an alternative, open source, MIT licensed, basecaller for Oxford Nanopore Technologies (ONT) sequencing data. Published in [[https://doi.org/10.1093/bioinformatics/btw569][Bioinformatics, 2016]].\n\nFor the official ONT basecaller, see [[https://metrichor.com/s/][Metrichor]].\n\n**** Usefulness of Nanocall on recent ONT sequencing data\n\nTo understand the usefulness of Nanocall compared to Metrichor, some background is in order.\n\n*Before summer 2016*: Before the summer of 2016, and the release of the R9 sequencing pore:\n\n- Metrichor was the only available basecaller for ONT data.\n- Metrichor's source code was closed.\n- Metrichor was only available as a cloud service.\n\nThis state of affairs prompted us to develop Nanocall as an open-source local basecaller alternative to Metrichor.\n\n*After summer 2016*: The summer of 2016 has brought along several significant developments from ONT:\n\n- A new sequencing pore R9 was released: ([[https://nanoporetech.com/about-us/news/update-new-r9-nanopore-faster-more-accurate-sequencing-and-new-ten-minute-preparation][ONT Press Release, May 2016]]).\n- The Metrichor source code was opened (under a development license).\n- ONT provided an official option for local basecalling: ([[https://nanoporetech.com/about-us/news/local-basecalling-now-available-enabling-minion-usage-field][ONT Press Release, Aug 2016]]).\n\nAs a result, Nanocall's usefulness is now limited to:\n\n- a platform for developing new basecalling ideas, and\n- situations where, for various reasons, you do not have access to the official ONT basecaller(s).\n\nIf you want to use Nanocall on R9 data, Nanocall does support it directly, but its accuracy is significantly lower than that of Metrichor (unlike the case of R7.3, where the two had similar accuracy). The reason for the discrepancy is that Metrichor on R9 uses a more elaborate RNN-based approach, compared to the simple HMM-based one in Nanocall.\n\n**** Levels of ONT sequencing data\n\nMost people are only used to dealing with DNA bases. However, to understand where Nanocall fits in, we observe that there are 3 levels of ONT sequencing data:\n\n- Raw samples. These are direct (picoamp) current measurements, taken at preset intervals as the DNA molecule is threaded through the pore. This data is passed through the USB cable from the MinION to the controlling laptop running MinKNOW. These are stored in =fast5= files at paths such as =/Raw/Reads/Read_29/Signal=.\n\n- Events. Each event is an aggregation of multiple consecutive raw samples, (ideally) corresponding to a certain DNA context found in the pore. The process of computing events from raw samples is referred to as /event detection/. These are stored in =fast5= files at paths such as =/Analyses/EventDetection_000/Reads/Read_29/Events=.\n\n- DNA bases. These are the usual, finished product. The process of computing DNA bases from events is referred to as /basecalling/. These are stored in =fast5= files at paths such as =/Analyses/Basecall_2D_000/BaseCalled_2D/Fastq=.\n\nOn R7.3, event detection was performed locally by MinKNOW, and events were passed on to, and used by Metrichor. Since Nanocall was developed as an alternative local basecaller for R7.3 data, /Nanocall is designed to work with events, not with raw samples/.\n\nOn (at least some versions of) R9, Metrichor would entirely redo the event detection directly from raw samples, disregarding any event detection done locally by MinKNOW. As such, it is less uncommon with R9 (than with R7.3) to see =fast5= files without events. Nanocall cannot be run directly on such files. To use Nanocall on R9 data, you must either configure MinKNOW to perform local event detection, or pass the files through Metrichor to use its event detection.\n\n*** Installation\n\nNanocall can be built from source in a classical UNIX environment, or directly under [[https://www.docker.com/what-docker][Docker]]. The Docker build might run under Windows, though this is not tested.\n\n**** Under a Classical UNIX Environment\n\nNanocall uses =cmake= for configuration and =make= for building. The prerequisites needed for building are =zlib= and =hdf5=. On UNIX systems, =hdf5= can be optionally built as a submodule.\nExample build:\n\n#+BEGIN_EXAMPLE\nmkdir /some/source/dir \u0026\u0026 cd /some/source/dir\ngit clone --recursive https://github.com/mateidavid/nanocall.git\ncd nanocall\nmkdir build \u0026\u0026 cd build\ncmake ../src [-DCMAKE_INSTALL_PREFIX=/some/install/dir] [-DBUILD_HDF5=1] [-DHDF5_ROOT=/path/to/hdf5]\nmake\nmake install\n/some/install/dir/bin/nanocall --version\n#+END_EXAMPLE\n\n*Notes*:\n\n- The default install prefix is =/usr/local=.\n\n- Setting =BUILD_HDF5= will cause =hdf5= to be downloaded and built as a submodule.\n\n- Setting =HDF5_ROOT= is only necessary if a copy of =hdf5= is installed in a non-standard location. This is not needed when =BUILD_HDF5= is used.\n\n**** Under Docker\n\nTo avoid dealing with prerequisites, Nanocall can be conveniently built under Docker. The installation and configuration of Docker itself is outside of the scope of this document.\n\n***** Simple \"fat\" build\n\nThe simplest way to run Nanocall under Docker is:\n\n#+BEGIN_EXAMPLE\ndocker build -t nanocall https://github.com/mateidavid/nanocall.git\ndocker run --rm nanocall --version\ndocker run --rm -u $(id -u):$(id -g) -v /path/to/data:/data nanocall -t 4 . \u003eoutput.fa\n#+END_EXAMPLE\n\nHowver, there are several problems with this build:\n\n- The docker image is \"fat\", in that it contains all the build time dependencies of Nanocall, which are not needed at run time.\n\n- Without using =-u=, the image will create files with a UID of 0 on the mounted volumes of the host. To remove them, you will have to use =sudo rm= or =sudo chown=.\n\n- The timezone inside the image might be different from the host. This might confuse programs which depend on comparing modification times, most notably =make=.\n\n***** Alternate \"slim\" build\n\nTo alleviate the problems mentioned above, you can build a \"slim\" Docker image as follows:\n\n#+BEGIN_EXAMPLE\ngit clone --recursive --depth 1 https://github.com/mateidavid/nanocall.git\nnanocall/script/build-slim-docker-image\ndocker run --rm nanocall --version\ndocker run --rm -v /path/to/data:/data nanocall -t 4 . \u003eoutput.fa\n#+END_EXAMPLE\n\n*** Usage Examples\n\n#+BEGIN_EXAMPLE\n# Check version\nnanocall --version\n\n# Check command line parameters\nnanocall --help\n\n# Run on single file, save output and log\nnanocall /path/to/file.fast5 \u003eoutput.fa 2\u003elog\n\n# Run on directory, using 24 threads, discard log\nnanocall -t 24 /path/to/data \u003eoutput.fa 2\u003e/dev/null\n\n# Run on file-of-file-names\nnanocall /path/to/files.fofn \u003eoutput.fa\n\n# Run Docker build on directory, using 4 threads\n# Note: -u is not needed with the \"slim\" build\ndocker run --rm -u $(id -u):$(id -g) -v /path/to/data:/data nanocall -t 4 . \u003eoutput.fa\n#+END_EXAMPLE\n\n*** License\n\nReleased under the [[file:LICENSE][MIT license]].\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateidavid%2Fnanocall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmateidavid%2Fnanocall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateidavid%2Fnanocall/lists"}