...
First, we'll run breseq on a small data set to be sure that it is installed correctly, and to get a taste for what the output looks like. This sample is a mixed population of bacteriophage lambda that was co-evolved in lab with its E. coli hosts.
Data
The data files for this example are in the path:
Code Block |
---|
$BI/ngs_course/lambda_mixed_pop/data
|
Copy this directory to a new directory called BDIB_breseq in your $SCRATCH
space and cd
into it.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
cds
mkdir BDIB_breseq_lambda
cp $BI/ngs_course/lambda_mixed_pop/data/* BDIB_breseq_lambda
cd BDIB_breseq_lambda
ls |
If the copy worked correctly you should see the following 2 files:
File Name | Description | Sample |
---|---|---|
| Single-end Illumina 36-bp reads | Evolved lambda bacteriophage mixed population genome sequencing |
| Reference Genome | Bacteriophage lambda |
Running breseq
Because this data set is relatively small (roughly 100x coverage of a 48,000 bp genome), a breseq run will take < 5 minutes. Submit this command to the TACC development queue or run on an idev node.
Code Block | ||||
---|---|---|---|---|
| ||||
breseq -j 12 -r lambda.gbk lambda_mixed_population.fastq > log.txt
|
A bunch of progress messages will stream by during the breseq run which would be lost on the compute node if not for the redirection to the log.txt file. The output text details several steps in a pipeline that combines the steps of mapping (using SSAHA2), variant calling, annotating mutations, etc. You can examine them by peeking in the log.txt
file as your job runs using tail -f
. The -f
option means to "follow" the file and keep giving you output from it as it gets bigger. You will need to wait for your job to start running before you can tail -f log.txt
.
The command that we used contains several parts with the following explanations:
part | puprose |
---|---|
-j 12 | Use 12 processors (the max available on lonestar nodes) |
-r lambda.gbk | Use the lambda.gbk file as the reference to identify specific mutations |
lambda_mixed_population.fastq | breseq assumes any argument not preceded by a - option to be an input fastq file to be used for mapping |
> log.txt | redirect the output the log.txt file |
...
Environment
To set your profile up to run breseq, we need to add "module load bowtie/2.1.0" to your profile.
Code Block | ||||
---|---|---|---|---|
| ||||
cdh #move to your home directory
echo "module load bowtie/2.1.0" >> .profile #this command updates your profile to automatically load the bowtie module |
After you've completed these commands, exit lonestar and re log in to re run your profile.
Data
The data files for this example are in the path:
Code Block |
---|
$BI/ngs_course/lambda_mixed_pop/data
|
Copy this directory to a new directory called BDIB_breseq in your $SCRATCH
space and cd
into it.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
cds
mkdir BDIB_breseq_lambda
cp $BI/ngs_course/lambda_mixed_pop/data/* BDIB_breseq_lambda
cd BDIB_breseq_lambda
ls |
If the copy worked correctly you should see the following 2 files:
File Name | Description | Sample |
---|---|---|
| Single-end Illumina 36-bp reads | Evolved lambda bacteriophage mixed population genome sequencing |
| Reference Genome | Bacteriophage lambda |
Running breseq
Because this data set is relatively small (roughly 100x coverage of a 48,000 bp genome), a breseq run will take < 5 minutes. Submit this command to the TACC development queue or run on an idev node.
Code Block | ||||
---|---|---|---|---|
| ||||
idev #idev starts an "interactive development" mode which allows you to run computationally intensive tasks
breseq -j 12 -r lambda.gbk lambda_mixed_population.fastq > log.txt
|
A bunch of progress messages will stream by during the breseq run which would be lost on the compute node if not for the redirection to the log.txt file. The output text details several steps in a pipeline that combines the steps of mapping (using SSAHA2), variant calling, annotating mutations, etc. You can examine them by peeking in the log.txt
file as your job runs using tail -f
. The -f
option means to "follow" the file and keep giving you output from it as it gets bigger. You will need to wait for your job to start running before you can tail -f log.txt
.
The command that we used contains several parts with the following explanations:
part | puprose |
---|---|
-j 12 | Use 12 processors (the max available on lonestar nodes) |
-r lambda.gbk | Use the lambda.gbk file as the reference to identify specific mutations |
lambda_mixed_population.fastq | breseq assumes any argument not preceded by a - option to be an input fastq file to be used for mapping |
> log.txt | redirect the output the log.txt file |
Looking at breseq predictions
breseq will produce a lot of directories beginning 01_sequence_conversion
, 02_reference_alignment
, ... Each of these contains intermediate files that can be deleted when the run completes, or explored if you are interested in the inner guts of what is going on. More importantly, breseq will also produce two directories called: data
and output
which contain files used to create .html output files and .html output files respectively. The most interesting files are the .html files which can't be viewed directly on lonestar. Therefore we first need to copy the output
directory back to your desktop computer.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
cds mkdir BDIB_breseq_coli_clones cp -v $BI/ngs_course/ecoli_clones/data/* BDIB_breseq_coli_clones cd BDIB_breseq_coli_clones |
...
Expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Examining breseq results
...
This will likely sit for some time in the launcher que, making it a good opportunity to work through the interrogating launcher queue portion of our linux tutorial if you didn't get the opportunity to earlier. |
Examining breseq results
Exercise: Can you figure out how to archive all of the output directories and copy only those files (and not all of the very large intermediate files) back to your machine? - without deleting any files?
...
breseq includes a few utility commands that can be used on any BAM/FASTA set of files to draw an HTML read pileup or a plot of the coverage across a region.
It's easiest to run these commands from inside the main output directory (e.g., output_20K
) of a breseq run. They use information in the data
directory.
Code Block |
---|
breseq bam2aln NC_012967:237462-237462
breseq bam2cov NC_012967:2300000-2320000
|
Additionally, the files in the data
directory can be loaded in IGV if you copy them back to your desktop.
Optional Exercise: Running breseq in mixed population mode
The phage lambda data set you examined is actually a mixed population of many different phage lambda genotypes descended from a clonal ancestor. You ran breseq in a mode where it predicted consensus mutations in what it thinks is one uniform haploid genome. Actually, some individuals in the population have certain mutations and others do not, so you might have noticed when you looked at some of the alignments that there was a mixture of bases at a position.
We will talk more about analyzing mixed population data to predict rare variants in a later lesson. However, if you're curious you can now experimental with running breseq in a mode where it estimates the frequencies of different mutations in the population. This process is most accurate for single nucleotide variants. Mutations at intermediate frequencies are not (yet) predicted for all classes of mutations like large structural variants.
Code Block |
---|
login1$ breseq --polymorphism-prediction --polymorphism-no-indels -r lambda.gbk lambda_mixed_population.fastq |
The option --polymorphism-prediction
turns on these mixed population predictions. The option --polymorphism-no-indels
turns off predictions of small insertions and deletions (which don't work as well for reasons too complicated to explain here). You're welcome to also try it without this option.
Copy the resulting output
directory back to your computer and examine the HTML output in a web browser. Compare it to the output from before.
It's easiest to run these commands from inside the main output directory (e.g., output_20K
) of a breseq run. They use information in the data
directory.
Code Block |
---|
breseq bam2aln NC_012967:237462-237462
breseq bam2cov NC_012967:2300000-2320000
|
Additionally, the files in the data
directory can be loaded in IGV if you copy them back to your desktop.
Optional: Install breseq
We have already installed breseq in $BI/bin
for the purpose of this tutorial. You are welcome to continue using it for your own work, or use the installation options we present here to install or update to newer versions as needed.
...