def convertVariant(self, record, callSetIds):
        """
        Converts the specified pysam variant record into a GA4GH Variant
        object. Only calls for the specified list of callSetIds will
        be included.
        """
        variant = self._createGaVariant()
        variant.referenceName = record.contig
        if record.id is not None:
            variant.names = record.id.split(';')
        variant.start = record.start          # 0-based inclusive
        variant.end = record.stop             # 0-based exclusive
        variant.referenceBases = record.ref
        if record.alts is not None:
            variant.alternateBases = list(record.alts)
        # record.filter and record.qual are also available, when supported
        # by GAVariant.
        for key, value in record.info.iteritems():
            if value is not None:
                if isinstance(value, str):
                    value = value.split(',')
                variant.info[key] = _encodeValue(value)

        # NOTE: THE LABELED LINES SHOULD BE REMOVED ONCE PYSAM SUPPORTS
        # phaseset

        sampleData = record.__str__().split()[9:]  # REMOVAL
        variant.calls = []
        sampleIterator = 0  # REMOVAL
        if callSetIds is not None:
            for name, call in record.samples.iteritems():
                if callSetIds in self.getCallSetId(name):
                    genotypeData = sampleData[sampleIterator].split(
                        ":")[0]  # REMOVAL
                    variant.calls.append(self._convertGaCall(
                        record.id, name, call, genotypeData))  # REPLACE
                sampleIterator += 1  # REMOVAL
        variant.id = self.getVariantId(variant)
        return variant
dataset/ETHPy150Open ga4gh/server/ga4gh/datamodel/variants.py/HtslibVariantSet.convertVariant/swapped operands of `in`