2
2
3
3
library(optparse )
4
4
library(edgeR )
5
- library(tibble )
5
+ library(tidyverse )
6
6
library(DESeq2 )
7
7
8
8
option_list <- list (
@@ -24,23 +24,26 @@ log <- if (opt$log_transform == "TRUE") TRUE else FALSE
24
24
outdir <- opt $ outdir
25
25
26
26
# # Read data
27
- counts_tab <- read.csv(
28
- " gene_counts_pc.tsv" ,
29
- header = TRUE , na.strings = c(" " , " NA" ), sep = " \t " ,
30
- stringsAsFactors = FALSE
31
- )
32
- ref_gene_tab <- read.csv(
33
- " ref_gene_df.tsv" ,
34
- header = TRUE , na.strings = c(" " , " NA" ), sep = " \t " ,
35
- stringsAsFactors = FALSE
36
- )
27
+ # counts_tab <- read.csv(
28
+ # "gene_counts_pc.tsv",
29
+ # header = TRUE, na.strings = c("", "NA"), sep = "\t",
30
+ # stringsAsFactors = FALSE
31
+ # )
32
+ # ref_gene_tab <- read.csv(
33
+ # "ref_gene_df.tsv",
34
+ # header = TRUE, na.strings = c("", "NA"), sep = "\t",
35
+ # stringsAsFactors = FALSE
36
+ # )
37
+
38
+ counts_tab <- read_tsv(" gene_counts_pc.tsv" )
39
+ ref_gene_tab <- read_tsv(" ref_gene_df.tsv" )
37
40
38
41
gene_names <- counts_tab [[" feature_id" ]]
39
42
counts_tab [[" feature_id" ]] <- NULL
40
- counts_tab <- as.data.frame(sapply(counts_tab , as.numeric ))
43
+ # counts_tab <- as.data.frame(sapply(counts_tab, as.numeric))
44
+
45
+ counts_tab <- as.data.frame(counts_tab )
41
46
42
- print(head(counts_tab ))
43
- print(length(gene_names ))
44
47
rownames(counts_tab ) <- gene_names
45
48
46
49
# ## remove rRNA genes
0 commit comments