NMR

Automating with Topspin - A Primer

If you’ve ever had to get figures ready for a paper, present data to your group, or even just process a large amount of NMR data, you’ve probably found a lot of NMR data processing to be… repetitive. Luckily, you’re not the only one! Automating the small tasks - like FT, or zero-filling, or peak picking a specific region in your data could take minutes to set up and save you hours of work. As an added bonus, if you hard code these in as Macros, your processing will be specific for your data and consistent across all data you’re working with.

So, the first question when processing is, “Can I automate this”. For a good 80% of processing, absolutely. Many labs have their own Macros set up for automatic FT, phase correction, and NUS reconstruction for 2D+ data - but this all is specific to who your facilities manager is, what tasks they saw fit to automate, and so on. If your looking at a pile of metabolomics 1D data, you’d be hard pressed to find a justification for doing these basic commands individually.

Before we jump in - there is a limit. I found this limit, repeatedly, when I was attempting to peak pick metabolomics 2D data. If you asked me if it could be done, I’d say yes - but I’d also say that it involves a lot more than what you may consider. For that reason, I have largely abandoned this single task in my automation pipelines and have opted for hand picking my data. However, if you’re working with pure molecules in a reasonable concentration, this is a much easier task. When I was originally looking into ways to make this a feasible task, a discussion between Clemens Anklin and John Hollerton put forth the idea of 80:20 confidence - that for around 80% of cases of automation, it’s possible to get great results, the other 20%, however, might prove challenging. For this reason, you should always manually check your data after an automated pipeline. In fact… you could even automate this…. but I digress.

Over the next few posts, I hope to shed some light on how to automate your NMR processing using Topspin. There exists some automation documentation in the Topspin Manual, but for the average user, the information can be overwhelming and it can take days of working through it to automate your first task. This is NOT a criticism! They are highly detailed and contain a lot of information that might be of interest. After these small blog posts, my hope is that you’ll be able to get started with automation in under 30 minutes and then progress to the manuals to fill in the gaps - once you know what you’re looking for, it’s easier to find.

Types of Automation

Topspin contains (at least) 3 different ways to automate your processing - and it’s accessible to all users, even on an academic license.

They are:

  • Macro Scripts

  • Python (Yes, REAL Python!)

  • Au Scripts/Macros

For the average user who knows nothing of coding, the simplest way to get started is by using Macros. I say this because when you program a macro in Topspin, you simply replace the human with a series of commands - if you already type things into the command line in topspin, you already know how to do it.

Other users, such as myself, who are familiar with Python will rejoice to learn that the python scripting in topspin can be used to read/write files - such as peak lists - or perform calculations on data and export the results. This can save you a massive amount of time in ensuring you have the right peak lists saved with the right file names in the right places, and if you already know basic python, Topspin’s python is really easy to use.

The last type, Au Scripts, are higher level programming scripts that must be compiled before execution. The code used recognizes topspin commands and C-language functions. The benefit, of course, is that it is extremely adaptable and very fast when compared head to head with python and it carries the same ability to export data easily. However, if you’ve not used a C based language, it can take some getting used to.

There are other factors that play into what to decide to automate with, but I find that people use the tools they’re already familiar with - we all have a toolbox filled with screwdrivers, but we all have a favorite (mine happens to be an old Craftsman given to me by my grandfather). MestreNova has it’s own scripting ability, but I will not be going into this toolchest - it’s someone else’s set.

I hope to create a post every Tuesday for the next 3 weeks to highlight each of these options, how to use them, and some simple scripts to get you started.

NMR Sample Prep - Tips and Tricks Vol. 1

Simply put, you’re not going to get good data from a bad sample.

This is especially true when you are:

  • Sample Restricted (low amounts)

  • Working with mixtures

  • Live in a temperate rainforest….

So, it took me about 4 months of my life to chase down the sources of problems in my process when I was devising MADByTE. The number 1 problem: Water. Since we were working with DMSO, this solvent takes up water in almost real time - or real time if you live in Vancouver… So I spent a long time trying to minimize this problem based off of some tips from my lab mates. I’ve highlighted these tips alongside my process for getting samples ready to for the NMR.

Sample Limited? Use a Shigemi Tube.

It should be noted, we have a 5mm probe in our instruments. This is my experience with our instruments.

Shigemi Tubes are fantastic specialty NMR tubes that allow for you to manipulate the amount of solvent present in your mixture. Think of it this way - you have 200ug of your compound, and it’s in 550uL of solvent… You may not get a very good signal because the reciever gain is being set by the solvent peak (or…in Vancouver… the water peak). How can you get around this when you don’t have any more sample? Shigemi Tubes.

Shigemi Tubes are ‘matched’ to solvents which means that they are essentially invisible chunks of glass that your magnet can shim to. This means you can concentrate your sample in considerably less solvent and get an increased return on signal with the same mass of the sample. Cool right? Here’s a quick figure to show what I mean. Shigemi tubes essentially give you a huge boost in your signal coming from your compound when compared to the standard 5mm tube because you’re using the shape of the tube (and matched glass) to shim and solvent instead of just solvent with your precious compound floating outside of the detection coil! We’ve been able to minimize the amount of solvent we use to around 280uL for a Shigemi tube, but you can go lower if you don’t mind manual shimming.

 
NMR_Tube_Comparison.png
 

We’ve also tested 3mm tubes in a 5mm probe, and have found different results than other groups that claim it works well. Personally, I find that the ease of working with Shigemi tubes far outweighs the hassle of using a 3mm tube, and we find that the signal response from a sample in a given concentration is better using a shigemi tube. If you have the ability to use a 3mm tube, try it out. You may have different results.

Keeping Water Out

This is the big one for DMSO work. There are a few straight up recommendations that I can make that will help.

Use ampoules instead of larger bottles of solvent

This one is fairly obvious, but could be a more expensive option. If you don’t have to keep your solvents in a super dry environment or if you don’t have to constantly re-open them, it’s a win! Ampoules can be more expensive than their bulk option, but as a recommendation, you might want to reach out to several companies for bulk pricing. I’ve worked with one company in particular which was able to give us ampoules for less than their volumetric equivalent in bulk from standard suppliers. I’m not advertising - so just email me for the company name. As a bonus, they were able to get all of our ampoules from the exact same batch which means that they are very well suited for qNMR applications.

Place your samples AND NMR tubes on a schlenk line/high vac

You wouldn’t believe how much water can stick to glass - which is why a lot of labs keep their NMR tubes in the oven. Firstly, you shouldn’t do this. The NMR tubes can slowly warp over time due to glass being an amorphous solid - placing them in a hot environment can exacerbate this effect to the point of it being a noticeable problem. So dry the other way… vacuum! Synthetic labs usually have a spare schlenck line around, so you can simply put your NMR tubes and samples under vacuum with one of those. We then back-fill with Argon since it is heavier than atmospheric air and arrives dry - so water vapor has less of a fighting chance to be a problem there.

Use Glass Pipettes - But differently than you may think…

This is a way to quantitatively transfer solvent. There are a few ways to do it, but for now, think about how you prep a standard NMR sample. You’re not using plastic pipette tips right? Plastic leaching aside, wouldn’t it be great if you could though?

For a lot of different applications, you will want the same amount of solvent in an NMR tube - some people use Hamilton syringes to achieve this, others use a setup like the one below. However, I find that this is a good start, but I wanted more accuracy and precision. On top of that, we had a problem where the syringe was contaminated with formic acid…. so we saw formic acid in every sample we prepped with this method for quite some time….

 
pluringe.png
 

Building on this idea, but taking it in another direction, I came up with the idea to use a standard pipette to transfer as if I had a glass tip for the pipette. I’ve seen pipettes that have glass tips - non disposable and expensive tips - but we didn’t have access to those… Not to make it more complicated than it should be, I simply stuck a pipette onto a pipette - tested it for accuracy and precision - and was quite surprised by the results. Using the graduation of the standard pipette, I was able to achieve quantitative transfer of my samples and was using disposable glass pipettes as the tips. A cheap fix to a problem.

Pipette_Post.tif.jpg

“Pull” Your Glass Pipettes To Minimize Water

If you’re not making your own TLC spotters, or if you don’t work in a microbiology lab, you may not be familiar with this step. Basically, you can take a glass pipette (super inexpensive) and with a few seconds under a blowtorch or Bunsen burner, heat it up and ‘pull’ the pipette. This causes the glass to be pulled very thin - great for creating longer pipettes (the long ones are actually more expensive!). The new pipette is longer, and has a ‘bulb’ at the end of it, so simply break it in the middle and use the top half.

Breaking_Pipette.png

When you put everything together, you’ll find that not only are your spectra more clear (less water in the spectra), but you’ll be able to shim in considerably faster times by saving a shim file to your custom filling and starting your shimming from that point. Since your sample geometry is roughly the same, you’ll stand a good chance at completing shimming even faster.

Safety Notes:

  • When pulling pipettes, don’t wear disposable gloves, as these can melt to your hands and cause a worse burn than the fire itself may.

  • When working with an open flame, move all solvents away from your working space, and wear a flame retardant lab coat - 100% cotton at a minimum or Nomex if you can.

  • Ensure you’re wearing eye protection when working with the glass pipettes, as they can break small shards which have the ability to travel.

  • And lastly, the ‘pipette on a pipette’ technique creates a very long pipette. Take some time to become comfortable wielding it, and ensure you are not working too closely to others. A steady hand (or lack thereof) can make a big difference in your day.

Acknowledgements: Thanks to Jake Haeckl for taking my sketches of an NMR spinner and creating such a beautiful figure. Thanks to Kenji Kurita for not only warning me about sample prep, but giving some great tips on how to handle it. Thanks to Claire Fergusson for taking some of the photos.