Skip to content

Commit

Permalink
Merge pull request #30 from yhoogstrate/removal_unused_trans_seq_vars
Browse files Browse the repository at this point in the history
Removal unused trans seq vars
  • Loading branch information
yhoogstrate committed Mar 16, 2016
2 parents 72a3297 + 6c988d0 commit be1b465
Show file tree
Hide file tree
Showing 10 changed files with 126 additions and 205 deletions.
5 changes: 5 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2016-03-16 Youri Hoogstrate

* Version 2.12.2: Removal of unused 'sequence' and 'transition
sequence' variables within the Fusion object, to reduce memory.

2016-03-15 Youri Hoogstrate

* Version 2.12.1: Another reuction of memory footprint - from
Expand Down
2 changes: 0 additions & 2 deletions fuma/CompareFusionsBySpanningGenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ def match_fusions(self,fusion_1,fusion_2,allow_empty = True):
fusion_1.get_right_chromosome(), \
fusion_1.get_left_break_position(), \
fusion_1.get_right_break_position(), \
fusion_1.sequence, \
fusion_1.get_transition_sequence(), \
fusion_1.left_strand, \
fusion_1.right_strand, \
fusion_1.dataset_name+"_vs._"+fusion_2.dataset_name, \
Expand Down
25 changes: 5 additions & 20 deletions fuma/Fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ def __init__(self, \
arg_left_pos, \
arg_right_pos, \

arg_sequence, \
arg_transition_sequence, \

arg_left_strand, \
arg_right_strand, \

Expand All @@ -58,6 +55,7 @@ def __init__(self, \

self.matches = set([self])## initial (non merged) objects used for matching

#@todo use pointer to original dataset?
self.dataset_name = arg_dataset_name

self.acceptor_donor_direction = None
Expand All @@ -67,8 +65,6 @@ def __init__(self, \
self.cleanup_chr_name(arg_right_chr), \
arg_left_pos, \
arg_right_pos, \
arg_sequence, \
arg_transition_sequence, \
self.find_strand_type(arg_left_strand), \
self.find_strand_type(arg_right_strand), \
arg_uid, \
Expand Down Expand Up @@ -108,9 +104,6 @@ def set(self, \
arg_left_pos, \
arg_right_pos, \

arg_sequence, \
arg_transition_sequence, \

arg_left_strand, \
arg_right_strand, \

Expand All @@ -124,9 +117,6 @@ def set(self, \
self.left_break_position = int(str(arg_left_pos).replace(",",""))
self.right_break_position = int(str(arg_right_pos).replace(",",""))

self.sequence = arg_sequence
self.transition_sequence = arg_transition_sequence

self.left_strand = arg_left_strand
self.right_strand = arg_right_strand

Expand Down Expand Up @@ -170,11 +160,11 @@ def cleanup_chr_name(self,chr_name):
chr_name = chr_name.strip()
return chr_name[3:] if chr_name[0:3] == "chr" else chr_name

def get_left_position(self,indexed_chromosome=False):
return [self.get_left_chromosome(indexed_chromosome),self.get_left_break_position()]
def get_left_position(self,chromosome_with_prefix=False):
return [self.get_left_chromosome(chromosome_with_prefix),self.get_left_break_position()]

def get_right_position(self,indexed_chromosome=False):
return [self.get_right_chromosome(indexed_chromosome),self.get_right_break_position()]
def get_right_position(self,chromosome_with_prefix=False):
return [self.get_right_chromosome(chromosome_with_prefix),self.get_right_break_position()]

def get_left_chromosome(self,with_prefix=False):
if(with_prefix):
Expand All @@ -194,9 +184,6 @@ def get_left_break_position(self):
def get_right_break_position(self):
return self.right_break_position

def get_transition_sequence(self):
return self.transition_sequence

def get_distance(self):
if(self.is_interchromosomal()):
return -1
Expand Down Expand Up @@ -226,8 +213,6 @@ def swap_positions(self):
self.left_chr_str, \
self.get_right_break_position(), \
self.get_left_break_position(), \
self.sequence, \
self.get_transition_sequence(), \
self.right_strand, \
self.left_strand, \
self.uid, \
Expand Down
6 changes: 2 additions & 4 deletions fuma/FusionDetectionExperiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,8 @@ def export_to_CG_Junctions_file(self,filename):
fh.write("\t")
fh.write("20 Y ")

if(fusion.get_transition_sequence()):
fh.write(fusion.get_transition_sequence()+" "+str(len(fusion.get_transition_sequence())))
else:
fh.write("\t")
# Sequences are not being stored as it consumes too much memory
fh.write("\t")

fh.write(" ")

Expand Down
Loading

0 comments on commit be1b465

Please sign in to comment.