run_picard: Run Picard

Description Usage Arguments Value Examples

View source: R/run_picard.R

Description

Runs the Picard program. Curently only works for CollectRnaSeqMetrics & MarkDuplicates command

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
run_picard(
  command = NULL,
  input = NULL,
  output = NULL,
  out.dir = NULL,
  refFlat = NULL,
  rRNA.intervals = NULL,
  strand = NULL,
  remove.duplicates = FALSE,
  sample.name = NULL,
  picard = NULL
)

Arguments

command

Picard command to run, required

input

List of sorted bam files, required

output

List of output bam files, required for MarkDuplicates command

out.dir

Name of the output directory, required

refFlat

Path to the refFlat file, required for CollectRnaSeqMetrics commmand

rRNA.intervals

Path to the rRNAintrvals list file

strand

Strand-specific information, "FR" for first strand or "RF" for reverse strand, required for CollectRnaSeqMetrics commmand

remove.duplicates

Set for removing marked duplicates, boolean default set to FALSE

sample.name

List of the sample names, required

picard

Path to the Picard program, required

Value

A list with the Picard commands

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
sorted.bam.files <- list.files(path = hisat2.alignments.dir, pattern = "sorted.bam$",
                               full.names = TRUE, recursive = TRUE)
sample_names <- unlist(lapply(strsplit(list.files(path = trimmed_reads_dir,
                       pattern = "*_R1_001.fastq$",
                       full.names = FALSE),"_"), `[[`, 1))
picard.dir <- "picard"
refFlat.file <- "refFlatBDGP6.txt"

run_picard(command = "CollectRnaSeqMetrics",
           input = sorted.bam.files,
           out.dir = picard.dir,
           refFlat = refFlat.file,
           strand = strandedness,
           sample.name = sample.names,
           picard = picard.path)

## End(Not run)

GrahamHamilton/pipelineTools documentation built on June 19, 2021, 1:08 p.m.