Skip to content

Commit

Permalink
refact: Try handling bars in IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
jvfe committed Sep 29, 2024
1 parent 37f73aa commit 5efc0b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/gen_tx2gene.r
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ txdf <- AnnotationDbi::select(
tab <- table(txdf$GENEID)
txdf$ntx <- tab[match(txdf$GENEID, names(tab))]

txdf$TXNAME <- gsub("\\.*", "", txdf$TXNAME)
txdf$GENEID <- gsub("\\.*", "", txdf$GENEID)

tx2gene <- data.frame(
tx = txdf$TXNAME,
gene = txdf$GENEID
Expand Down
3 changes: 3 additions & 0 deletions bin/tximport.r
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ txi_gene <- tximport(
type = "kallisto",
tx2gene = tx2gene,
ignoreTxVersion = TRUE,
ignoreAfterBar = TRUE,
dropInfReps=TRUE
)

Expand All @@ -28,6 +29,7 @@ txi_tx <- tximport(
type = "kallisto",
txOut = TRUE,
ignoreTxVersion = TRUE,
ignoreAfterBar = TRUE,
dropInfReps=TRUE
)

Expand All @@ -37,6 +39,7 @@ txi_tx_scaled <- tximport(
txOut = TRUE,
countsFromAbundance = "scaledTPM",
ignoreTxVersion = TRUE,
ignoreAfterBar = TRUE,
dropInfReps=TRUE
)

Expand Down

0 comments on commit 5efc0b4

Please sign in to comment.