Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleReload the module version of samtools which is the correct one for the tutorial.

Simply reload samtools using the module system, check the version, and which version is now being used.

Code Block
languagebash
titlestill stuck?
collapsetrue
module load samtools
samtools  # check output for version information
which samtools
 
#required output:
/opt/apps/samtools/1.3/bin/samtools

I

Warning
titleAs alluded to in the introduction, this tutorial is designed to run (and will actually only run) with one of these 2 versions. That version is the version that is included with breseq in the BioITeam distrubtionmodule version. At the end of this tutorial there is an optional tutorial using the module suggestion to try to use the bioITeam version of samtools, but for now...

execute the following 2 commands command and make sure you get the 3rd 2nd line as output:

No Format
tacc:~$ module unload samtools
tacc:~$ which samtools
/corral-replopt/utexasapps/BioITeamsamtools/breseq1.3/bin/samtools

If you see something different get our attention or the tutorial will not work.

Prepare your directories

Since the $SCRATCH directory on lonestar is effectively infinite for our purposes, we're going to copy the relevant files from our mapping tutorial into a new directory for this tutorial. This should help you identify what files came from what tutorial if you look back at it in the future. Let's copy over just the read alignment file in the SAM format and the reference genome in FASTA format to a new directory called BDIB_samtools_tutorial.

...

Expand
titleOptional: For the data we are dealing with, predictions with an allele frequency not equal to 1 are not really applicable. (The reference genome is haploid. There aren't any heterozygotes.) How can we remove these lines from the file?

Try looking at grep --help to see what you can come up with.

Code Block
languagebash
titleHere for answer
collapsetrue
grep -v *something*  # The -v flag inverts the match effecitvely showing you everything that does not match your input
Expand
titleGoing farther
Code Block
cat SRR030257.vcf | grep AF1=1 > SRR030257.filtered.vcf

Is not practical, since we will lose vital VCF formatting and may not be able to use this file in the future for formats which require that formatting.

Code Block
cat SRR030257.vcf | grep -v AF1=0 > SRR030257.filtered.vcf

Will preserve all lines that don't have a AF=0 value and is one way of doing this.

Code Block
sed -i '/AF1=0/ d' SRR030257.vcf

Is a way of doing it in-line and not requiring you to make another file. (But it writes over your existing file!)

Optional Exercises at the end of class or for Wednesday/Thursday choose your own tutorial time.

Calling variants in reads mapped by BWA or the improved read quality reads

...

As suggested in the initial introduction, the point of this optional tutorial is to work through getting a different version of samtools to work (the command line expectations and flags are not as they were , flags, and subcommands (ie bcftools call) were not what they are now in version 0.1.18). To make sure you are starting in the right place:

No Format
tacc:~$ module loadunload samtools
tacc:~$ which samtools
/optcorral-repl/appsutexas/samtoolsBioITeam/1.3breseq/bin/samtools

 
mkdir BDIB_samtools_old_version_tutorial
cd BDIB_samtools_old_version_tutorial
cp $SCRATCH/BDIB_bowtie2_mapping/bowtie2/SRR030257.sam .
cp $SCRATCH/BDIB_bowtie2_mapping/NC_012967.1.fasta .

Good luck, and remember if you undertake this and get frustrated with it, it is a great learning experience and is by far the most difficult thing you will attempt. As part of the learning experience, feel free to contact us with any questions or problems you are specifically having with it, but cookbooked suggestions would defeat the intended purpose of beating your head against the problem to figure it out. You DO have the necessary skills to figure out how to do this now.Return to GVA2016  

Expand
titleA final hint

Last year's class did this tutorial in the opposite manner where the 0.1.18 version was given as the walkthrough rather than the 1.3 version. We strongly suggest you use that tutorial only as a way to check your answers, and hence the lack of a link to that tutorial.

 

Return to GVA2017 course page.