run_hisat2: Run HISAT2

Description Usage Arguments Value Examples

View source: R/run_hisat2.R

Description

Runs the HISAT2 tool, can be used for single end and paired end reads

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
run_hisat2(
  mate1 = NULL,
  mate2 = NULL,
  index = NULL,
  sample.name = NULL,
  strandedness = NULL,
  no_splice = NULL,
  known_splice = NULL,
  assembly = FALSE,
  phred = 33,
  threads = 10,
  out.dir = NULL,
  parallel = FALSE,
  cores = 4,
  hisat2 = 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

strandedness

Strand-specific information

no_splice

Disable spliced alignment, use for Trypanosomes

known_splice

File with known splice sites

assembly

Reports alignments tailored for transcript assemblers

phred

Quality score offsets, default set to illumina/sanger standard of 33

threads

Number of threads for hisat2 to use, default set to 10

out.dir

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

parallel

Run in parallel, default set to FALSE

cores

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

hisat2

Path to the HISAT2 program, required

version

Returns the version number

Value

A list with the HISAT2 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
26
27
28
29
30
31
32
33
34
 ## Not run: 
 trimmed_reads_dir <- "trimmed_reads"
 mate1 <- list.files(path = trimmed_reads_dir, pattern = "*_R1_001.fastq$", full.names = TRUE)
 mate2 <- list.files(path = trimmed_reads_dir, pattern = "*_R2_001.fastq$", full.names = TRUE)

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

 index <- "/export/buzz1/Genome/Homo_sapiens/Ensembl/GRCH38_p7/Sequence/Transcriptome/
           KallistoIndex/GRCh38_p7.kall"

 # Paired End example
 strandedness <- "RF"
 hisat2.cmds <- run_hisat2(mate1 = mate1,
                           mate2 = mate2,
                           index = genome,
                           sample.name = sample.names,
                           strandedness = strandedness,
                           assembly = TRUE,
                           out.dir = hisat.alignments.dir,
                           hisat2 = "/software/hisat_v2-2.1.0/hisat2")

 # Single End example
 strandedness <- "R"
 hisat2.cmds <- run_hisat2(mate1 = mate1,
                           index = genome,
                           sample.name = sample.names,
                           strandedness = strandedness,
                           assembly = TRUE,
                           out.dir = hisat.alignments.dir,
                           hisat2 = "/software/hisat_v2-2.1.0/hisat2")
 
## End(Not run)

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