Skip to content

Commit 57eddb1

Browse files
author
suiyue
committed
remove prefix "extended_annotations"
1 parent ccb689e commit 57eddb1

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

R/readWrite.R

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ writeBambuOutput <- function(se, path, prefix = "", outputExtendedAnno = TRUE,
2727
dir.create(outdir, recursive = TRUE)
2828

2929
transcript_grList <- rowRanges(se)
30-
transcript_gtffn <- paste(outdir, prefix,
31-
"extended_annotations", sep = "")
30+
transcript_gtffn <- paste(outdir, prefix, sep = "")
3231
gtf <- writeAnnotationsToGTF(annotation = transcript_grList,
3332
file = transcript_gtffn, outputExtendedAnno = outputExtendedAnno,
3433
outputAll = outputAll, outputBambuModels = outputBambuModels, outputNovelOnly = outputNovelOnly)
@@ -233,24 +232,24 @@ writeToGTF <- function(annotation, file, geneIDs = NULL) {
233232
writeAnnotationsToGTF <- function(annotation, file, geneIDs = NULL, outputExtendedAnno = TRUE,
234233
outputAll = TRUE, outputBambuModels = TRUE, outputNovelOnly = TRUE){
235234
if(outputExtendedAnno){
236-
writeToGTF(annotation, paste0(file, "_extendedAnnotations.gtf"), geneIDs)
235+
writeToGTF(annotation, paste0(basename(file), "extendedAnnotations.gtf"), geneIDs)
237236
}
238237
if(outputAll){
239238
annotationAll = setNDR(annotation, 1)
240239
if(length(annotationAll) == length(annotation))
241240
message("The current NDR threshold already outputs all transcript models. This may result in reduced precision for th extendedAnnotations and supportedTranscriptModels gtfs")
242-
writeToGTF(annotationAll, paste0(file, "_allTranscriptModels.gtf"), geneIDs)
241+
writeToGTF(annotationAll, paste0(file, "allTranscriptModels.gtf"), geneIDs)
243242
}
244243

245244
#todo - have this write bambu start and ends for annotated transcripts
246245
if(outputBambuModels){
247246
annotationBambu = annotation[!is.na(mcols(annotation)$readCount)]
248-
writeToGTF(annotationBambu, paste0(file, "_supportedTranscriptModels.gtf"), geneIDs)
247+
writeToGTF(annotationBambu, paste0(file, "supportedTranscriptModels.gtf"), geneIDs)
249248
}
250249

251250
if(outputNovelOnly){
252251
annotationNovel = annotation[mcols(annotation)$novelTranscript]
253-
writeToGTF(annotationBambu, paste0(file, "_novelTranscripts.gtf"), geneIDs)
252+
writeToGTF(annotationNovel, paste0(file, "novelTranscripts.gtf"), geneIDs)
254253
}
255254
}
256255

0 commit comments

Comments
 (0)