예제 #1
0
    def __init__(self, filename, mutation_data_factory=None, configFile='vcf.in.config', genomeBuild="hg19", other_options=None):
        """

        :param filename:
        :param configFile:
        """
        super(VcfInputMutationCreator, self).__init__(filename, mutation_data_factory, configFile, genomeBuild, other_options)
        self.filename = filename
        self.build = genomeBuild
        self.configFilename = configFile
        try:
            self.vcf_reader = vcf.Reader(filename=self.filename, strict_whitespace=True)
        except AttributeError as ae:
            error_msg = "Could not parse VCF: " + str(self.filename) + ".  This often occurs due to a malformed VCF."
            logging.error(error_msg)
            raise OncotatorException(error_msg, str(ae.message), traceback.format_exc())
        self.configTableBuilder = ConfigTableCreatorFactory.getConfigTableCreatorInstance("input_vcf")
        self.isTagSplit = dict()
        self.logger = logging.getLogger(__name__)

        if other_options is None:
            other_options = {}
        self.collapse_filter_fields = other_options.get(OptionConstants.COLLAPSE_FILTER_COLS, False)

        self._is_skipping_no_alts = other_options.get(InputMutationCreatorOptions.IS_SKIP_ALTS, False)
예제 #2
0
    def __init__(self, filename, configFile="vcf.out.config", otherOptions=None):
        """


        :param filename: output filename
        :param configFile: output config file
        """
        self._filename = filename
        self._otherOpts = dict() if otherOptions is None else otherOptions
        self.configFilename = configFile
        self.logger = logging.getLogger(__name__)
        self.config = oncotator.utils.ConfigUtils.ConfigUtils.createConfigParser(configFile, ignoreCase=False)
        self.chromHashCodeTable = None  # maps every chromosome in the mutations to a sortable integer
        self.configTableBuilder = ConfigTableCreatorFactory.getConfigTableCreatorInstance("output_vcf")
        self.delimiter = "\t"
        self.lineterminator = "\n"
        self.sampleNames = []  # all sample names in the mutations
        self.chroms = []  # all chromosomes in the mutations
예제 #3
0
    def __init__(self, filename, configFile="vcf.out.config", otherOptions=None):
        """


        :param filename: output filename
        :param configFile: output config file
        """
        self._filename = filename
        self._otherOpts = dict() if otherOptions is None else otherOptions
        self.configFilename = configFile
        self.logger = logging.getLogger(__name__)
        self.config = oncotator.utils.ConfigUtils.ConfigUtils.createConfigParser(configFile, ignoreCase=False)
        self.chromHashCodeTable = None  # maps every chromosome in the mutations to a sortable integer
        self.configTableBuilder = ConfigTableCreatorFactory.getConfigTableCreatorInstance("output_vcf")
        self.delimiter = "\t"
        self.lineterminator = "\n"
        self.sampleNames = []  # all sample names in the mutations
        self.chroms = []  # all chromosomes in the mutations
예제 #4
0
    def __init__(self, filename, configFile='vcf.in.config', genomeBuild="hg19", other_options=None):
        """

        :param filename:
        :param configFile:
        """
        self.filename = filename
        self.build = genomeBuild
        self.configFilename = configFile
        self.vcf_reader = vcf.Reader(filename=self.filename, strict_whitespace=True)
        self.configTableBuilder = ConfigTableCreatorFactory.getConfigTableCreatorInstance("input_vcf")
        self.isTagSplit = dict()
        self.logger = logging.getLogger(__name__)

        if other_options is None:
            other_options = {}

        self._is_skipping_no_alts = other_options.get(InputMutationCreatorOptions.IS_SKIP_ALTS, False)
    def __init__(self, filename, configFile='vcf.in.config', genomeBuild="hg19", other_options=None):
        """

        :param filename:
        :param configFile:
        """
        self.filename = filename
        self.build = genomeBuild
        self.configFilename = configFile
        self.vcf_reader = vcf.Reader(filename=self.filename, strict_whitespace=True)
        self.configTableBuilder = ConfigTableCreatorFactory.getConfigTableCreatorInstance("input_vcf")
        self.isTagSplit = dict()
        self.logger = logging.getLogger(__name__)

        if other_options is None:
            other_options = {}

        self._is_skipping_no_alts = other_options.get(InputMutationCreatorOptions.IS_SKIP_ALTS, False)