Bioinformatics Recipe Cookbook
All Projects

Filtering Sequence Alignment Maps (SAM/BAM) files.

Typically the BAM file contains all the information necessary to interpret sequencing data. For many studies, the ability to extract and isolate certain alignments using various criteria is essential. The SAM flag system, though quirky and unwieldy may be used to accomplish many of the required stages.

This recipe provides the code necessary to investigate alignment files obtained from aligning viral sequence data from the 2014 Ebola viral outbreak against the Mayinga strain observed in 1972.

The recipe operates as a statistics report that summarizes various types of alignments.

  1. Downloads the 1976 Ebola - Mayinga Reference Genome
  2. Downloads sequencing data for the 2014 outbreak
  3. Generates sequence alignments of the 2014 outbreak relative to the 1976 outbreak
  4. Investigates the resulting data and reports the number of alignments by various criteria
  5. Demonstrates how more complex queries could be formulated


A detailed presentation that explains the steps and rationale for this recipe can be found at:

Please refer to the lecture above for study materials and additional content.

Recipe Code
Recipe Interface
Interface Preview
Interface preview shows the resulting view of the combined interface elements.
Interface specification
Interface element specification. Shows the code and the resulting interface element.
Double click on an element to insert it into the interface.
Integer values
                        label = "Window size"
                        display = "INTEGER"
                        value = 100
                        range = [1, 100]
                        help = "Selects the smoothing window."
Float values
                        label = "P_Value Cutoff"
                        display = "FLOAT"
                        value = 0.05
                        range = [0, 1]
                        help = "Selects the cutoff."
Text box
                    label = "Run Number"
                    display = "TEXTBOX"
                    value = "SRR519926"
                    regex = 'SRR\d+'
                    help = "Please provide SRR Run number"
Dropdown menu
                    label = "Select color"
                    display = "DROPDOWN"
                    choices = [ ["R","Red"], ["B","Blue"] ]
                    value = "R"
                    help = "Select a color of your choice"
Check box
                    label = "Cross Validate"
                    display = "CHECKBOX"
                    value = true
                    help = "Apply cross validation on the results."
Upload Field
                    label = "Upload a file "
                    display = "UPLOAD"
                    help = "Upload a file to analyze"
Pick Data
                    label = "Pick data"
                    source = "PROJECT"
                    help = "Pick data from this project."
Radio Buttons
                    label = "Select species"
                    display = "RADIO"
                    choices = [ ["c","Cat"], ["d","Dog"] ]
                    value = "c"
                    help = "Select the species."
Edit Recipe
Recipe display name
Unique identifier for the recipe.

Determines who can run a recipe.

A detailed explanation of what the recipe does (markdown OK).
Image :
Optional image for the recipe ( 500px Maximum ).
Used to order recipes (optional).

Powered by the release 2.1