run_GATK: 'Run GATK job on farm'

Description Usage Arguments Details Value Examples

View source: R/run_GATK.R

Description

GATK Best Practices: recommended workflows for variant discovery analysis.

Usage

1
2
3
4
5
6
7
run_GATK(inputdf,
  ref.fa = "~/dbcenter/Ecoli/reference/Ecoli_k12_MG1655.fasta",
  gatkpwd = "$HOME/bin/GenomeAnalysisTK-3.5/GenomeAnalysisTK.jar",
  picardpwd = "$HOME/bin/picard-tools-2.1.1/picard.jar", minscore = 5,
  markDup = TRUE, addRG = FALSE, realignInDels = FALSE,
  indels.vcf = "indels.vcf", recalBases = FALSE, dbsnp.vcf = "dbsnp.vcf",
  email = NULL, runinfo = c(FALSE, "bigmemh", 1))

Arguments

inputdf

An input data.frame for fastq files. Must contains fq1, fq2, out (and/or bam). If inputdf contained bam, bwa alignment will be escaped. Additional columns: group (group id), sample (sample id), PL (platform, i.e. illumina), LB (library id), PU (unit, i.e. unit1). These strings (or info) will pass to BWA mem through -R.

ref.fa

The full path of genome with bwa indexed reference fasta file.

gatkpwd

The absolute path of GenomeAnalysisTK.jar.

picardpwd

The absolute path of picard.jar.

minscore

Minimum score to output, default=5, [bwa 30]. It will pass to bwa mem -T INT.

markDup

Mark Duplicates, default=TRUE.

addRG

Add or replace Read Groups using Picard AddOrReplaceReadGroups, default=FALSE.

realignInDels

Realign Indels, default=FALSE. IF TRUE, a golden indel.vcf file should be provided.

indels.vcf

The full path of indels.vcf.

recalBases

Recalibrate Bases, default=FALSE. IF TRUE, a golden snps.vcf file should be provided.

dbsnp.vcf

The full path of dbsnp.vcf.

email

Your email address that farm will email to once the jobs were done/failed.

runinfo

Parameters specify the array job partition information. A vector of c(FALSE, "bigmemh", "1"): 1) run or not, default=FALSE 2) -p partition name, default=bigmemh and 3) –cpus, default=1. It will pass to set_array_job.

Details

see more detail about GATK: https://www.broadinstitute.org/gatk/guide/bp_step.php?p=1

idxing: bwa index Zea_mays.AGPv2.14.dna.toplevel.fa

module load java/1.8 module load bwa/0.7.9a

local programs: bwa Version: 0.7.5a-r405 picard-tools-2.1.1 GenomeAnalysisTK-3.5/

Value

return a batch of shell scripts.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
inputdf <- data.frame(fq1="fq_1.fq", fq2="f1_2.fq", out="mysample",
                 group="g1", sample="s1", PL="illumina", LB="lib1", PU="unit1")

run_GATK(inputdf,
         ref.fa="~/dbcenter/Ecoli/reference/Ecoli_k12_MG1655.fasta",
         gatkpwd="$HOME/bin/GenomeAnalysisTK-3.5/GenomeAnalysisTK.jar",
         picardpwd="$HOME/bin/picard-tools-2.1.1/picard.jar",
         markDup=TRUE,
         realignInDels=FALSE, indels.vcf="indels.vcf",
         recalBases=FALSE, dbsnp.vcf="dbsnp.vcf",
         email=NULL, runinfo = c(FALSE, "bigmemh", 1))

yangjl/farmeR documentation built on May 4, 2019, 2:28 p.m.