Menu

DriverScripts

Robert Kofler

Introduction

We generated a couple of shell scripts that allow automatizing some workflows with PoPoolationTE2.
This is an advanced topic, so it would help if you have read the manual before and completed the [Walkthrough].
The driver scripts are provided as shell scripts.

The driver scripts

First steps: configuration

Before the driver scripts can be used it is necessary to edit them and fill in the common options.
The user needs to provide the absolute path to the bwa, samtools, PoPoolationTE2 (the jar), the TE-merged-reference and the TE-hierarchy. Editing can be done with any text editor (eg TextWrangler, vi, emacs).

At the beginning of each driver script you will find the following section. Please fill in with the correct values:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/zsh
#######################################################################
################# CONFIGURATION OF SHELL SCRIPT  ######################
################# PLEASE EDIT THE FOLLOWING      ######################

# Note path to samtools and bwa have to be provided; This makes the analysis
# more reproducible
# path to samtools
samtools="/Volumes/Temp/Robert/programs/samtools-1.2/samtools"

# path to bwa
bwa="/Volumes/Temp/Robert/programs/bwa-0.7.4/bwa"

# threads for bwa
threads=8

# path to the PoPoolationTE2.jar; replace the example with the correct value
popte2="/Volumes/Temp/Robert/programs/popte2/popte2.jar"

# path to the TE-merged-reference; replace the example with the corret value
refg="/Volumes/Temp2/Robert/pop2simulations/refg/chasis1M/chasis1Mtes.fasta"

# path to the TE-hierarchy; replace the example with the correct value
hier="/Volumes/Temp2/Robert/pop2simulations/resources/tehier-ml100noS4.fasta"

##################### END OF CONFIGURATION PART ######################
##################### DO NOT EDIT FROM HERE ON #######################
######################################################################

run-map.sh

Driver script for automating mapping. Download here https://sourceforge.net/projects/popoolation-te2/files/driver-scripts/run-map.sh/download

First update the configuration (see above) and than run the script like in the following example:

zsh run-map.sh input_1.fastq.gz input_2.fastq.gz outputdir
  • parameter1: first fastq file (may be zipped)
  • parameter2: second fastq file (may be zipped)
  • parameter3: output directory
    The result is outputdir/map-pe.sort.bam

run-popte2.sh

Driver script for automated TE identification with PoPoolationTE2 using default parameters; Download script here https://sourceforge.net/projects/popoolation-te2/files/driver-scripts/run-popte2.sh/download

First update the configuration (see above) and than run the script like in the following example:

zsh run-popte2.sh input.sort.bam outputdir 2
  • parameter1: a sorted bam file containing paired-end reads mapped to a TE-merged-reference
  • parameter2: the output directory
  • parameter3: the minimum count for TE identification
    The results is outputdir/tes.finalresult.txt

run-map-popte2

Driver script for automated mapping of reads and TE identification with PoPoolationTE2 using default parameters; Download the script here https://sourceforge.net/projects/popoolation-te2/files/driver-scripts/run-map-popte2.sh/download

First update the configuration (see above) and than run the script like in the following example:

zsh run-map-popte2.sh input_1.fastq.gz input_2.fastq.gz outputdir 2
  • parameter1: first fastq file (may be zipped)
  • parameter2: second fastq file (may be zipped)
  • parameter3: output directory
  • parameter4: the minimum count for TE identification
    The result is outputdir/tes.finalresult.txt

run-map-subs-popte2.sh

Driver script for automated mapping of reads, subsampling of ppileup files and TE identification with PoPoolationTE2 using default parameters. Download the script here https://sourceforge.net/projects/popoolation-te2/files/driver-scripts/run-map-subs-popte2.sh/download

First update the configuration (see above) and than run the script like in the following example:

zsh run-map-subs-popte2.sh input_1.fastq.gz input_2.fastq.gz outputdir 2 50
  • parameter1: first fastq file (may be zipped)
  • parameter2: second fastq file (may be zipped)
  • parameter3: output directory
  • parameter4: the minimum count for TE identification
  • parameter5: the target coverage for subsampling the ppileup file
    The result is outputdir/tes.finalresult.txt

Related

Wiki: Home
Wiki: Walkthrough

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.