@@ -239,11 +239,17 @@ Summarize <- function(txi, tx2gene, annotation, args, metadata, species) {
239
239
message(" Writing annotation data matrix..." )
240
240
write.table(as.data.frame(annotation ), paste0(args [[" --name" ]], " ." , species ,
241
241
" .annotation.txt" ), quote = FALSE , sep = " \t " , row.names = F , col.names = T )
242
+
243
+ message(" Making gene-level length matrix..." )
244
+ as.data.frame(txi.gene $ abundance ) %> % tibble :: rownames_to_column(" gene_id" ) %> %
245
+ left_join(annotation ) %> % as.data.frame %> %
246
+ write.table(format(. , nsmall = 3 , scientific = F , trim = T ), paste0(args [[" --name" ]],
247
+ " ." , species , " .length.txt" ), quote = FALSE , sep = " \t " , row.names = F ,
248
+ col.names = T )
242
249
243
- message(" Making raw TPM matrix..." )
250
+ message(" Making gene-level TPM matrix..." )
244
251
raw_df <- as.data.frame(txi.gene $ abundance ) %> % tibble :: rownames_to_column(" gene_id" ) %> %
245
252
left_join(annotation ) %> % as.data.frame
246
-
247
253
248
254
if (! args [[" --no-rescale" ]]) {
249
255
message(paste(" Scaling TPM of" , args [[" --scale-tpm" ]], " to 1e6..." ))
@@ -263,6 +269,7 @@ Summarize <- function(txi, tx2gene, annotation, args, metadata, species) {
263
269
write.table(format(normed_df , nsmall = 3 , scientific = F , trim = T ), paste0(args [[" --name" ]],
264
270
" ." , species , " .log2fc.txt" ), quote = FALSE , sep = " \t " , row.names = F ,
265
271
col.names = T )
272
+
266
273
267
274
268
275
message(paste(" Calculating TMM scaling factors using" , args [[" --scale-tpm" ]],
0 commit comments