Skip to content

Commit cf937af

Browse files
committed
#48: Code cleanup
1 parent 7c41eab commit cf937af

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

scripts/exon_usage_circtools_wrapper.R

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,15 @@ arg_output_directory <- args[6] # string
5959
arg_ballgown_directory <- args[7] # string
6060
arg_gtf_file <- args[8] # string
6161
arg_circTest_file <- args[9] # string
62-
# arg_num_top_genes <- as.integer(args[10])
6362
arg_head_header <- as.logical(args[10])
6463

6564
## load complete data set
6665
message("Loading CircRNACount")
6766
CircRNACount <- read.delim(paste(arg_dcc_data, "CircRNACount", sep="/"), header = T)
6867

69-
message("Loading LinearRNACount")
70-
LinearCount <- read.delim(paste(arg_dcc_data, "LinearCount", sep="/"), header = T)
71-
7268
message("Loading CircCoordinates")
7369
CircCoordinates <- read.delim(paste(arg_dcc_data, "CircCoordinates", sep="/"), header = T)
7470

75-
CircRNACount <- CircRNACount[, c(1 : 3, arg_condition_columns)] # we always need the first 3 columns
76-
LinearCount <- LinearCount[, c(1 : 3, arg_condition_columns)] # we always need the first 3 columns
77-
7871
# read sub directories containing the ballgown runs and return list
7972
ballgownRuns <- as.list(list.files(arg_ballgown_directory, full.names = TRUE))
8073

@@ -83,7 +76,6 @@ baseDir <- arg_output_directory
8376

8477
# group mapping
8578
group <- unlist(lapply(arg_groups, function(x) {return(arg_condition_list[x])}))
86-
unlist(lapply(arg_groups, function(x) {print(x)}))
8779

8880
# sample<>replicate mapping
8981
id <- unlist(lapply(seq(1, length(arg_replicates)), function(x) {return((paste(arg_condition_list[x], arg_replicates[x], sep="_R")))}))
@@ -95,12 +87,11 @@ bg_dirs_to_work <- unlist(lapply(arg_condition_columns, function(x) {return(ball
9587
message("Starting ballgown processing")
9688

9789
bg <- ballgown(bg_dirs_to_work, verbose=TRUE)
98-
pData(bg)<- bg.dccDF
9990

10091
message("Preparing necessary data structures")
10192

102-
whole_exon_table = eexpr(bg, 'all')# eexpr -> exon level
103-
whole_intron_table = iexpr(bg, 'all')# iexpr -> intron level
93+
whole_exon_table <- eexpr(bg, 'all')# eexpr -> exon level
94+
whole_intron_table <- iexpr(bg, 'all')# iexpr -> intron level
10495

10596
t2g<-indexes(bg)$t2g # transcript / gene table
10697
e2t<-indexes(bg)$e2t # exon / transcript table
@@ -148,9 +139,6 @@ e2g.minimal=e2g.counts[,-c(1,ncol(e2g.counts))]
148139
# indices of exons in e2g.minimal table with > 40 counts throughout all samples
149140
idx<-which(apply(e2g.minimal,1,sum)>4*10)
150141

151-
# select > 40 count exons from exon / gene table
152-
e2g.counts<-e2g.counts[idx,];
153-
154142
# select > 40 count exons from the slimmed exon / gene table
155143
e2g.minimal=e2g.minimal[idx,]
156144

0 commit comments

Comments
 (0)