convert_kallisto: Function to convert RNA-Seq reads to gene expression matrix...

convert_kallistoR Documentation

Function to convert RNA-Seq reads to gene expression matrix (Salmon)

Description

Function to convert RNA-Seq reads to gene expression matrix (Salmon)

Usage

convert_kallisto(
  count_files = NULL,
  samples = NULL,
  indir = NULL,
  outprefix = NULL,
  txgene_fn = "",
  gene2symbol = "",
  workers = detectCores(),
  ...
)

Arguments

count_files

Character vector for salmon output count files

samples

If count_files is NULL, samples was used to set the value with indir

indir

Input salmon counts dir

outprefix

Output prefix

txgene_fn

Two columns file contains TXNAME (e.g. ENST00000373020.9) and GENEID (ENSG00000000003.15)

gene2symbol

Two columns file contains GENEID (e.g. ENSG00000000003.15) and SYMBOL (TSPAN6)

workers

Number of thread for DESeq2 process

...

countsFromAbundance ("no", "scaledTPM", "lengthScaledTPM", "dtuScaledTPM") and ignoreAfterBar (TRUE or FALSE). Default is lengthScaledTPM and TRUE

Examples

## Not run: 
  gene2symbol <- fread('~/env/genome/gencode/hg38/v34/tximport.geneid2symbol',
    header = T, data.table = FALSE)
  txgene_fn <- "~/env/genome/gencode/hg38/v34/tximport.genes"
  tx2gene <- fread(txgene_fn)

  samples <- readLines("samples")
  sampledata <- data.frame(sampleName = samples, condition = rep("disease", length(samples)))
  salmon_dir <- "../salmon/output/kallistoGTF/"
  salmon_files <- file.path(salmon_dir, samples, "abundance.h5")
  convert_kallisto(salmon_files,
    outprefix = "kallisto/aml",
    txgene_fn = txgene_fn,
    gene2symbol = gene2symbol
  )

## End(Not run)

clindet/clinaml documentation built on Jan. 3, 2023, 6:13 a.m.