From 68b5c6dfbd0df436663a9f042f60bc9a0d7d8254 Mon Sep 17 00:00:00 2001 From: Thomas Faraut <Thomas.Faraut@inra.fr> Date: Thu, 31 Oct 2019 14:16:32 +0100 Subject: [PATCH] new pindel specific filter --- svreader/pindel.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/svreader/pindel.py b/svreader/pindel.py index fa5ccb8..fbc79a5 100644 --- a/svreader/pindel.py +++ b/svreader/pindel.py @@ -320,7 +320,7 @@ class PindelRecord(SVRecord): calls.append(calldata) return calls - def MaxIndSupportingRP(self): + def MaxIndividualSupport(self): max_ind_supp = 0 for s in self.__samples: ad = s["up_var_read_supp"] + s["down_var_read_supp"] @@ -331,7 +331,7 @@ class PindelRecord(SVRecord): alt = [vcf.model._SV(self.sv_type)] info = {"SVLEN": self.sv_len, "SVTYPE": self.sv_type} - info["MAX_IND_SU"] = self.MaxIndSupportingRP() + info["MAX_IND_SU"] = self.MaxIndividualSupport() info["VSAMPLES"] = ",".join(self.variantSamples()) info.update(self.Modinfo) @@ -388,15 +388,14 @@ class PindelReader(SVReader): # # Sudmant et al 2015 SuppInfo # return (record.length() > 60) def SpecificFilterPass(self, record): - if (abs(record.start-record.end+1) >= 2000 or - record.MaxIndSupportingRP() <= 4): + # new pindel specific filter + if record.length() >= 800 or record.length() <= 60: + return False + elif record.MaxIndividualSupport() <= 3: return False else: return True - -###### Old Stuff ############################ - def remove_duplicate(self, records): """ returns a vector of records where duplicates were removed @@ -430,7 +429,6 @@ class PindelReader(SVReader): return True return False -###### Old Stuff ############################ class PindelWriter(SVWriter): def __init__(self, file_name, reference_contigs, template_reader): -- GitLab