jacquard/variant_caller_transforms/mutect.py
def _get_new_column_header(self, vcf_reader):
        """Returns a standardized column header.

        MuTect sample headers include the name of input alignment, which is
        nice, but doesn't match up with the sample names reported in Strelka
        or VarScan. To fix this, we replace with NORMAL and TUMOR using the
        MuTect metadata command line to replace them correctly."""
        mutect_dict = self._build_mutect_dict(vcf_reader.metaheaders)

        new_header_list = []
        required_keys = set([self._NORMAL_SAMPLE_KEY, self._TUMOR_SAMPLE_KEY])
        mutect_keys = set(mutect_dict.keys())

        if not required_keys.issubset(mutect_keys):
            raise utils.JQException("Unable to determine normal "
                                    "and tumor sample ordering "
                                    "based on MuTect metaheader.")

        for field_name in vcf_reader.column_header.split("\t"):
            if field_name == mutect_dict[self._NORMAL_SAMPLE_KEY]:
                field_name = "NORMAL"
            elif field_name == mutect_dict[self._TUMOR_SAMPLE_KEY]:
                field_name = "TUMOR"
            new_header_list.append(field_name)

        return "\t".join(new_header_list)
def _get_new_column_header(self, vcf_reader):
        mutect_dict = self._build_mutect_dict(vcf_reader.metaheaders)

        new_header_list = []
        required_keys = set([self._NORMAL_SAMPLE_KEY, self._TUMOR_SAMPLE_KEY])
        mutect_keys = set(mutect_dict.keys())

        if not required_keys.issubset(mutect_keys):
            raise utils.JQException("Unable to determine normal "
                                    "and tumor sample ordering "
                                    "based on MuTect metaheader.")

        for field_name in vcf_reader.column_header.split("\t"):
            if field_name == mutect_dict[self._NORMAL_SAMPLE_KEY]:
                field_name = "NORMAL"
            elif field_name == mutect_dict[self._TUMOR_SAMPLE_KEY]:
                field_name = "TUMOR"
            new_header_list.append(field_name)

        return "\t".join(new_header_list)
def _get_new_column_header ( self , vcf_reader ) : mutect_dict = self . _build_mutect_dict ( vcf_reader . metaheaders ) new_header_list = [ ] required_keys = set ( [ self . _NORMAL_SAMPLE_KEY , self . _TUMOR_SAMPLE_KEY ] ) mutect_keys = set ( mutect_dict . keys ( ) ) if not required_keys . issubset ( mutect_keys ) : raise utils . JQException ( "Unable to determine normal " "and tumor sample ordering " "based on MuTect metaheader." ) for field_name in vcf_reader . column_header . split ( "\t" ) : if field_name == mutect_dict [ self . _NORMAL_SAMPLE_KEY ] : field_name = "NORMAL" elif field_name == mutect_dict [ self . _TUMOR_SAMPLE_KEY ] : field_name = "TUMOR" new_header_list . append ( field_name ) return "\t" . join ( new_header_list )
Returns a standardized column header.

        MuTect sample headers include the name of input alignment, which is
        nice, but doesn't match up with the sample names reported in Strelka
        or VarScan. To fix this, we replace with NORMAL and TUMOR using the
        MuTect metadata command line to replace them correctly.
Returns a standardized column header .