<filename>spada/network/ucsc_transcript_network.py<gh_stars>1-10
from spada.network import transcript_network

class UCSCTranscriptNetwork(transcript_network.TranscriptNetwork):
	def __init__(self, name):
		transcript_network.TranscriptNetwork.__init__(self, name)

	def genenameFilter(self, full_name="", gene_id="", gene_symbol=""):
		geneSymbol 	= None
		geneID 		= None

		if full_name:
			nameComponents 	= full_name.split("|")

			if len(nameComponents) > 1:
				geneSymbol 	= nameComponents[0]
				geneID 		= nameComponents[1]

		elif "locus" not in gene_id and "locus" not in gene_symbol:
			if gene_id:
				geneID 		= gene_id
			if gene_symbol:
				geneSymbol 	= gene_symbol

		return (geneID, geneSymbol)

<filename>spada/network/ucsc_transcript_network.py<gh_stars>1-10
from spada.network import transcript_network

class UCSCTranscriptNetwork(transcript_network.TranscriptNetwork):
	def __init__(self, name):
		transcript_network.TranscriptNetwork.__init__(self, name)

	def genenameFilter(self, full_name="", gene_id="", gene_symbol=""):
		geneSymbol 	= None
		geneID 		= None

		if full_name:
			nameComponents 	= full_name.split("|")

			if len(nameComponents) > 1:
				geneSymbol 	= nameComponents[0]
				geneID 		= nameComponents[1]

		elif "locus" not in gene_id and "locus" not in gene_symbol:
			if gene_id:
				geneID 		= gene_id
			if gene_symbol:
				geneSymbol 	= gene_symbol

		return (geneID, geneSymbol)
