Skip to content

Commit

Permalink
feat: add tx_palette
Browse files Browse the repository at this point in the history
  • Loading branch information
luciorq committed Nov 29, 2024
1 parent 4af2a6a commit 7052da0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 26 deletions.
19 changes: 8 additions & 11 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# isoformic (development version)
# isoformic v0.1.2

* Nothing yet
## Features

* New `tx_type_palette()`.

## Bug Fixes

* In `make_tx_to_gene()` output, wrong column name `entrez_id` replaced for `tx_length`.

# isoformic v0.1.1

Expand All @@ -10,19 +16,10 @@
* `download_reference()`: argument `file_type = "gtf"` is the default.
* `prepare_annotation()`: Parse both GTF and GFF file formats into required annotation data.

## Differential Expression Analysis

* created `run_swish_pairwise()` function.

## Bug Fixes

* `prepare_profile_data()`: accepts `matrix` and `data.frame` as input for the `txi_transcript` argument.


# isoformic v0.1.0

* Initial support for `SummarizedExperiment` and `MultiAssayExperiment`.

# isoformic v0.0.1

* Release of the initial workflow.
21 changes: 8 additions & 13 deletions R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,6 @@ run_enrichment <- function(det_df,
"nonsense_mediated_decay"
)

# TODO: @luciorq Better define the non-coding category
# + maybe something that translates:
# + "non-coding isoform from protein coding gene + lncRNAs"

# TODO: @iza editei aqui e coloquei unproductive no lugar de non-coding
# tambem removi os lncRNAs ali em cima e aqui
tx_type_names <- c(
"protein_coding",
"unproductive",
Expand All @@ -213,8 +207,8 @@ run_enrichment <- function(det_df,
"nonsense_mediated_decay"
)
fgsea_results_df <- base::seq_along(tx_type_names) |>
purrr::map_dfr(
.f = \(x) {
purrr::map(
.f = function(x) {
type_vec <- tx_types_list[[x]]
type_name <- tx_type_names[x]
res_fgsea <- det_df |>
Expand All @@ -228,10 +222,10 @@ run_enrichment <- function(det_df,
pathways = genesets_list,
stats = ranks,
eps = 0
) |>
tibble::as_tibble() |>
dplyr::filter(pval < 0.05) |>
dplyr::mutate(experiment = type_name)
) # |>
#tibble::as_tibble() |>
#dplyr::filter(pval < 0.05) |>
#dplyr::mutate(experiment = type_name)
return(fgsea_results)
}
)
Expand Down Expand Up @@ -314,7 +308,8 @@ tx_type_palette <- function() {
"processed_transcript", "nonsense_mediated_decay",
"lncRNA", "processed_pseudogene",
"transcribed_unprocessed_pseudogene",
"unprocessed_pseudogene", "non_stop_decay", "transcribed_unitary_pseudogene",
"unprocessed_pseudogene", "non_stop_decay",
"transcribed_unitary_pseudogene",
"pseudogene", "unitary_pseudogene"
)
tx_type_color_names <- c(
Expand Down
7 changes: 5 additions & 2 deletions vignettes/isoformic_intro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,13 @@ Visualize how is our table before running
head(PE1_DETs_final)
```

Then you run the run_enrichment function it needs your DETs final table, the genesetlist and a pvalue cutoff to be used.
Then you run the `run_enrichment()` function it needs your DETs final table, the gene set list and a p-value cutoff to be used.
It will generate a table of enrichment but with an extra column "experiment".

```{r, warning=FALSE}
fgsea::fgseaSimple()
enrichment_df <- run_enrichment(
det_df = PE1_DETs_final,
genesets_list = genesets_list,
Expand All @@ -473,7 +476,7 @@ This experiment column has five possible values: Protein-coding: which is the en
Unproductive: This is a term that will be used moving forward to combine those three categories of alternative spliced isoforms transcribed by coding genes. The authors are aware that biologically this term is deprecated since those kind of transcripts can produce peptides from alternative translation pathways. So here unproductive should be read as virtually incapable of producing the protein that is associated with that gene.
As interpretation, we made this category to find pathways which are not being regulated on our coding data, but by the unproductive transcripts.

We also added three categories which are the individual alternative spliced types and the pathways regulated by those for specific analysis. In a very deep transcriptome the individual enrichment from those categories can also lead to promissing insights.
We also added three categories which are the individual alternative spliced types and the pathways regulated by those for specific analysis. In a very deep transcriptome the individual enrichment from those categories can also lead to promising insights.

Plotting the enrichment

Expand Down

0 comments on commit 7052da0

Please sign in to comment.