Skip to content

Commit 5b3f2fb

Browse files
authored
Merge pull request #490 from GoekeLab/fix_issue
Fix issue related to gene id with transcript id information and code example
2 parents 29752b8 + 1f970c4 commit 5b3f2fb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

R/prepareAnnotations_utilityFunctions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ prepareAnnotationsFromGTF <- function(file) {
2525
"score", "strand", "frame", "attribute")
2626
data <- data[data$type == "exon", ]
2727
data$strand[data$strand == "."] <- "*"
28-
data$GENEID <- gsub("gene_id (.*?);.*", "\\1", data$attribute)
28+
data$GENEID <- gsub(".*gene_id (.*?);.*", "\\1", data$attribute)
2929
data$TXNAME <- gsub(".*transcript_id (.*?);.*", "\\1", data$attribute)
3030
multiTxCheck <- as_tibble(data) %>% select(seqname, GENEID) %>% distinct() %>% group_by(GENEID) %>%
3131
mutate(n=n(), id=paste0('-',row_number()))

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ If you are only interested in the novel transcripts, one can filter this 'se' ob
188188
se.novel = se[mcols(se)$novelTranscript,]
189189
writeBambuOutput(se.novel, path = "./bambu/")
190190
```
191-
If you are only interested in full-length transcripts that were detected by Bambu.
191+
If you are only interested in full-length transcripts that were detected by Bambu in at least 1 sample.
192192
```rscript
193-
se.novel = se[assays(se)$fullLengthCounts >= 1,]
193+
se.novel = se[mcols(se)$novelTranscript&(apply(assays(se)$fullLengthCounts >= 1,1,sum)>=1),]
194194
writeBambuOutput(se.novel, path = "./bambu/")
195195
```
196196

0 commit comments

Comments
 (0)