def write_neurommsig_bel(file,<EOL>df: pd.DataFrame,<EOL>disease: str,<EOL>nift_values: Mapping[str, str],<EOL>):
write_neurommsig_biolerplate(disease, file)<EOL>missing_features = set()<EOL>fixed_caps = set()<EOL>nift_value_originals = set(nift_values.values())<EOL>graph = BELGraph(<EOL>name=f'<STR_LIT>',<EOL>description=f'<STR_LIT>',<EOL>authors='<STR_LIT>',<EOL>contact='<STR_LIT>',<EOL>version=time.strftime('<STR_LIT>'),<EOL>)<EOL>for pathway, pathway_df in df.groupby(pathway_column):<EOL><INDENT>sorted_pathway_df = pathway_df.sort_values(genes_column)<EOL>sliced_df = sorted_pathway_df[columns].itertuples()<EOL>for _, gene, pubmeds, lit_snps, gwas_snps, ld_block_snps, clinical_features, clinical_snps in sliced_df:<EOL><INDENT>gene = ensure_quotes(gene)<EOL>for snp in itt.chain(lit_snps or [], gwas_snps or [], ld_block_snps or [], clinical_snps or []):<EOL><INDENT>if not snp.strip():<EOL><INDENT>continue<EOL><DEDENT>graph.add_association(<EOL>Gene('<STR_LIT>', gene),<EOL>Gene('<STR_LIT>', snp),<EOL>evidence='<STR_LIT>',<EOL>citation='<STR_LIT>',<EOL>annotations={<EOL>'<STR_LIT>': disease,<EOL>},<EOL>)<EOL><DEDENT>for clinical_feature in clinical_features or []:<EOL><INDENT>if not clinical_feature.strip():<EOL><INDENT>continue<EOL><DEDENT>if clinical_feature.lower() not in nift_values:<EOL><INDENT>missing_features.add(clinical_feature)<EOL>continue<EOL><DEDENT>if clinical_feature not in nift_value_originals:<EOL><INDENT>fixed_caps.add((clinical_feature, nift_values[clinical_feature.lower()]))<EOL>clinical_feature = nift_values[clinical_feature.lower()]  <EOL><DEDENT>graph.add_association(<EOL>Gene('<STR_LIT>', gene),<EOL>Abundance('<STR_LIT>', clinical_feature),<EOL>evidence='<STR_LIT>',<EOL>citation='<STR_LIT>',<EOL>annotations={<EOL>'<STR_LIT>': disease,<EOL>},<EOL>)<EOL>if clinical_snps:<EOL><INDENT>for clinical_snp in clinical_snps:<EOL><INDENT>graph.add_association(<EOL>Gene('<STR_LIT>', clinical_snp),<EOL>Abundance('<STR_LIT>', clinical_feature),<EOL>evidence='<STR_LIT>',<EOL>citation='<STR_LIT>',<EOL>annotations={<EOL>'<STR_LIT>': disease,<EOL>},<EOL>)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>if missing_features:<EOL><INDENT>log.warning('<STR_LIT>', disease)<EOL>for feature in missing_features:<EOL><INDENT>log.warning(feature)<EOL><DEDENT><DEDENT>if fixed_caps:<EOL><INDENT>log.warning('<STR_LIT>')<EOL>for broken, fixed in fixed_caps:<EOL><INDENT>log.warning('<STR_LIT>', broken, fixed)<EOL><DEDENT><DEDENT>
Writes the NeuroMMSigDB excel sheet to BEL

    :param file: a file or file-like that can be writen to
    :param df:
    :param disease:
    :param nift_values: a dictionary of lowercased to normal names in NIFT