run_bowtie: Run bowtie

Description Usage Arguments Value Examples

View source: R/run_bowtie.R

Description

Runs the bowtie tool, currently set up primarily to get unaligned reads

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
run_bowtie(
  mate1 = NULL,
  mate2 = NULL,
  index = NULL,
  sample.name = NULL,
  out.dir = NULL,
  unaligned = NULL,
  format = "SAM",
  parallel = FALSE,
  cores = 4,
  bowtie = NULL,
  version = FALSE
)

Arguments

mate1

List of the paths to files containing to the forward reads, required

mate2

List of the paths to files containing to the reverse reads, required for paired end sequence data

index

Path to the reference transcriptome kallisto index, required

sample.name

List of the sample names, required

out.dir

Name of the directory from the Bowtie output. If NULL, which is the default, a directory named "bowtie_alignments" is created in the current working directory.

unaligned

Name of the directory for the unaligned reads, fastq formatted

format

Format for the aligned reads, currently only SAM is supported

parallel

Run in parallel, default set to FALSE

cores

Number of cores/threads to use for parallel processing, default set to 4

bowtie

Path to the bowtie proram, required

version

Returns the version number

Value

A list with the bowtie commands

Examples

 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
 ## Not run: 
bowtie.path <- "/software/bowtie-v1.2.3/bin/bowtie"

bowtie.version <- run_bowtie(bowtie = bowtie.path,
                             version = TRUE)

trimmed_reads_dir <- "trimmed_reads"
mate1 <- list.files(path = trimmed_reads_dir, pattern = "*_R1_001.fastq$", full.names = TRUE)

index <- "path/to/index/indes.ebwt"

sample_names <- unlist(lapply(strsplit(list.files(path = trimmed_reads_dir,
                                                  pattern = "*_R1_001.fastq$",
                                                  full.names = FALSE),"_"), `[[`, 1))

unaligned <- "rRNA_removed_reads"
out.dir <- "/dev/null" # Send the reads that align to be deleted

bowtie.cmds <- run_bowtie(mate1 = mate1,
                          index = index, sample.name = sample_names,
                          unaligned = unaligned,
                          out.dir = out.dir,
                          bowtie = bowtie.path)

## End(Not run)

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