Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 0c820068458bd9249785c704716acfd1a9301f1c authored by gabrielle9 on 01 August 2022, 23:54:06 UTC, committed by GitHub on 01 August 2022, 23:54:06 UTC
Update README.md
updated README with eLife citation and link and more description
1 parent d118c43
  • Files
  • Changes
  • 707eb41
  • /
  • neuron_criteria.py
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:0c820068458bd9249785c704716acfd1a9301f1c
directory badge
swh:1:dir:707eb411889dc1b267f05d5bf0679b7641cef443
content badge
swh:1:cnt:36382fac8c0e270613b8f1cd90e11d6386e8f1c2

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
neuron_criteria.py
def getClock(l_lnv=False):
    """
    Manually generates table of the clock neurons with or without the l-lnvs

    :param l_lnv: default false. If set to True, includes information about l-lnv neurons.
    :return: (Dataframe) of clock neuron information
    """
    import pandas as pd

    clock_dictionary = {
       'bodyId': [2068801704, 1664980698, 2007068523, 1975347348, 5813056917, 5813021192, 5813069648, 511051477,
                  296544364, 448260940, 5813064789, 356818551, 480029788, 450034902, 546977514, 264083994, 5813022274,
                  5813010153, 324846570, 325529237, 387944118, 387166379, 386834269, 5813071319],
       'type': ['s-LNv', 's-LNv', 's-LNv', 's-LNv', 'LNd', 'LNd', 'LNd', '5th s-LNv', 'LNd', 'LNd', 'LNd',
                'LPN', 'LPN', 'LPN', 'LPN', 'DN1a', 'DN1a', 'DN1pA', 'DN1pA', 'DN1pA', 'DN1pA', 'DN1pA', 'DN1pB', 'DN1pB'],
       'seqInstance': ['s-LNv_R_1', 's-LNv_R_2', 's-LNv_R_3', 's-LNv_R_4', 'LNd_R_4', 'LNd_R_5', 'LNd_R_6',
                    '5th s-LNv_R_1', 'LNd_R_1', 'LNd_R_2', 'LNd_R_3', 'LPN_R_1', 'LPN_R_2', 'LPN_R_3', 'LPN_R_4',
                    'DN1a_R_1', 'DN1a_R_2', 'DN1pA_R_1', 'DN1pA_R_2', 'DN1pA_R_3', 'DN1pA_R_4', 'DN1pA_R_5',
                    'DN1pB_R_1', 'DN1pB_R_2'],
       'labels': ['sLNv1', 'sLNv2', 'sLNv3', 'sLNv4', 'LNd4', 'LNd5', 'LNd6',
                    '5th sLNv', 'LNd1', 'LNd2', 'LNd3', 'LPN1', 'LPN2', 'LPN3', 'LPN4',
                    'DN1a1', 'DN1a2', 'DN1pA1', 'DN1pA2', 'DN1pA3', 'DN1pA4', 'DN1pA5',
                    'DN1pB1', 'DN1pB2'],
       'phase': ['morning', 'morning', 'morning', 'morning', 'evening', 'evening', 'evening', 'evening', 'evening', 
                 'evening', 'evening', '', '', '', '', '', '', '', '', '', '', '', '', ''],
       'subphase': ['M', 'M', 'M', 'M', 'E1', 'E1', 'E2', 'E2', 'E3', 
                 'E3', 'E3', '', '', '', '', '', '', '', '', '', '', '', '', '']}

    clock_df = pd.DataFrame.from_dict(clock_dictionary)

    if l_lnv:
        l_lnv_dictionary = {
           'bodyId': (1884625521, 2065745704, 5813001741, 5813026773),
           'type': tuple(('l-LNv', 'l-LNv', 'l-LNv', 'l-LNv')),
           'seqInstance': ['l-LNv_R_1', 'l-LNv_R_2', 'l-LNv_R_3', 'l-LNv_R_4'],
           'labels': ['lLNv1', 'lLNv2', 'lLNv3', 'lLNv4'],
           'phase': ['', '', '', ''],
           'subphase': ['', '', '', '']}
        
        l_lnv_df = pd.DataFrame.from_dict(l_lnv_dictionary)
        clock_df = clock_df.append(l_lnv_df, ignore_index=True)

    return clock_df

def bodyIds_by_type(clock_df):
    """
    Uses data from clock_df to return a dictionary mapping neurons to lists of bodyIds.
    :param clock_df: clock information dataframe
    :return: (Dictionary) of body ids by clock type
    """
    from collections import defaultdict

    ids_by_type = defaultdict()
    for t in clock_df.type.unique():
        one_type = clock_df[clock_df['type']==t]
        body_ids = one_type['bodyId']
        body_ids = body_ids.values.tolist()
        ids_by_type[t] = body_ids
    return ids_by_type
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API