RunArriba: #' GetArribaRTest #' This function will retrieve the test...

View source: R/runners.R

RunArribaR Documentation

#' GetArribaRTest #' This function will retrieve the test files coming with the arriba software #' @usage test.files <- GetArribaRTest() #' @return an string with the full path of the firs read file of the test GetArribaRTest <- function() software <- G.OpenConfigFile() files <- list.files(paste0(software$arriba$path,"/test"),full.names = T) id.fastq <- which(stringr::str_detect(files,"read1.fastq.gz")) id.fastq2 <- which(stringr::str_detect(files,"read2.fastq.gz")) if(length(id.fastq)>0) file.rename(files[id.fastq],stringr::str_replace(files[id.fastq],"read1.fastq.gz","read_1.fastq.gz")) file.rename(files[id.fastq2],stringr::str_replace(files[id.fastq2],"read2.fastq.gz","read_2.fastq.gz")) else if(file.exists(paste0(software$arriba$path,"/test/read_1.fastq.gz"))) return(paste0(software$arriba$path,"/test/read_1.fastq.gz")) return(NULL) if(file.exists(paste0(software$arriba$path,"/test/read_1.fastq.gz"))) return(paste0(software$arriba$path,"/test/read_1.fastq.gz")) return(NULL) RunArriba this function will run the gene fusion detection ARRIBA software

Description

#' GetArribaRTest #' This function will retrieve the test files coming with the arriba software #' @usage test.files <- GetArribaRTest() #' @return an string with the full path of the firs read file of the test GetArribaRTest <- function() software <- G.OpenConfigFile() files <- list.files(paste0(software$arriba$path,"/test"),full.names = T) id.fastq <- which(stringr::str_detect(files,"read1.fastq.gz")) id.fastq2 <- which(stringr::str_detect(files,"read2.fastq.gz")) if(length(id.fastq)>0) file.rename(files[id.fastq],stringr::str_replace(files[id.fastq],"read1.fastq.gz","read_1.fastq.gz")) file.rename(files[id.fastq2],stringr::str_replace(files[id.fastq2],"read2.fastq.gz","read_2.fastq.gz")) else if(file.exists(paste0(software$arriba$path,"/test/read_1.fastq.gz"))) return(paste0(software$arriba$path,"/test/read_1.fastq.gz")) return(NULL) if(file.exists(paste0(software$arriba$path,"/test/read_1.fastq.gz"))) return(paste0(software$arriba$path,"/test/read_1.fastq.gz")) return(NULL) RunArriba this function will run the gene fusion detection ARRIBA software

Usage

RunArriba(sbjBamFile)

Arguments

sbjBamFile

string with the full file name of the subject BAM file

Value

a data frame with the identified fusions https://arriba.readthedocs.io/en/latest/output-files/see details in Arriba output files

References

https://genome.cshlp.org/content/early/2021/02/11/gr.257246.119Uhrig et al.

See Also

runSTAR()

Examples

## Not run: 
test.subject <- GetArribaRTest()
bam.subject <- RunSTAR(test.subject)
Fusions <- RunArriba(bam.subject)
View(Fusions)

## End(Not run)

elmerfer/ArribaR documentation built on Nov. 14, 2023, 1 p.m.