monarch-initiative / genophenocorr

Genotype Phenotype Correlation
https://monarch-initiative.github.io/genophenocorr/stable
MIT License
4 stars 1 forks source link

Variant class should have get_preferred_transcript() #79

Closed pnrobinson closed 5 months ago

ielis commented 8 months ago

@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.

The MANE project is only being completed for human genes on GRCh38. There is no plan to retroactively add this data to our archived GRCh37 gene annotation.

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...

pnrobinson commented 8 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?

ielis commented 8 months ago

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:

Now, 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.

ielis commented 7 months ago

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.