Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion biomine/variant/mafvariant.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import re
from biomine.variant.variant import variant
from urllib2 import unquote

class mafvariant(variant):
nonCoding = re.compile( "([NULL|\*|\+|\-])" )
Expand Down Expand Up @@ -260,6 +261,7 @@ def HGVSp( self ):
return hgvsp
def splitHGVSp( self , hgvsp ):
## print "biomine::variant::mafvariant::splitHGVSp - "
hgvsp = unquote(hgvsp)
ref = ""
pos = ""
mut = ""
Expand All @@ -278,7 +280,7 @@ def splitHGVSp( self , hgvsp ):
#TODO handle splice variants: NM_000030.2:c.424-2A>G NP_000021.1:p.Gly_142Gln145del
changep = re.match( "p\.([a-zA-Z\*]+?)([0-9\?]+?)([a-zA-Z]{1,3}|[\*\?])(ext[0-9\*\?]*)*" , hgvsp )
changee = re.match( "(e)([0-9]+?)([\+\-][0-9]+?)" , hgvsp )
unknown = re.match( "p\.[\?\=\|(\=\)|0|0\?]" , hgvsp )
unknown = re.match( "p\..*[\?\=\|(\=\)|0|0\?]" , hgvsp )
if changep: #peptide
ref = changep.group( 1 )
pos = changep.group( 2 )
Expand Down