Closed pnrobinson closed 5 months ago
Probably. On the other hand, we could choose the longest transcript to be preferred if there is no MANE. The user should be able to change the preferred transcript anyway and we need to present a table with a summary of all of this right after we set up the cohort?
OK, so to allow custom preferred transcript, we will need to have a dedicated component in the functional annotation step.
I propose taking a mapping from gene symbol to transcript accession, something like:
pref_tx_acc_ids = {
'FBN1': 'NM_000138.5',
'MAPK8IP3': 'NM_001318852.2'
}
Then, need the following sub-task to resolve preferred transcript for any gene we encounter in the functional annotation workflow:
pref_tx_acc_ids
and use the accession to figure out the "preferred" statuspref_tx_acc_ids
, fall back to the MANE transcriptNow, what is "longest"? I would suggest the transcript with the greatest count of coding bases. In case of tie, choose the tx with longer UTRs. In case of tie, choose the tx with the lowest tx accession ID when comparing the accession alphabetically.
Thanks to the workflow, we will always have a preferred transcript, so the cardinality can be 1..1
.
This is about making sure that TranscriptAnnotation.is_preferred
is set with a good value.
We need to use the is_preferred
in the downstream analysis. Currently, some predicates need to get explicit tx ID. This is not ideal.
The simplest way to approach this is to show the user how to review the results of the functional annotation, choose a transcript for a gene and then use it in the downstream g2p analysis.
We need to show how this is done in the notebooks/docs.
@pnrobinson I'm thinking about the cardinality of this attribute.
We can use MANE as the source of preferred transcript. However, per project info, the MANE attribute is only available for hg38 build.
Next, not all genes have a MANE transcript, there are ~200 protein-coding genes with no MANE (e.g. MT-ATP6, NKRF). It's hard to know if this becomes an issue..
So, I think
0..1
is what should be done here...