Skip to content

Commit

Permalink
Remove GFF requirement when kallisto pseudoaligner used
Browse files Browse the repository at this point in the history
  • Loading branch information
adamd3 committed Jan 22, 2024
1 parent 1645a52 commit ec0f42f
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions bin/normalise_counts.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

library(optparse)
library(edgeR)
library(tibble)
library(tidyverse)
library(DESeq2)

option_list <- list(
Expand All @@ -24,23 +24,26 @@ log <- if (opt$log_transform == "TRUE") TRUE else FALSE
outdir <- opt$outdir

## Read data
counts_tab <- read.csv(
"gene_counts_pc.tsv",
header = TRUE, na.strings = c("", "NA"), sep = "\t",
stringsAsFactors = FALSE
)
ref_gene_tab <- read.csv(
"ref_gene_df.tsv",
header = TRUE, na.strings = c("", "NA"), sep = "\t",
stringsAsFactors = FALSE
)
# counts_tab <- read.csv(
# "gene_counts_pc.tsv",
# header = TRUE, na.strings = c("", "NA"), sep = "\t",
# stringsAsFactors = FALSE
# )
# ref_gene_tab <- read.csv(
# "ref_gene_df.tsv",
# header = TRUE, na.strings = c("", "NA"), sep = "\t",
# stringsAsFactors = FALSE
# )

counts_tab <- read_tsv("gene_counts_pc.tsv")
ref_gene_tab <- read_tsv("ref_gene_df.tsv")

gene_names <- counts_tab[["feature_id"]]
counts_tab[["feature_id"]] <- NULL
counts_tab <- as.data.frame(sapply(counts_tab, as.numeric))
# counts_tab <- as.data.frame(sapply(counts_tab, as.numeric))

counts_tab <- as.data.frame(counts_tab)

print(head(counts_tab))
print(length(gene_names))
rownames(counts_tab) <- gene_names

# ## remove rRNA genes
Expand Down

0 comments on commit ec0f42f

Please sign in to comment.