Microbiology, Metagenomics and Bioinformatics

Johan Bengtsson-Palme, University of Gothenburg

Browsing Posts in Teaching

I will give a short talk on our findings related to antibiotic resistance associated with pharmaceutical production facilities in India at a one-hour webinar arranged by Healthcare Without Harm, taking place on Thursday, November 3rd, 10.00 CET. The webinar will discuss “hot-spot” environments in which antimicrobial resistance can emerge, such as areas in which there are poor pharmaceutical manufacturing practices, where expired or unused drugs are disposed of in an inappropriate way (i.e. by flushing them down the toilet or sink, or disposing them in household rubbish), and areas in which pharmaceuticals are used for aquaculture or agriculture. This is an important aspect of the resistance problem, but to date most of the actions taken to tackle the spread of AMR don’t take into account this aspect of antimicrobials released into the environment. The webinar is co-organised by HCWH Europe and HCWH Asia, and aims to raise awareness about the issue of AMR and its environmental impact. It features, apart from myself, Lucas Wiarda (Global Marketing Director & Head of Sustainable Antibiotics Program at DSM Sinochem Pharmaceuticals) and Sister Mercilyn Jabel (Pharmacist at Saint Paul Hospital Cavite, Philippines).

Sign up here to learn about:

  • Antibiotic pollution and waste
  • Recent findings from India regarding antibiotic discharges in rivers from manufacturers and new mechanisms by which resistance spreads in the environment
  • Sustainable antibiotics – how to support the proper and effective use of antibiotics and their responsible production
  • How the pharmaceutical industry is addressing the environmental pollution that leads to AMR
  • The best practices in managing infectious waste at hospital level

Science for Life Laboratories (SciLifeLab) in Stockholm will host a metagenome data analysis workshop on May 21-23, in which I will participate as a tutorial assistant. Additionally, our group leader Joakim Larsson will be giving a lecture about how we use metagenomics to assess the environmental reservoir of antibiotic resistance genes (much of my recent work will likely go into that). I hope to meet you there, so don’t forget to register!

Confirmed speakers:
Lex Nederbragt, Oslo University, Norway
Saskia Smits, Erasmus University Rotterdam, Netherlands
Joakim Larsson, Göteborg University, Sweden
Paul Wilmes, University of Luxembourg, Luxembourg
Anders Andersson, SciLifeLab, Sweden
Noan Le Bescot, UPMC (Tara expedition), France

The workshop is part of the AllBio Bioinformatics initiative.

Those attending the Metagenomics lab (part of the basic NGS course for PhD students given at GU this week), can find the material for the lab on this page:
http://microbiology.se/ngs-metagenomics-lab/
Of course, the page is open for anyone else as well, although you won’t get the support that the GU students are given.

One potential use for Metaxa (paper) is to include it in a pipeline for classification of SSU rRNA in metagenomic data (or other environmental sequencing sets). However, as Metaxa is provided from this site, it only classifies SSUs to the domain level (archaea, bacteria and eukaryotes, with the addition of chloroplasts and mitochondria). It is also able to do some (pretty rough) species guesses using the “--guess_species T” option. An easy solution to implement would be to pass the Metaxa output, e.g. “metaxa_output.bacteria.fasta” to BLAST, and compare all these sequences to the sequences in e.g. the SILVA or GreenGenes database. There is, however, a way to improve this, which uses Metaxa’s ability to compares sequences to custom databases. In this tutorial, I will show you how to achieve this.

Before we start, you will of course need to download and install Metaxa, and its required software packages (BLAST, HMMER, MAFFT). When you have done this, we can get going with the database customization. I will in this tutorial use the SILVA database for SSU classification. However, the basic idea for the tutorial should be easily applicable to GreenGenes and other rRNA databases as well.

  1. Visit SILVA through this link, and download the file named “SSURef_106_tax_silva.fasta.tgz”. The file is pretty big so it may take a while to download it. If you’re running Metaxa on a server, you’ll have to get the SILVA-file to the server somehow.
  2. Unzip and untar the file (Mac OS X makes this neatly by doubleclicking the file, on linux you can do it on the command line by typing “tar -xvzf SSURef_106_tax_silva.fasta.tgz“). This will give you a FASTA-file.
  3. The FASTA-file needs to be prepared a bit for Metaxa usage. First, we need to give Metaxa identifiers it can understand. Metaxa identifies sequences’ origins by the last character in their identifier, e.g. “>A16379.1.1496.B”. Here, “.B” indicates that this is a bacterial sequence. We are now going to use the unix command sed to process the file and insert the appropriate identifiers.
    1. We begin with the archaeal sequences. To get those straight, we type:
      sed "s/ Archaea;/.A - Archaea;/" SSURef_106_tax_silva.fasta > temp1
      Notice that we direct the output to a temporary file. It is bad practice to replace the input file with the output file, so we work with two temp-files instead.
    2. The next step is also easy, now we find all eukaryote sequences and add E:s to the identifiers:
      sed "s/ Eukaryota;/.E - Eukaryota;/" temp1 > temp2
    3. Now it becomes a little more complicated, as SILVA classes mitochondrial and chloroplast SSU sequences as subclasses of bacteria. However, there is a neat little trick we can use. First we do the same with the bacterial sequences as with the archaeal and eukaryote:
      sed "s/ Bacteria;/.B - Bacteria;/" temp2 > temp1
    4. Now, we can use two a little more complicated commands to annotate the mitochondrial and chloroplast sequences:
      sed "s/\.B - \(Bacteria;.*;[Mm]itochondria;\)/.M - \1/" temp1 > temp2
      sed "s/\.B - \(Bacteria;.*;[Cc]hloroplast;\)/.C - \1/" temp2 > temp1
    5. We also need to get “rid” of the unclassified sequences, by assigning them to the “other” origin (O):
      sed "s/ Unclassified;/.O - Unclassified;/" temp1 > temp2
  4. That wasn’t too complicated, was it? We can now check the number of different sequences in the file by typing the pretty complicated command:
    grep ">" temp2 | cut -f 1 -d " " | rev | cut -f 1 -d "." | sort | uniq -c
    If you have been working with the same files as me, you should now see the following numbers:
    23172 A
    471949 B
    3712 C
    55937 E
    534 M
    226 O
  5. At this stage, we need to remove the full taxonomy from the FASTA headers, as Metaxa cannot handle species names of this length. We do this by typing:
    sed "s/ - .*;/ - /" temp2 > temp1
  6. We can now change the temp-file into a FASTA file, and delete the other temp-file:
    mv temp1 SSURef.fasta
    rm temp2
  7. We now need to configure Metaxa to use the database. First, we format a BLAST-database from the FASTA-file we just created:
    formatdb -i SSURef.fasta -t "SSURef Metaxa DB" -o T -p F
  8. With that done, we can now run Metaxa using this database instead of the classification database that comes with the program. By specifying that we want to guess the species origin of sequences, we can get (as accurate as SILVA lets us be) which species each sequence in our set come from. We do this by using the -d and the --guess_species options:
    metaxa -i test.fasta -d SSURef.fasta -o TEST --guess_species T --cpu 2
    The input in this case was the test file that comes with Metaxa. Note also that we’re using two CPUs to get multithreaded speeds. Remember that you must provide the full (or relative) path to the database files we just created, if you are not running Metaxa from the same directory as the database resides in.
  9. The output should now look like this (taken from the bacterial file):
    >coryGlut_Bielefeld_dna Bacterial 16S SSU rRNA, best species guess: Corynebacterium glutamicum
    CGAACGCTG...
    >gi|116668568:792344-793860 Bacterial 16S SSU rRNA, best species guess: Arthrobacter sp. J3.40
    TGAACGCTG...
    >gi|117927211:c1399163-1397655 Bacterial 16S SSU rRNA, best species guess: Acidothermus cellulolyticus
    >CGAACGCTG...

    And so on. As you can see the species names are now located at the end of each definition line, and can easily be extracted using sed, e.g. “grep ">" TEST.bacteria.fasta | sed "s/.*: //"“.

And that’s it. It’s pretty simple, and can easily be scripted. In fact, I have already made the bash script for you. That means that the short version is, download the script, download the sequence file from SILVA, move into the directory you have downloaded the file to and run the script by typing: ./prepare_silva_for_metaxa.sh

A few notes at the end. The benefit of using this approach is that we maintain the sorting capabilities, marking of uncertain sequences and error checking of Metaxa, but we don’t have to add another BLAST step after Metaxa has finished. However, as this database we create is a lot bigger than the database that comes with Metaxa, the running time of the classification step will be substantially longer. This is in most cases acceptable, as that time is the same as the time it would have taken to run BLAST on the Metaxa output. It should also be noted that this approach limits Metaxa’s ability of classifying 12S sequences, as there are no such sequences in SILVA. Good luck with classifying your metagenome SSUs (and if you use Metaxa in your research, remember to cite the paper)!

The time is running out if you want to attend to the workshop session on mapping signal transduction, hosted by Stefan Hohmann and Marcus Krantz, which I will take part in. Deadline is on the 15 of May, so register soon if you have not already done. You can find all important info here.

The workshop will take place on June 29:th, between 13.00 and 15.30. The goal is to show some visualisation strategies for signal transduction pathways, and how to use pathway maps as a base to create mathematical models. There will be a brief introduction to mapping and modelling and to the software used (Cytoscape, CellDesigner). This will be followed by independent work with a set of small case studies that demonstrates the basic methodology. I will take part in answering questions and assisting during the case study part.