thelovelab/tximport

tximport of feature counts?

Closed this issue · 1 comments

I can't find a way to do the featureCounts tximport. I have this error although I chose countsFromAbundance = "no".

# path <- file.path(targets$sample_label, "abundance.tsv")
# all(file.exists(path))
#
# Tx_1 <- roslin.annotation[, c(8, 24)]
# # colnames(Tx_1)
# names(Tx_1) <- c("target_id", "gene_name")
# Tx_1 <- as_tibble(Tx_1)
gene_counts <- tximport(path,
                       type = "none",
                       tx2gene = Tx_1,
                       txOut = FALSE,
                       countsFromAbundance = "no",
                       importer = read_tsv, # did this as I was getting an error > reading in files with read_tsv
1 Error in importer(files[i]) : could not find function "importer"
                       countsCol = "counts",
                       lengthCol = "Length",
                       txIdCol = "target_id",
                       ignoreTxVersion = TRUE,
                       ignoreAfterBar = TRUE)
Rows: 45713 Columns: 3                                                                                                                             
── Column specification ────────────────────────────────────────────────────────────────────────────────────────
Delimiter: "\t"
chr (1): target_id
dbl (2): Length, counts

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Error in tximport(path, type = "none", tx2gene = Tx_1, txOut = FALSE,  : 
  argument "abundanceCol" is missing, with no default

The motivation for the tximport package is described in Soneson 2015: transcript level quantification improves gene level analysis. Because featureCounts does not perform transcript level inference it cannot be supported in tximport.

There are plenty of workflows describing how to go from featureCounts to DE analysis
in edgeR, limma, DESeq2, etc