Skip to content

Commit

Permalink
revert: support for lrg sequences (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
korikuzma authored Jul 21, 2023
1 parent 7787310 commit b5201d3
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions cool_seq_tool/data_sources/transcript_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ def __init__(self, transcript_file_path: Path = TRANSCRIPT_MAPPINGS_PATH,
self.refseq_rna_for_gene_symbol: Dict[str, List[str]] = {}
self.refseq_rna_to_gene_symbol: Dict[str, str] = {}

# LRG <-> Gene Symbol
self.refseq_lrg_for_gene_symbol: Dict[str, List[str]] = {}
self.refseq_lrg_to_gene_symbol: Dict[str, str] = {}

# NP -> NM
self.np_to_nm: Dict[str, str] = {}

Expand Down Expand Up @@ -129,26 +125,6 @@ def _load_refseq_gene_symbol_data(self, lrg_refseqgene_path: Path) -> None:
rna_t] = gene
if refseq_transcript and rna_transcript:
self.np_to_nm[refseq_transcript] = rna_transcript
lrg = row["LRG"]
if lrg:
self.refseq_lrg_for_gene_symbol.\
setdefault(gene, []).\
append(lrg)
self.refseq_lrg_to_gene_symbol[lrg] = gene
t = row["t"]
p = row["p"]
if t:
t_lrg = lrg + t
self.refseq_lrg_for_gene_symbol. \
setdefault(gene, []). \
append(t_lrg)
self.refseq_lrg_to_gene_symbol[t_lrg] = gene
if p:
p_lrg = lrg + p
self.refseq_lrg_for_gene_symbol. \
setdefault(gene, []). \
append(p_lrg)
self.refseq_lrg_to_gene_symbol[p_lrg] = gene

def protein_transcripts(self, identifier: str) -> List[str]:
"""Return a list of protein transcripts for a gene symbol.
Expand Down Expand Up @@ -228,11 +204,3 @@ def get_gene_symbol_from_ensembl_transcript(self, q: str) -> Optional[str]:
q = q.split(".")[0]
gene_symbol = self.ensembl_transcript_to_gene_symbol.get(q)
return gene_symbol

def get_gene_symbol_from_lrg(self, q: str) -> Optional[str]:
"""Return gene symbol for LRG.
:param str q: LRG accession
:return: Gene symbol
"""
return self.refseq_lrg_to_gene_symbol.get(q)

0 comments on commit b5201d3

Please sign in to comment.