def parse_ensembl_line(line, header):
    """Parse an ensembl formated line
    
        Args:
            line(list): A list with ensembl gene info
            header(list): A list with the header info
        
        Returns:
            ensembl_info(dict): A dictionary with the relevant info
    """
    line = line.rstrip().split('\t')
    raw_info = dict(zip(header, line))
    chrom = None
    gene_start = None
    gene_end = None
    transcript_start = None
    transcript_end = None
    hgnc_symbol = None
    ensembl_gene_id = None
    ensembl_transcript_id = None
    refseq_mrna = None
    refseq_mrna_predicted = None
    refseq_ncrna_predicted = None
    refseq_ncrna = None
    
    for word in raw_info:
        if 'Gene ID' in word:
            ensembl_gene_id = raw_info[word]
        if 'Chromosome' in word:
            chrom = raw_info[word]
        if 'Gene Start' in word:
            gene_start = int(raw_info[word])
        if 'Gene End' in word:
            gene_end = int(raw_info[word])
        if 'HGNC symbol' in word:
            hgnc_symbol = raw_info[word]
        if "Associated Gene Name" in word:
            hgnc_symbol = raw_info[word]
        if 'Transcript ID' in word:
            ensembl_transcript_id = raw_info[word]
        if 'Transcript Start' in word:
            transcript_start = int(raw_info[word])
        if 'Transcript End' in word:
            transcript_end = int(raw_info[word])
        if 'RefSeq mRNA' in word:
            if 'predicted' in word:
                refseq_mrna_predicted = raw_info[word]
            else:
                refseq_mrna = raw_info[word]
        if 'RefSeq ncRNA' in word:
            if 'predicted' in word:
                refseq_ncrna_predicted = raw_info[word]
            else:
                refseq_ncrna = raw_info[word]
        
    ensembl_info = {
        'chrom': chrom,
        'gene_start': gene_start,
        'gene_end': gene_end,
        'transcript_start': transcript_start,
        'transcript_end': transcript_end,
        'refseq_mrna': refseq_mrna,
        'refseq_mrna_predicted': refseq_mrna_predicted,
        'refseq_ncrna': refseq_ncrna,
        'refseq_ncrna_predicted': refseq_ncrna_predicted,
        'hgnc_symbol': hgnc_symbol,
        'ensembl_gene_id': ensembl_gene_id,
        'ensembl_transcript_id': ensembl_transcript_id,
    }
    return ensembl_info