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

https://github.com/oalabi76/Nrxn_BehaviorAndAnalysis
17 December 2020, 13:55:52 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    No releases to show
  • 18dbfb1
  • /
  • Behavior_Analysis_Master.m
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

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.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:966910f650a959d41fdbd9e736ee2771b421d60d
origin badgedirectory badge Iframe embedding
swh:1:dir:18dbfb1128c3b3e0e15a9632c4befe4ca76dbcb0
origin badgerevision badge
swh:1:rev:b8233aab4e607f82c868caf2dfe4007790088e8e
origin badgesnapshot badge
swh:1:snp:ec73584b2578797009103082e50368712d4fceee

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.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: b8233aab4e607f82c868caf2dfe4007790088e8e authored by oalabi76 on 30 June 2020, 00:15:22 UTC
Add files via upload
Tip revision: b8233aa
Behavior_Analysis_Master.m
close all
clear all
addpath(genpath(''))%folder with necessary scripts
cd('');%ordered data from individual sessions
global_data = struct;
warning('off','all');

genotype_directories = dir();
genotype_directories = genotype_directories(~strncmpi('.', {genotype_directories.name}, 1));

for i = 1:length(genotype_directories)
    
    %Analyze data by genotype, open each genotype folder individually and
    %then iterate over reversal training data and relative reward reversal
    %data
    
    cd(strcat('',genotype_directories(i).name));% folder with mice for individual genotype
    mouse_directories = dir();
    mouse_directories = mouse_directories(~strncmpi('.', {mouse_directories.name}, 1));
    
    for f = 1:length(mouse_directories) %for each animal that is part of an individual genotype
        
%         %Training
%         cd(strcat('')); %training data subfolder
%         
%         FileList = dir();
%         FileList = FileList(~strncmpi('.', {FileList.name}, 1));
%         
%         for k = 1:length(FileList)
%             global_data.(genotype_directories(i).name).(strrep(mouse_directories(f).name,'.','_')).Training(k)= load(FileList(k).name);
%         end
        
        %Reversal
        cd(strcat('')); %reversal data subfolder
        
        FileList = dir();
        FileList = FileList(~strncmpi('.', {FileList.name}, 1));
        
        for j = 1:length(FileList) %analyze the data from each session and save to struct
            global_data.(genotype_directories(i).name).(strrep(mouse_directories(f).name,'.','_')).RelativeReward(j) = load(FileList(j).name);
            Relative_Reward_Analysis;
        end
        
        if length(FileList) > 0
            for q = 1:2
                Q_Learning_Neurexin;
                global_data.(genotype_directories(i).name).QModel.(RewProb{q}).alpha(1,f) = global_data.(genotype_directories(i).name).(strrep(mouse_directories(f).name,'.','_')).ReinforcementM.(RewProb{q}).QModel.alpha; 
                global_data.(genotype_directories(i).name).QModel.(RewProb{q}).beta(1,f) = global_data.(genotype_directories(i).name).(strrep(mouse_directories(f).name,'.','_')).ReinforcementM.(RewProb{q}).QModel.beta; 
                global_data.(genotype_directories(i).name).QModel.(RewProb{q}).kappa(1,f) = global_data.(genotype_directories(i).name).(strrep(mouse_directories(f).name,'.','_')).ReinforcementM.(RewProb{q}).QModel.kappa; 

                global_data.(genotype_directories(i).name).QModel.(RewProb{q}).gamma(1,f) = global_data.(genotype_directories(i).name).(strrep(mouse_directories(f).name,'.','_')).ReinforcementM.(RewProb{q}).QModel.gamma; 
                global_data.(genotype_directories(i).name).QModel.(RewProb{q}).constant_1(1,f) = global_data.(genotype_directories(i).name).(strrep(mouse_directories(f).name,'.','_')).ReinforcementM.(RewProb{q}).QModel.constant_1; 
                global_data.(genotype_directories(i).name).QModel.(RewProb{q}).constant_2(1,f) = global_data.(genotype_directories(i).name).(strrep(mouse_directories(f).name,'.','_')).ReinforcementM.(RewProb{q}).QModel.constant_2; 
                global_data.(genotype_directories(i).name).QModel.(RewProb{q}).constant_3(1,f) = global_data.(genotype_directories(i).name).(strrep(mouse_directories(f).name,'.','_')).ReinforcementM.(RewProb{q}).QModel.constant_3; 
                global_data.(genotype_directories(i).name).QModel.(RewProb{q}).constant_4(1,f) = global_data.(genotype_directories(i).name).(strrep(mouse_directories(f).name,'.','_')).ReinforcementM.(RewProb{q}).QModel.constant_4; 
            end
        end
    end

end

back to top

Software Heritage — Copyright (C) 2015–2025, 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