Commit 42b4e318 authored by jedlickap's avatar jedlickap
Browse files

trf fix

parent 3dafa070
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -43,9 +43,9 @@ class Nester(ToolInterface):
        
        
        nested_list += self._get_unexpanded_transposon_list(cropped_sequence, self.threshold)  # find list of nested transposons
        nested_list += self._get_unexpanded_transposon_list(cropped_sequence, self.threshold)  # find list of nested transposons
        nested_list = self._expand_transposon_list(nested_list)
        nested_list = self._expand_transposon_list(nested_list)
        print(len(nested_list))

        nested_list = self._filter_nested_list(nested_list)
        nested_list = self._filter_nested_list(nested_list)
        print(len(nested_list))       
     
        self.nested_element = NestedElement(self.seqid, self.sequence, nested_list)
        self.nested_element = NestedElement(self.seqid, self.sequence, nested_list)
        
        
    def _get_unexpanded_transposon_list(self, sequence, threshold):
    def _get_unexpanded_transposon_list(self, sequence, threshold):
+3 −3
Original line number Original line Diff line number Diff line
@@ -75,7 +75,7 @@ def get_candidates(seqid):
            candidates.append(TandemRepeat([int(split[0]), int(split[1])], int(split[2]), float(split[3]),
            candidates.append(TandemRepeat([int(split[0]), int(split[1])], int(split[2]), float(split[3]),
                    int(split[5]), int(split[6]), int(split[7]), float(split[12]), split[-1]))
                    int(split[5]), int(split[6]), int(split[7]), float(split[12]), split[-1]))


    cleanup()
    cleanup(seqid)
    
    
    return candidates
    return candidates


@@ -104,7 +104,7 @@ def filter_candidates(candidates):
            repeats.append(candidate)
            repeats.append(candidate)
    return repeats
    return repeats


def cleanup():
def cleanup(seqid):
    if os.path.isfile("{}.fa.2.5.7.80.10.50.2000.dat".format(seqid)):
    if os.path.isfile("{}.fa.2.5.7.80.10.50.2000.dat".format(seqid)):
        os.remove("{}.fa.2.5.7.80.10.50.2000.dat".format(seqid))
        os.remove("{}.fa.2.5.7.80.10.50.2000.dat".format(seqid))
    if os.path.isfile("{}.fa.2.5.7.80.10.50.2000.mask".format(seqid)):
    if os.path.isfile("{}.fa.2.5.7.80.10.50.2000.mask".format(seqid)):