Miles Benton
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- tags: Nanopore, GPU --- # Adaptive sampling notes ## Testing with Zymo prep | Species | Genomic DNA | Genome Copy | Cell Number | |--------------------------|-------------|-------------|-------------| | *Pseudomonas aeruginosa* | 12 | 6.1 | 6.1 | | *Escherichia coli* | 12 | 8.5 | 8.5 | | *Salmonella enterica* | 12 | 8.7 | 8.8 | | *Lactobacillus fermentum* | 12 | 21.6 | 21.9 | | *Enterococcus faecalis* | 12 | 14.6 | 14.6 | | *Staphylococcus aureus* | 12 | 15.2 | 15.3 | | *Listeria monocytogenes* | 12 | 13.9 | 13.9 | | *Bacillus subtilis* | 12 | 10.3 | 10.3 | | *Saccharomyces cerevisiae* | 2 | 0.57 | 0.29 | | *Cryptococcus neoformans* | 2 | 0.37 | 0.18 | ### Leviathan with no AS ![](https://i.imgur.com/cwuMN4v.png) ![](https://i.imgur.com/SLcgqF5.png) ![](https://i.imgur.com/KzHs1RF.png) #### species breakdown * A total of **122,800** reads passed | Percent of total | Reads | Species | |------------------|-------|-------------------------| 9.24 |11350 |Pseudomonas aeruginosa 10.17 |12483 |Escherichia coli 11.72 |14396 |Salmonella enterica 11.53 |14158 |Lactobacillus fermentum 11.59 |14231 |Enterococcus faecalis 11.33 |13909 |Staphylococcus aureus 11.75 |14423| Bacillus subtilis 12.87 |15799 |Listeria monocytogenes 2.79 |3432 |unclassified (yeast) ### Leviathan with AS enrichment This was run enriching for *Cryptococcus neoformans* ![](https://i.imgur.com/EfZPKXl.png) ![](https://i.imgur.com/lhVYBf0.png) ![](https://i.imgur.com/bybtmzO.png) #### species breakdown * A a total of **305,468** reads passed | Percent of total | Reads | Species | |------------------|-------|-------------------------| | 8.54 | 26092 | Pseudomonas aeruginosa | | 5.76 | 17608 | Escherichia coli | | 11.70 | 35728 | Salmonella enterica | | 10.39 | 31737 | Lactobacillus fermentum | | 11.59 | 35404 | Enterococcus faecalis | | 9.12 | 27847 | Staphylococcus aureus | | 11.83 | 36140 | Listeria monocytogenes | | 11.41 | 34856 | Bacillus subtilis | | **5.40** | **16506** | **unclassified (yeast)** ### Leviathan with AS depletion This depletion was for: * *Salmonella enterica* * *Bacillus subtilis* * *Cryptococcus neoformans* ![](https://i.imgur.com/cvtboLX.png) ![](https://i.imgur.com/tOawQO5.png) ![](https://i.imgur.com/VpOTHdw.png) #### species breakdown * A total of **133,186** reads passed | Percent of total | Reads | Species | |------------------|-------|-------------------------| 9.42 | 12550 |Pseudomonas aeruginosa 9.49| 12646 |Escherichia coli 11.55 |15380| Salmonella enterica 11.59| 15433| Enterococcus faecalis 11.68 |15554 |Lactobacillus fermentum 11.14 |14836 |Staphylococcus aureus 11.58 |15428| Bacillus subtilis 12.72| 16944| Listeria monocytogenes 3.02 |4016| unclassified (yeast) <br> **...BUT...** <br> | Percent of total | Reads | Species | |------------------|-------|-------------------------| 14.89| 9183| Pseudomonas aeruginosa 14 |8635 |Escherichia coli 14.61| 9008| Lactobacillus fermentum 14.88| 9174| Enterococcus faecalis 17.43| 10748| Staphylococcus aureus 17.73| 10931| Listeria monocytogenes 1.11 |687 |unclassified (yeast) ### Jetson Xavier AGX no AS ![](https://i.imgur.com/FtVH8LB.png) ![](https://i.imgur.com/ho10zSy.png) #### species breakdown * A total of **128,012** reads passed | Percent of total | Reads | Species | |------------------|-------|-------------------------| | 9.06 | 11599 | *Pseudomonas aeruginosa* | | 9.86 | 12620 | *Escherichia coli* | | 12.47 | 15967 | *Salmonella enterica* | | 11.44 | 14646 | *Lactobacillus fermentum* | | 12.24 | 15669 | *Enterococcus faecalis* | | 9.94 | 12729 | *Staphylococcus aureus* | | 12.79 | 16370 | *Listeria monocytogenes* | | 12.50 | 16000 | *Bacillus subtilis* | | **2.92** | **3736** | **unclassified (yeast)** ### Jetson Xavier AGX with AS enrichment This was run enriching for *Cryptococcus neoformans* ![](https://i.imgur.com/iU4h4jR.png) ![](https://i.imgur.com/0yjotzW.png) ![](https://i.imgur.com/3yOBBrG.png) #### species breakdown * A total of **103,267** reads passed | Percent of total | Reads | Species | |------------------|-------|-------------------------| | 9.20 | 9499 | Pseudomonas aeruginosa | | 9.63 | 9946 | Escherichia coli | | 12.59 | 12997 | Salmonella enterica | | 11.55 | 11926 | Lactobacillus fermentum | | 12.47 | 12879 | Enterococcus faecalis | | 9.79 | 10112 | Staphylococcus aureus | | 12.59 | 12997 | Listeria monocytogenes | | 12.38 | 12783 | Bacillus subtilis | | **2.82** | **2914** | **unclassified (yeast)** | #### The little computer that could... ![](https://i.imgur.com/oE8pirK.png) ### ONT GridION with AS enrichment #### species breakdown * A total of **587,309** reads passed | Percent of total | Reads | Species | |------------------|-------|-------------------------| 8.55 | 50231 | Pseudomonas aeruginosa 7.34 | 43121 | Escherichia coli 12.48 | 73300 | Salmonella enterica 12.10 | 71056 | Lactobacillus fermentum 12.74 | 74812 | Enterococcus faecalis 9.49 | 55760 | Staphylococcus aureus 12.59 | 73958 | Listeria monocytogenes 12.66 | 74362 | Bacillus subtilis **2.02** | **11868** | **unclassified (yeast)** # Misc Notes # summary info experiment min max mean median leviathan_AS 133 8719 614.94260806393 413 xavier_AS 129 11547 1038.20781893 672.5 xavier_noAS 117 7779 1092.9387044968 703 gridion_AS 1 9110 691.05119367855 481 # code ```sh # command history (to write up some actual notes) 2014 cd minknow/data/Zymo_adptsamp/Lib_01/20210408_0300_MN34702_FAP84356_ed82bfcf/ 2015 ls 2016 ls fastq_pass/ 2017 cd fastq_pass/ 2018 cat *.fastq > combined.fastq 2019 ls -lhart 2020 bgzip -@ 16 combined.fastq 2021 ls -lhart 2022 tabix combined.fastq.gz 2023 tabix -h 2024 cd .. 2025 kraken2 --threads 32 --db /data/publicData/kraken2/database/krakenDB/ ./fastq_pass/combined.fastq.gz --output kraken2_combined_data --use-names --report kraken2_combined_data 2026 ls -lhart 2027 kraken2 --threads 32 --db /data/publicData/kraken2/database/krakenDB/ ./fastq_pass/combined.fastq.gz --output kraken2_combined_data_out --use-names --report kraken2_combined_data_report 2028 ls -lhart 2029 cat kraken2_combined_data_report 2030 cat kraken2_combined_data_report | awk '$1 > 1' 2031 zcat fastq_pass/combined.fastq.gz | wc -l 2032 scp minit@10.184.188:/xavier_ssd/minknow/Zymo_noAS/Lib_1/20210408_0221_MN34702_FAP84356_2556f8ac/fastq_pass/combined_noAS.fastq . 2033 scp minit@10.1.84.188:/xavier_ssd/minknow/Zymo_noAS/Lib_1/20210408_0221_MN34702_FAP84356_2556f8ac/fastq_pass/combined_noAS.fastq . 2034 bgzip -@ 32 combined_noAS.fastq 2035 kraken2 --threads 32 --db /data/publicData/kraken2/database/krakenDB/ combined_noAS.fastq.gz --output kraken2_combined_noAS_data_out --use-names --report kraken2_combined_noAS_data_report 2036 ls -lhart 2037 cat kraken2_combined_noAS_data_ | awk '$1 > 1' 2038 cat kraken2_combined_noAS_data_report | awk '$1 > 1' 2039 head *_report 2040 scp minit@10.1.84.188:/xavier_ssd/minknow/Adptive_Samp_test_zymo/Lib_1/20210408_0151_MN34702_FAP84356_29b57c1f/fastq_pass/combined_xaxvAS.fastq . 2041 scp minit@10.1.84.188:/xavier_ssd/minknow/Adptive_Samp_test_zymo/Lib_1/20210408_0151_MN34702_FAP84356_29b57c1f/fastq_pass/combined_xavAS.fastq . 2042 ls -lhart 2043 bgzip -@ 32 combined_xavAS.fastq 2044 kraken2 --threads 32 --db /data/publicData/kraken2/database/krakenDB/ combined_xavAS.fastq.gz --output kraken2_combined_xavAS_data_out --use-names --report kraken2_combined_xavAS_data_report 2045 cat kraken2_combined_xavAS_data_report | awk '$1 > 1' 2046 ls -lhart 2047 head kraken2_combined_xavAS_data_out 2048 zgrep '6aaa3318-2c2b-4ca9-a4e8-022b92a04d43' *.fastq.gz 2049 zgrep -A 1 '6aaa3318-2c2b-4ca9-a4e8-022b92a04d43' *.fastq.gz 2050 grep 'unclassified' kraken2_combined_xavAS_data_out 2051 zgrep '7553fed1-5b6a-4305-983a-e5feae04ab17' combined_xavAS.fastq.gz 2052 zgrep -A 1 '7553fed1-5b6a-4305-983a-e5feae04ab17' combined_xavAS.fastq.gz 2053 zgrep -A 1 '2dba9697-35fd-4014-b525-21c27c79f6d6' combined_xavAS.fastq.gz 2054 zgrep -A 1 '830fd09d-5e27-4c80-88ca-09ac212c62f9' combined_xavAS.fastq.gz 2055 zgrep -A 1 '7792f07a-3d5f-47a6-b5bd-b9ec7e02f2be' combined_xavAS.fastq.gz 2056 grep 'unclassified' kraken2_combined_xavAS_data_out > target_enriched_xavAS.txt 2057 cat target_enriched_xavAS.txt 2058 grep 'unclassified' kraken2_combined_noAS_data_out > target_enriched_noAS.txt 2059 cat target_enriched_noAS.txt 2060 grep 'unclassified' kraken2_combined_data_out > target_enriched_leviathanAS.txt 2061 cat target_enriched_leviathanAS.txt 2062 awk '{print $4}' target_enriched_leviathanAS.txt 2063 awk '{print $6}' target_enriched_leviathanAS.txt 2064 awk '{print $6}' target_enriched_leviathanAS.txt | datamash min 1 max 1 mean 1 median 1 2065 awk -F"\t" '{print $6}' target_enriched_leviathanAS.txt | datamash min 1 max 1 mean 1 median 1 2066 awk -F "\t" '{print $6}' target_enriched_leviathanAS.txt | datamash min 1 max 1 mean 1 median 1 2067 awk -F "\t" '{print $4}' target_enriched_leviathanAS.txt | datamash min 1 max 1 mean 1 median 1 2068 awk -F "\t" '{print $4}' target_enriched_xavAS.txt | datamash min 1 max 1 mean 1 median 1 2069 awk -F "\t" '{print $4}' target_enriched_noAS.txt | datamash min 1 max 1 mean 1 median 1 2070 grep '11547' target_enriched_xavAS.txt 2071 zgrep -A 1 '11947be2-9bf6-44b3-aa2a-8b3ec8f4a146' combined_xavAS.fastq.gz kraken2 --threads 32 --db /data/publicData/kraken2/database/krakenDB/ combined_gridAS.fastq.gz --output kraken2_combined_gridAS_data_out --use-names --report kraken2_combined_gridAS_data_repor grep 'unclassified' kraken2_combined_gridAS_data_out > target_enriched_gridAS.txt kraken2 --threads 32 --db /data/publicData/kraken2/database/krakenDB/ combined_AS_depletion_leviathan.fastq.gz --output kraken2_combined_AS_depletion_leviathan_data_out --use-names --report kraken2_AS_depletion_leviathan_report grep 'unclassified' kraken2_combined_AS_depletion_leviathan_data_out > target_enriched_ASdepletionLeviathan.txt cat kraken2_AS_depletion_leviathan_report | awk '$1 > 1' kraken2 --threads 32 --db /data/publicData/kraken2/database/krakenDB/ combined_noAS_leviathan.fastq.gz --output kraken2_combined_noAS_leviathan_data_out --use-names --report kraken2_combined_noAS_leviathan_report grep 'unclassified' kraken2_combined_noAS_leviathan_data_out > target_enriched_noASleviathan.txt cat kraken2_combined_noAS_leviathan_report | awk '$1 > 1' # filter fq based on read length seqkit seq -m 1000 combined_AS_depletion_leviathan.fastq.gz combined_AS_depletion_leviathan_readfiltered1000.fastq.gz kraken2 --threads 32 --db /data/publicData/kraken2/database/krakenDB/ combined_AS_depletion_leviathan_readfiltered1000.fastq.gz --output kraken2_combined_AS_depletion_leviathan_readfiltered1000_data_out --use-names --report kraken2_combined_AS_depletion_leviathan_readfiltered1000_report cat kraken2_combined_AS_depletion_leviathan_readfiltered1000_report | awk '$1 > 1' combined_AS_enrich_leviathan_filtered1000.fastq.gz ``` ![](https://i.imgur.com/2bZPSLj.png) # Adaptive Sampling (ReadUntil) implemented on Nvidia Jetson Xavier AGX and NX One thing that struck me as interesting and very exciting with all this work 'porting' the ONT software over to the Jetson boards is the fact that the adpative sampling option is in fact present in the MinKNOW UI. This is interesting because we are using the software derived for the MinIT - a device that is now discontinued and was never intended to have adaptive sampling. What is also interesting is that ONT have recently released a form of adaptive sampling on the Mk1c. It is slightly different, dubbed 'sketch' mode. Here is part of the announcement from ONT on this: > * *A new 'sketch' model is used for basecalling small chunks to make decisions to eject or keep reads. This model provides low-latency basecalling, making the most of the available on-board compute.* >* *Regular live basecalling during adaptive sampling is disabled for this beta release. This is to ensure that the best possible enrichment is reached by focusing on making sampling decisions. Once the adaptive sample experiment is complete, you will need to manually initiate post-run basecalling to call the enriched reads in the "pass" folder. We are currently looking at optimising our algorithms to re-enable live basecalling alongside adaptive sampling.* source: [link](https://community.nanoporetech.com/posts/beta-release-of-adaptive-s-7369) The above is even more intriguing to me now on the back of what I have learnt from getting adaptive sampling up and running on the Xavier boards, but I'll touch on this later. For now here is how I managed to get things up and running and some of the 'fun' road blocks I hit along the way. ----- **WARNING:** my usual disclaimer here that if you try this "at home"* you accept all risks and consequences of your actions. (\*or at work or any other environment!) ----- ## Adaptive sampling is there! Sort of... So I mentioned above that it was great and unexpected that the option for adaptive sampling is present on the Xavier AGX even using the MinIT repositories. This is present in the MinKNOW software that gets installed using the set up that I've detailed previously ([GitHub link](https://github.com/sirselim/jetson_nanopore_sequencing)) for getting up and running on Jetson boards. So we thought we'd give it a crack. We prepared a library based on a Zymo mock community, which looks like this if you are interested: | Species | Genomic DNA | Genome Copy | Cell Number | |--------------------------|-------------|-------------|-------------| | *Pseudomonas aeruginosa* | 12 | 6.1 | 6.1 | | *Escherichia coli* | 12 | 8.5 | 8.5 | | *Salmonella enterica* | 12 | 8.7 | 8.8 | | *Lactobacillus fermentum* | 12 | 21.6 | 21.9 | | *Enterococcus faecalis* | 12 | 14.6 | 14.6 | | *Staphylococcus aureus* | 12 | 15.2 | 15.3 | | *Listeria monocytogenes* | 12 | 13.9 | 13.9 | | *Bacillus subtilis* | 12 | 10.3 | 10.3 | | *Saccharomyces cerevisiae* | 2 | 0.57 | 0.29 | | *Cryptococcus neoformans* | 2 | 0.37 | 0.18 | For fun I decided to try and enrich for one of the yeast species present at low levels (the Cryptococcus). So I created a minimap2 index for that genome and provided this in the appropriate section in MinKNOW, set up the rest of the run and waited to see what would happen. Here are some screen shots: ![](https://i.imgur.com/iU4h4jR.png) ![](https://i.imgur.com/0yjotzW.png) ![](https://i.imgur.com/3yOBBrG.png) Hmm, adaptive sampling is "working" but it's taking a much longer time to make the decision on wither or not to unblock the read (purple peak). Notive the unblock peak mean is around 2.4Kb ish, we want this to be at about 450bp. Here is what that looks like on a system running the exact same experiment (same flowcell): ![](https://i.imgur.com/lhVYBf0.png) ![](https://i.imgur.com/bybtmzO.png) A nice unblock peak at around 450bp, perfect. So what's going on with the Xavier AGX? Well, I had been troubleshooting some other ReadUntil/ReadFish work in playback/simulation mode where I was seeing similar results from both my x86/x64 Linux machine and the arm64 AGX. I had put it down to lack of 'fast' single core CPU performance and overhead from playback mode. BUT turning off live GPU basecalling in those situations actually made the world of difference, so what would happen if we did that here? More images (remember this is the 8 core, 16GB RAM version of the Xavier AGX): ![](https://i.imgur.com/zV9mMxl.png) ![](https://i.imgur.com/ivNkm4y.png) Huh, what do you know, turn GPU live basecalling off and adaptive sampling works perfectly on the Xavier AGX. ***Slight aside:*** think back to what I mentioned earlier about the Mk1c, with it's beta 'sketch' mode - is this just adaptive sampling without live basecalling? That's one I'd love ONT to answer. :) So it was extremely exciting to see this working, and working well. But monitoring with jtop I noticed that the GPU wasn't really even breaking a sweat and the CPU still had head room. Crazy idea, what would happen if we launch a background instance of guppy basecalling the data being generated? Picture time again: ![](https://i.imgur.com/BzG91sD.jpg) The AGX handles this like a boss! So the Xavier AGX has the required horse power to both run adaptive sampling and GPU basecalling at the same time, but not when implemented at once via the MinKNOW UI. It appears that ONT have a lot of space for optimising the underlying code that handles how the reads are managed and delivered to the GPU on devices that might not be your 'standard fare' - something that they hinted at in the above summary of Mk1c adaptive sampling. OK, this is really neat and exciting. We have a $699 USD computer that is able to not only keep up perfectly with live basecalling 1-2 MinIONs at once, it is also capable of adaptive sampling. Cool! But what about its little brother the Xavier NX? Time to find out... ## No love for the Xavier NX? So time to boot up an NX, pop in the flowcell we've got the Zymo library loaded on, enter some run settings, tick adaptive sampling ... wait a minute, where is the option for adaptive sampling?! The UI on the Xavier NX didn't provide me with the adaptive sampling tick box. I was sure both the AGX and NX were running the same software versions for everything, so I checked: Xavier AGX ![](https://i.imgur.com/uzGHhl2.png) Xavier NX ![](https://i.imgur.com/GO1uegV.png) I also went right down to the `apt policy` level and confirmed the same package versions. I even went as far as caching the packages from the AGX, transferring them over to the NX, manuall installing each with `dpkg` and then being confused that the option still wasn't present in the UI. OK, puzzle solving time again! ### What is going on here? I was actually quite stumped and the only thing that tickled at the edge of my mind was "what if they are doing some form of hardware polling under the hood" and then assigning a model/system to a machine based on it's hardware profile? I remember seeing a particular package, `ont-system-identification`, being installed as part of the software that is pulled from the MinIT repositories. This seemed to put a series of scripts in `/opt/ont/platform/`, so it was time to dig into these. Spoiler: my assumption was correct, that there is a level of hardware detection going on, which is then creating config files that effect 'downstream' components of the software 'stack' - at least on the official ONT devices this seems to be the case. I believe it's a series of scripts that are installed as part of the aptly named `ont-system-identification` package. This package appears to be a dependency for MinIT/Mk1C/GridION/PromethION installs, but not for Mk1b on general Linux OS. I did try removing it but it also wanted to nuke the rest of the MinKNOW install, not ideal... When I first came across these scripts I tried running one called `ont-system-id` and got an error about a product code, and made the assumption that I probably didn't need to worry about it since I'm using a third party board/computer. This assumption, as seen below, was sort of correct (in the case of the Xavier AGX). There is a particular script `system_details.py` (located here: `/opt/ont/platform/library/python/ont_system_identification/system_details.py`) that appears to be creating and matching specific hardware details, and in turn making a decision on the type of system that is being used. So for example this is the read out of the config data generated for the Jetson Xavier AGX: ```shell $ cat /etc/oxfordnanopore/configs/identity.config Serial=esr-xavier Fingerprint= ProductCode=NONE Class=NONE Build=NONE no_of_cores=8 no_of_gpus=3 gpu_type=NONE memory=15G no_of_disks=1 disk_technology=nvme architecture=aarch64 ``` My guess was that it's either setting the Xavier NX device as a MinIT or Mk1C based on the architecture, CPU cores and RAM details. As a reminder the Xavier NX has the same architecture (arm64), same CPU core count (6) and same amount of memory (8GB) as the Jetson TX2, which is inside the MinIT/Mk1c. This turned out to be exactly what was happening, here is the output of the previously mentioned config file generated on the Xavier NX: ```shell $ cat /etc/oxfordnanopore/configs/identity.config Serial=xavnx01 Fingerprint= ProductCode=MIN-101C Class=MK1c Build=proto-mk1c no_of_cores=6 no_of_gpus=2 gpu_type=NONE memory=7.6G no_of_disks=1 disk_technology=nvme architecture=aarch64 ``` It can be clearly seen that the system identification scripts have decided that the Xavier NX looks similar enough to the Jetson TX2 inside the Mk1c to label it as such. So before trying anything 'fancy' I wondered what changing this config would do... ### 'Brute' forcing it... Turns out that I had to use the `chattr` (change attribute) tool* to allow the file to be edited, I then made the modifications as per the AGX config file (replace "Mk1c" entries with "NONE"), saved the file, set the attributes back, restarted the minknow service and bingo bango adaptive sampling is now an option in the MinKNOW UI! >\* _"chattr (Change Attribute) is a command line Linux utility that is used to set/unset certain attributes to a file in Linux system to secure accidental deletion or modification of important files and folders, even though you are logged in as a root user."_ These are the actual code steps that got me there: ```shell #1. allow file to be edited sudo chattr -i /etc/oxfordnanopore/configs/identity.config #2. change lines in config file using nano nano /etc/oxfordnanopore/configs/identity.config # these are edited from mk1c or similar to NONE #3. check the output cat /etc/oxfordnanopore/configs/identity.config # config file output Serial=xavnx01 Fingerprint= ProductCode=NONE Class=NONE Build=NONE no_of_cores=6 no_of_gpus=2 gpu_type=NONE memory=7.6G no_of_disks=1 disk_technology=nvme architecture=aarch64 #4. change attributes back, protecting the file sudo chattr +i /etc/oxfordnanopore/configs/identity.config #5. restart minknow service sudo service minknow restart ``` And here is adaptive sampling working on a Xavier NX, enriching for Listeria: (again, live GPU basecalling is turned off) ![](https://i.imgur.com/LE6WtsK.png) ![](https://i.imgur.com/yiRUgtx.png) ![](https://i.imgur.com/AgyrTt9.png) ![](https://i.imgur.com/3wVf0ar.jpg) ## Additional thoughts At the end of the day this is a pretty simple 'fix' to enable adaptive sampling using the software provided in the MinIT repositories. Additionally, I can see where other 'systems' can be added to the appropriate scripts that would fix this 'misidentification' issue - is this something that would be possible? i.e. would ONT ever explore adding various Jetson devices to the list? I'd love to have an answer to these questions, OR I would love to have the ability to make a pull request with the required changes! :) It's great to have got adaptive sampling running on the Jetson Xavier family of devices, and it's exciting to see that there is potential head room, at least on the AGX, for live basecalling to be enabled again if the correct optimisations are made to the software by ONT. I'm very interested to see if ONT can get there with the Mk1c, if the older Jetson TX2 can pull it off it will be amazing! There are a couple of points of interest that arise here for me: * (this one I've touched on) are ONT merely disabling live GPU basecalling currently on the Mk1c and calling this 'sketch' mode - that is my current hunch but I would love to have confirmation. * if the above is true (even if it's not), the MinIT has the exact same compute hardware under the hood as the Mk1c and I have no doubt that it is capable of running adaptive sampling. I'm not suggesting that people with these devices go out and tinker with them, but I would love to get my hands on a MinIT and see how far it could be pushed - it could be at the very least made to run 'true' adaptive sampling with no live basecalling enabled - a 'feature' that I'm sure many MinIT owners would love to have (plus one that would save them a very expensive 'upgrade' fee to the Mk1c...). * I'm also exploring the option of pairing multiple NX modules/boards together. It should be feasible to have one NX run MinKNOW with adaptive samping and another run Guppy basecall server, to which the live basecalling could be offloaded to. Anyway, that's a bit more of a detailed run through of the journey I mentioned in the ONT community forum ([here](https://community.nanoporetech.com/posts/different-ui-but-using-sam) if you have access). I try to make as much as I can more freely available, hence these write ups that end up on GitHub, Gists or HackMD. Hopefully this has been helpful and/or an enjoyable read. As always, I'll update this document with anything in terms of new developments or corrections etc. Thanks for reading. ----- ## After thoughts I noted after the fact that the original script I 'played' with (`ont-system-id`) can actually be used to 'hard reset'/change the device to something else using the `--system` flag (see below). Since the Xavier AGX is "NONE" I need to try setting the NX to the same ("NONE") and hopefully we'll see the option for Adaptive Sampling magically appear in the MinKNOW UI - this would make the process I have explained above obsolete and would be much easier. ```shell $ platform/bin/ont-system-id --help Usage: ont-system-id [options] Options: -h, --help show this help message and exit -f FILE, --file=FILE read config from FILE -c string, --code=string Tell me details for a specific code -s SYSTEM, --system=SYSTEM force system type -p, --print Print system codes -q, --quiet don't print status messages to stdout ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully