Versions Compared

Key

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

...

A note on version control

As mentioned in our samtools tutorial, different versions of software behave differently. Once again we have a situation where the BioITeam bedtools is available by default (version 2.20.1), and a different version is available on lonestar (version 2.25.0). A KEY addition to version 2.21 (aka the version after that which is available to you by default through the BioITeam as of this writing) was the ability of bedtools to simultaneously scan multiple files at once rather than having to sequencially scan pairs of files. Using the old version, to identify the common variants of files A, B, C and D, bedtools would have to be invoked a minimum of 3 times:

...

Warning
titleBased on what was just said, what do you think the first 2 things you should do are?
Expand
titleNeed a hint?
  1. Different versions exist
  2. Can be very computationally intensive
Expand
titleThink you know? Check your guess...

Because different versions exist, you need to make sure that you are using the right version:

Code Block
languagebash
titleCheck that you remember how to check if you have access to a command, what version that command is, load a different version, and verify that is the version being used
collapsetrue
which bedtools  # check if you have access to bedtools
bedtools --version  # determine what version of bedtools you are using
 
# This will tell you that the bedtools you are using is in the $BI/bin directory and that you are using version v2.20.1-2-g6f0be00
 
module load bedtools  # load the TACC version of bedtools, remember module spider module avail and module list can help you find exactly what module you are looking for
which bedtools
bedtools --version
 
# This will now tell you that you are using version v2.25.0 which is located in the /opt/apps/bedtools/2.25.0/bin dreictory.

 

Because it is computationally intensive, you need to make sure you are not on the head node

Code Block
languagebash
titleCheck that you remember how to get an idev node (remember to change your reservation to day 3)
collapsetrue
# If doing this tutorial on Wednesday use:
idev  -m 180 -r CCBB_Bio_Summer_School_2016_Day35.24.17PM -A UT-2015-05-18
 
# -N 2 -n 8If doing this tutorial on Thursday use:
idev  -m 180 -r CCBB_5.25.17PM -A UT-2015-05-18
 

Surely now that you have executed the above commands nothing could possibly go wrong right?

Expand
titleHopefully you recognize the bold italic underlined sentence above as a warning that something can (and is likely about to go wrong), but if not ... something is about to go wrong, so try to figure out what that might be, and then click here to see if you are right
 If you executed the above commands in the order they are listed from the head node (say because its the first tutorial you ran today and you are not already on a n idev node) you will find that bedtools has reverted to the BioITeam location and version because when you access an idev node it reloads your .bashrc file. Always make sure you are loading tools when and where you need them, and verify their accuracy rather than assuming it. module load bedtools

...

You could do this with your own personally generated data from the SRR030257 fastq files we used in the mapping tutorialsFor now, create a new directory named BDIB_bedtools on scratch and copy the respective VCF files to it from $BI/gva_course/bedtools/:

...

Remember the above command is simply 1 possible solution there are multiple ways you could have done this, most commonly recursively copying the entire directly, or copying all the files rather than just the vcd vcf files. 

Common among all (intersect)

...

Expand
titleHint:
Remember that adding adding > output.vcf to the end of a command will pipe the output that is to the terminal into a file, so that you can save it.
Code Block
languagebash
titlePossible solution
collapsetrue
bedtools intersect -a bowtie2.vcf -b bowtie.vcf bwa.vcf -f 1.0 -header>header > all_aligners_with_header.vcf

...

Hopefully you see how these tools can be useful (if not ask). These are but 2 of the bedtools commands, take a few minutes to look through the other bedtools subcommands that are available using bedtools -h, and  bedtools other_command -h

 

Return to GVA2017