text: Most approaches for predicting structural variants require you to have paired-end or mate-pair reads. They use the distribution of distances separating these reads to find outliers and also look at pairs with incorrect orientations. As mentioned during several of the presentations, many researchers choose to ignore these types of mutations and combined with the increased difficulty of accurately identifying them, the community is less settled on the "best" way to analyze them. Here we present a tutorial on a somewhat older program SVDetect. SVDetect is a type of program that makes use of configuration files rather than command line options (something you may encounter with other programs in your own work).
  Other possible tools:
  - BreakDancer - hard to install prerequisites on TACC. Requires installing libgd and the notoriously difficult GD Perl module.
  - PEMer - hard to install prerequisites on TACC. Requires "ROOT" package.
  Good discussion of some of the issues of predicting structural variation:
  Comparison of many different SV tools
  Identify structural variants in a new data set.
  - Work with a new type of program that uses configuration files rather than entering all information on a single command at the command line. This is very similar to the queue system TACC uses making this a good introduction.
  Calling SV with SVdetect:
  Here we'll look an E. coli genome re-sequencing sample where a key mutation producing a new structural variant was responsible for a new phenotype involving citrate, something the Barrick lab has studied.
  Prepare your directories
  cp -r $BI/gva_course/structural_variation/data GVA_sv_tutorial
  This is Illumina mate-paired data (having a larger insert size than paired-end data) from genome re-sequencing of an E. coli clone.
  File Name | Description | Sample |
  | Paired-end Illumina, First of mate-pair, FASTQ format | Re-sequenced E. coli genome |
  | Paired-end Illumina, Second of mate-pair, FASTQ format | Re-sequenced E. coli genome |
  | Reference Genome in FASTA format | E. coli B strain REL606 |
  NC_012967.1.lengths | Simple tab delimtered file based on the size of the reference needed for SVDetect so you don't have to create it yourself |
  Map data using bowtie2
  First we need to (surprise!) map the data. This will hopefully reinforce the bowtie2 tutorial you just completed.
  bowtie2-build NC_012967.1.fasta NC_012967.1
  bowtie2 -t -p 64 -X 5000 --rf -x NC_012967.1 -1 61FTVAAXX_2_1.fastq -2 61FTVAAXX_2_2.fastq -S 61FTVAAXX.sam
  Possibly unfamiliar options:
  You may notice that these commands complete pretty quickly. Always remember speed is not necessarily representative of how taxing something is for TACC's head node, and always try to be a good TACC citizen and do as much as you can on idev nodes or as job submissions
  This will be the most complicated installation yet. In addition to needing to install several different programs in the same conda installation command, we will need to install perl modules through cpan. Unfortunately, the cpan network can not be accessed through the compute nodes, so you must log out of your idev session using the logout command before continuing. If you are unsure if you are in an idev session remember you can use the hostname command to check.
  Like we saw in our samtools installation, we will need to install several programs at the same time to make sure they are all going to work with each other. In addition, we are going to create a new environment for working with SVDetect as some of the dependencies of SVDetect clash with those of samtools.
  conda create --name SVDetect -c bioconda -c conda-forge -c imperial-college-research-computing _libgcc_mutex perl libgcc-ng svdetect
  cpan module installations
  If you attempt to launch cpan, you likely get a message similar to the following:
  While just typing cpan the first location was used and we saw it didn't work as we had hoped. We can explicitly launch the 2nd location by using the full path to the executable file on the prompt
  In the following block note that each elipse will include large blocks of scrolling text as different modules are downloaded and installed. The process will take several minutes in total, just be ready to execute the next command when you get the cpan prompt back.
  # choose 'yes' to do as much automatically as possible
  # choose 'local::lib' for the approach you want (as you don't have admin rights on TACC)
  # choose 'yes' to append the information to your .bashrc file
  cpan> install Config::General
  cpan> install Tie::IxHash
  cpan> install Parallel::ForkManager
  Once you quit cpan, you will get a message to restart your shell. Since you are on a remote computer, you can accomplish the same thing by logging out of TACC and sshing back in.
  Once you have logged back in, be sure to restart a new idev session, and activate your SVDetect conda environment.
  Analyze read mapping distribution
  The first step is to look at all mapped read pairs and whittle down the list only to those that have an unusual insert sizes (distances between the two reads in a pair).
  BAM_preprocessingPairs.pl -p 0 61FTVAAXX.sam
  As we discussed in our earlier presentation, SV are often detected by looking for variations in library insert sizes. The stdout of the pearl script will answer the questions:
  SVDetect demonstrates a common strategy in some programs with complex input where instead of including a lot of options on the command line, it reads in a simple text file that sets all of the required options. Lets look at how to create a configuration file:
  The following commands will take a few minutes each and must be completed in order, so no advantages/ability to have them run in the background. Consult the manual for a full description of what these commands and options are doing while the commands are running.
  SVDetect linking -conf svdetect.conf
  SVDetect filtering -conf svdetect.conf
  SVDetect links2SV -conf svdetect.conf
  Take a look at the final output file: 61FTVAAXX.ab.sam.links.filtered.sv.txt
  . Another downside of command line applications is that while you can print files to the screen, the formatting is not always the nicest. On the plus side in 95% of cases, you can directly copy the output from the terminal window to excel and make better sense of what the columns actually are
  I've highlighted a few lines below:
  chr_type SV_type BAL_type chromosome1 start1-end1 average_dist chromosome2 start2-end2 nb_pairs score_strand_filtering score_order_filtering score_insert_size_filtering final_score breakpoint1_start1-end1 breakpoint2_start2-end2
  INTRA NORMAL_SENSE - chrNC_012967 599566-601025 - chrNC_012967 663036-664898 430 100% - - 1 - -
  INTRA NORMAL_SENSE - chrNC_012967 3-2025 - chrNC_012967 4627019-4628998 288 100% - - 1 - -
  INTRA REVERSE_SENSE - chrNC_012967 16999-19033 - chrNC_012967 2775082-2777014 274 100% - - 1 - -
  Return to GVA2021 course page.